Seite 1 von 2

Auto reply sms

Verfasst: So 11. Jul 2010, 06:03
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]

Verfasst: So 11. Jul 2010, 13:54
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"

Verfasst: Mo 12. Jul 2010, 19:42
von bnilantha
is that possible update mysql database when incoming sms??
and generate reply sms from mysql database?

Verfasst: Mo 12. Jul 2010, 20:41
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.

Please help

Verfasst: Mo 6. Dez 2010, 09:18
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.

Verfasst: Di 7. Dez 2010, 00:42
von FJ
Command the modem to notify about new sms with AT+CNMI=2,1
The listen for the notification: +CMTI

Verfasst: Mi 8. Dez 2010, 20:45
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

Verfasst: Do 9. Dez 2010, 23:10
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 ?

Verfasst: Fr 10. Dez 2010, 02:08
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

Verfasst: Fr 10. Dez 2010, 02:16
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

Verfasst: Fr 10. Dez 2010, 03:04
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.

Verfasst: So 12. Dez 2010, 20:14
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"

Verfasst: Di 14. Dez 2010, 02:40
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

Verfasst: Di 14. Dez 2010, 03:43
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""

Verfasst: Sa 18. Dez 2010, 01:35
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

thanks

Verfasst: Di 21. Dez 2010, 21:12
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..

proto call for xp

Verfasst: Mo 3. Jan 2011, 17:59
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..

what should i do?/

Verfasst: Do 12. Mai 2011, 09:45
von bnilantha
still im having same problem what should i do??
it was working fine on some PC with WIN7

Verfasst: Do 19. Mai 2011, 22:10
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

Verfasst: Do 23. Jun 2011, 10:23
von linheli
Command the modem to notify about new sms with AT+CNMI=2,1
The listen for the notification: +CMTI