Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.
Keywords: phone dialer
;Contents of batch file "phonebk.wbt": ComPort="COM1" DialPrefix="ATDT" HangCommand="ATH0" ; And here we go. First make a CR/LF and TAB CR=strcat(num2char(13),num2char(10)) TAB=num2char(9) ; Make sure there is a fonebook.txt file. If not, create one: If !FileExist("fonebook.txt") then fp=FileOpen("fonebook.txt","WRITE") then FileWrite(fp,"Wilson WindowWare Order Line 1-800-762-8383") then FileClose(fp) ; Put up the TextBox so the user can choose a number :NewNum CancelCmd="Exit" ; What to do if user hits "Cancel" num=StrTrim(TextBox("DIALER - Just hit OK to add a new number","fonebook.txt")) if num=="" then num=strtrim(AskLine("DIALER","Enter name and number","")) then Terminate(num=="","","") then fp=FileOpen("temp876.num","WRITE") then FileWrite(fp,num) then FileClose(fp) then FileAppend("temp876.num","fonebook.txt") then FileDelete("temp876.num") then goto newnum a=StrIndex(num," ",0,@BACKSCAN) b=StrIndex(num,TAB,0,@BACKSCAN) a=max(a,b) num=strsub(num,a+1,strlen(num)-a) DialCommand="%DialPrefix%%NUM%;" :redial fp=FileOpen(ComPort,"WRITE") FileWrite(fp,DialCommand) FileClose(fp) CancelCmd="Goto Hang1" a=AskYesNo("Dialer","Yes=HANGUP%CR%No=REDIAL%CR%Cancel=New Number") fp=FileOpen(ComPort,"WRITE") FileWrite(fp,HangCommand) FileClose(fp) if a==@YES then exit Display(30,"Dialer","Redial Wait") goto redial :CANCEL %CancelCmd% :Hang1 fp=FileOpen(ComPort,"WRITE") FileWrite(fp,HangCommand) FileClose(fp) goto NewNum
Article ID: W13755
Filename: Phone Dialer Example.txt
File Created: 1999:04:15:16:56:10
Last Updated: 1999:04:15:16:56:10