Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Script file to change time in Phonemail 1

Status
Not open for further replies.

barb327

Technical User
Feb 22, 2007
11
US
Good Afternoon,
I am tasked with changing time in all my Phonemail systems on March 11. I have about 100 and would like to put it in a script file that includes the Modem numbers. It will dial and connect in Modem command mode and stops. Below is an example of what I have built:

proc main
Transmit "atdt916655553214"
pause 15
transmit "^M"
transmit "^M"
transmit "^M"
transmit "^M"
waitfor "Log"
transmit "sysadmin^M"
waitfor "Pass"
transmit "rgaines44^M"
waitfor "Function:"
transmit "SETT^M"
waitfor "Enter new time [hh:mm:ss] or press Enter:"
transmit "01:42:00^M"
waitfor "Enter new date [mm/dd/yy] or press Enter:"
transmit "^M"
waitfor "Function:"
transmit "logo^M"
waitfor "Action:"
transmit "logo^M"
hangup
pause 5
Transmit "atdt9162655533798"
pause 15
transmit "^M"
transmit "^M"
transmit "^M"
transmit "^M"
waitfor "Log"
transmit "sysadmin^M"
waitfor "Pass"
transmit "rgaines44^M"
waitfor "Function:"
transmit "SETT^M"
waitfor "Enter new time [hh:mm:ss] or press Enter:"
transmit "01:42:00^M"
waitfor "Enter new date [mm/dd/yy] or press Enter:"
transmit "^M"
waitfor "Function:"
transmit "logo^M"
waitfor "Action:"
transmit "logo^M"
hangup
endproc

Is there a better way to do this, or a setting I am failing to catch? Any help would be greatly appreciated!

Barb
 
Here is the final. I also added the capture file and the (Hour-1) will take the time from my PC and set Mountain time back an hour (I'm Central).


proc InsertString
capturestr "[END OF TEST]"
endproc

proc UpdatePhonemailTime
param string sPhoneNumber
string sErrMessage = ""

dialnumber DATA sPhoneNumber ;dial the number
while $DIALING ;Pause while dialing
yield
endwhile

if $CARRIER
transmit "^M"
transmit "^M"
transmit "^M"
transmit "^M"
waitfor "Log"
transmit "sysadmin^M"
waitfor "Pass"
transmit "astros23^M"
waitfor "Function:"
transmit "SETT^M"
waitfor "Enter new time [hh:mm:ss] or press Enter:"
TransmitTime()
waitfor "Enter new date [mm/dd/yy] or press Enter:"
transmit "^M"
waitfor "Function:"
transmit "logo^M"
waitfor "Action:"
transmit "logo^M"
disconnect
Pause 5
else
strfmt sErrMessage "FAILED TO CONNECT TO : %s" sPhoneNumber
termmsg sErrMessage
endif
endproc



proc TransmitTime
integer Month, Day ; Integers to contain date and
integer Year, Hour ; time converted from long
integer Min, Sec ; date and time.
string MonStr ; String to contain month.
string sTime, sHour, sMin, sSec

; Convert long time value into it's counter parts, year,
; month, day, hour, min, and sec.
ltimeints $LTIME Year Month Day Hour Min Sec
monthstr Month MonStr ; Get the month in string format.
;usermsg "Month is %s and it's day %d." MonStr Day
numtostr (Hour-1) sHour
numtostr Min sMin
numtostr Sec sSec

sTime = sHour
strcat sTime ":"
strcat sTime sMin
strcat sTime ":"
strcat sTime sSec
strcat sTime "^m"

transmit sTime

endproc
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top