Auto reply sms

For user who dont speak german please use this part of my forum
bnilantha
Beiträge: 43
Registriert: Di 4. Nov 2008, 14:56

Auto reply sms

Beitrag von bnilantha »

is there any way to auto reply to incoming sms.. as same as http://www.ozekisms.com

there can config outgoing with php script.. please [/url]
Bernard Nilantha
FJ
Site Admin
Beiträge: 32106
Registriert: Mi 15. Feb 2006, 01:16
Wohnort: Tirol
Kontaktdaten:

Beitrag von FJ »

MyPhoneExplorer has already interfaces to detect incoming messages and to send messages. Create a *.vbs-File with this content:

Code: Alles auswählen

Dim i, text, number, tmp, outtext

'First we filter out the commandlinearguments. We get the sender of the SMS and the text throught commandline from MPE
For i = 0 to WScript.Arguments.Count - 1
  tmp = WScript.Arguments.Item(i)
  If Instr(1, LCase(tmp), "number=") = 1 Then
    number = Mid(tmp,8)
  ElseIf Instr(1, LCase(tmp), "text=") = 1 Then
    text = Mid(tmp,6)
  End If
Next

'MPE does send the Number if possible also with the name (like "Name [0123456789]"), we have to cut this of.
If Instr(1,number,"[") <> 0 Then
  number = Mid(number, InstrRev(number,"[") + 1)
  If Instr(1, number, "]") <> 0 Then
    number = Left(number, Instr(1, number, "]") - 1)
  End If
End If

'Msgbox "Text=" & text & vbNewLine & "Number=" & number  'This line is for debugging, it shows the parsed variables

If IsNumeric(number) = True Then

' you can also set a numberfilter and/or textfilter like: If number = "1234567" And InStr(1,text,"question") <> 0 Then
' here you could do anything. An example: Another program writes some value (lets say the weather) into a local file
' your script checks if the messagetext contained "weather" and if yes then the script reads the wheater-textfile and
' tells the sender of the message how the weather will be. Or maybe it answers with the count of unread emails when the
' text contained "emails"

   outtext = "Automated response (" & text & "):%nThis is a test-feedback"  'here the returned text is set, %n represents a line break

   RunMPE "action=sendmessage flags=noerrmsg savetosent=1 number=" & number & " text=" & Chr(34) & outtext & Chr(34)
End If


Function RunMPE(Arguments)
  set shell = CreateObject("WScript.Shell")
  shell.run "myphoneexplorer " & Arguments ,3
End Function


save the file, then open the file %appdata%\MyPhoneExplorer\general.ini and add this lines:

Code: Alles auswählen

[EventHandlers] 
OnIncomingMessage=<path to script> number="%number" text="%text"
bnilantha
Beiträge: 43
Registriert: Di 4. Nov 2008, 14:56

Beitrag von bnilantha »

is that possible update mysql database when incoming sms??
and generate reply sms from mysql database?
Bernard Nilantha
FJ
Site Admin
Beiträge: 32106
Registriert: Mi 15. Feb 2006, 01:16
Wohnort: Tirol
Kontaktdaten:

Beitrag von FJ »

Sure its possible, but its not my job to write scripts for you. Probably you need a commandline-tool for Web-Access to contact your php-Script on a remote Server.
Gast

Please help

Beitrag von Gast »

dear can you do little fever for me...
i want to write VB6 code for receive sms. i did send sms. but i coldnt revive sms.
i want when recive sms to my GSM modem save to mysql db.

i know dats not your job, but i think you know about this. i searched several forum.
FJ
Site Admin
Beiträge: 32106
Registriert: Mi 15. Feb 2006, 01:16
Wohnort: Tirol
Kontaktdaten:

Beitrag von FJ »

Command the modem to notify about new sms with AT+CNMI=2,1
The listen for the notification: +CMTI
bnilantha
Beiträge: 43
Registriert: Di 4. Nov 2008, 14:56

Beitrag von bnilantha »

Sorry i didnt get you dear.. please give sample..

also i want action dial on html page. it mean phone numbers list on html, onclick phone number can i dial dat using myphone exp
Bernard Nilantha
FJ
Site Admin
Beiträge: 32106
Registriert: Mi 15. Feb 2006, 01:16
Wohnort: Tirol
Kontaktdaten:

Beitrag von FJ »

i want to write VB6 code for receive sms.

Do you want to control the phone with your program directly or do you want to control MyPhoneExplorer ?
bnilantha
Beiträge: 43
Registriert: Di 4. Nov 2008, 14:56

Beitrag von bnilantha »

FJ hat geschrieben:
i want to write VB6 code for receive sms.

Do you want to control the phone with your program directly or do you want to control MyPhoneExplorer ?


1. I want dial number with out dialing on phone. when i click on number. MyPhoneExplorer or what ever i just dial number. But if its using MyPhoneExplorer its better. Eg:-- listing my phone book in web page (PHP) then i click on number it automaticaly dial.

2. If u can pleace give me sample code for receive sms & store in to mysql db. this is not using MyPhoneExplorer coz GSM modem not supported.

