|
|
|
![]() |
|
Strumenti |
![]() |
#1 |
Junior Member
Iscritto dal: Jun 2006
Messaggi: 1
|
pc to mobile phone (batch file)
Ciao tutti,
sorry for writting this post in english, but I can't do it in italian. Here is my problem: I need my PC to call my mobile phone through a dial-up connection, when certain event occures. For that purpose I've created an internet connection (although i don't really need internet), with blank for username&password, and just my mobile phone number. Than I wrote a batch file: DIAL.bat Codice:
@ECHO OFF :loop Echo Trying to Dial up.................................. rasdial MyMobile if NOT %ERRORLEVEL% ==0 goto failed Exit :failed cls Echo Failed to connect......will retry goto loop ..but the problem with this script is, it can't stop calling (can't exit the loop). So, if I answer the call (on my mobile) and subsequently close the connection (this is what I need, just to be noticed about certain event on my PC), this script starts to call again, and loops until I answer again, and so on, over and over. Than I tried the following TEST.bat script, to establish a reason for this malfunction : TEST.bat Codice:
@ECHO OFF Echo Trying to Dial up.................................. rasdial MyMobile Echo The error level is %ERRORLEVEL% pause Codice:
Trying to Dial up.................................. Connecting to MYMOBILE... Remote Access error 676 - The phone line is busy. For more help on this error: Type 'hh netcfg.chm' In help, click Troubleshooting, then Error Messages, then 676 The error level is 676 Press any key to continue . . . The reason for that (i think) is the script can't get %ERRORLEVEL% ==0 value, because %ERRORLEVEL% ==0 probably means a connection with another modem is established, means handshake process is accomplished successfully. In my case, i don't have any modem on the other side, but just my mobile, so %ERRORLEVEL% will be <>0 in any way, thus script will not leave the loop. Is there some workaround to exit outside the loop when I answer my mobile phone? ![]() Can modem notice that called phone doesn't ring anymore? ![]() Mille grazie |
![]() |
![]() |
![]() |
Strumenti | |
|
|
Tutti gli orari sono GMT +1. Ora sono le: 05:00.