Thanks ur response
Bernard Nilantha
FJ
Site Admin
Beiträge: 32106
Registriert: Mi 15. Feb 2006, 01:16
Wohnort: Tirol
Kontaktdaten:

Beitrag von FJ »

1. Register a new protocol handler and enter this command for it:

Code: Alles auswählen

myphoneexplorer action=dial number=%1


2. Take a look at the logfiles of MPE after a message was received and use Google. This part is to big as i would write a example for you
bnilantha
Beiträge: 43
Registriert: Di 4. Nov 2008, 14:56

Beitrag von bnilantha »

[quote="FJ"]1. Register a new protocol handler and enter this command for it:

Code: Alles auswählen

myphoneexplorer action=dial number=%1


this not possible in php. so i want one some thing like which u given for auto reply sms.
Bernard Nilantha
FJ
Site Admin
Beiträge: 32106
Registriert: Mi 15. Feb 2006, 01:16
Wohnort: Tirol
Kontaktdaten:

Beitrag von FJ »

Please use google and search how to register a new protocol. You have to do this in the windows regsitry, then you can start a call from a webpage with a link like "callto:12345"
bnilantha
Beiträge: 43
Registriert: Di 4. Nov 2008, 14:56

Beitrag von bnilantha »

FJ hat geschrieben:Please use google and search how to register a new protocol. You have to do this in the windows regsitry, then you can start a call from a webpage with a link like "callto:12345"


I have creat one.. but it open only full software.. i just want to dial number
Bernard Nilantha
bnilantha
Beiträge: 43
Registriert: Di 4. Nov 2008, 14:56

Beitrag von bnilantha »

FJ hat geschrieben:Please use google and search how to register a new protocol. You have to do this in the windows regsitry, then you can start a call from a webpage with a link like "callto:12345"


"E:\Program File\MyPhoneExplorer\MyPhoneExplorer.exe" "/action=dial number:"%number""
Bernard Nilantha
FJ
Site Admin
Beiträge: 32106
Registriert: Mi 15. Feb 2006, 01:16
Wohnort: Tirol
Kontaktdaten:

Beitrag von FJ »

I have creat one.. but it open only full software.. i just want to dial number

What did you expect ? If you do not want MyPhoneExplorer then you have to write your own little app which opens the connection to phone and dials the number.

"E:\Program File\MyPhoneExplorer\MyPhoneExplorer.exe" "/action=dial number:"%number""

I don't think this command will work. You should read the documents more carefully.

Code: Alles auswählen

"E:\Program File\MyPhoneExplorer\MyPhoneExplorer.exe" action=dial number=%1

This should do the job
bnilantha
Beiträge: 43
Registriert: Di 4. Nov 2008, 14:56

thanks

Beitrag von bnilantha »

FJ hat geschrieben:
I have creat one.. but it open only full software.. i just want to dial number

What did you expect ? If you do not want MyPhoneExplorer then you have to write your own little app which opens the connection to phone and dials the number.

"E:\Program File\MyPhoneExplorer\MyPhoneExplorer.exe" "/action=dial number:"%number""

I don't think this command will work. You should read the documents more carefully.

Code: Alles auswählen

"E:\Program File\MyPhoneExplorer\MyPhoneExplorer.exe" action=dial number=%1

This should do the job



ahh i did it.. thanks..
Bernard Nilantha
bnilantha
Beiträge: 43
Registriert: Di 4. Nov 2008, 14:56

proto call for xp

Beitrag von bnilantha »

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\call]
@="URL: Protocol "
"URL Protocol"=""

[HKEY_CLASSES_ROOT\call\DefaultIcon]
@="C:\\Program Files\\MyPhoneExplorer\\MyPhoneExplorer.exe"

[HKEY_CLASSES_ROOT\call\shell]

[HKEY_CLASSES_ROOT\call\shell\open]

[HKEY_CLASSES_ROOT\call\shell\open\command]
@="C:\\Program Files\\MyPhoneExplorer\\MyPhoneExplorer.exe action=dial number=\"%1\""



its not dial number. it just open fully software of myphoneexplor.. it was working on win7..
Bernard Nilantha
bnilantha
Beiträge: 43
Registriert: Di 4. Nov 2008, 14:56

what should i do?/

Beitrag von bnilantha »

still im having same problem what should i do??
it was working fine on some PC with WIN7
Bernard Nilantha
FJ
Site Admin
Beiträge: 32106
Registriert: Mi 15. Feb 2006, 01:16
Wohnort: Tirol
Kontaktdaten:

Beitrag von FJ »

The command has to look like this:
@="\"C:\\Program Files (x86)\\MyPhoneExplorer\\MyPhoneExplorer.exe\" action=dial number=%1"
But there is a problem, i just tested and i saw that the call: prefix is not removed by windows. So you have to do this with a seperate script. I did write for you a auto-reply script, its similar: The script does parse the commandline, removes callto: and exectutes the exectutable of MyPhoneExplorer with correct commandline
linheli

Beitrag von linheli »

Command the modem to notify about new sms with AT+CNMI=2,1
The listen for the notification: +CMTI
Antworten