Guest zirex Posted August 9, 2005 Share Posted August 9, 2005 :"> I wonder can someone show me how to create a phon dialer simpl with auto it.......... Link to comment Share on other sites More sharing options...
rakudave Posted August 9, 2005 Share Posted August 9, 2005 i don't belive this is possible... btw: why would u need one anyway? Pangaea Ruler new, UDF: _GUICtrlCreateContainer(), Pangaea Desktops, Pangaea Notepad, SuDoku, UDF: Table Link to comment Share on other sites More sharing options...
sykes Posted August 9, 2005 Share Posted August 9, 2005 On windows 2000/XP you can use the following to connect/disconnect dial-up connections:Rasdial.exe "My Connection" myusername mypassword rasdial.exe "My Connection" /disconnect Not sure if this is what you are looking for.... We have enough youth. How about a fountain of SMART? Link to comment Share on other sites More sharing options...
blindwig Posted August 9, 2005 Share Posted August 9, 2005 I think windows 95/98 used to come with a dialer built-in. I don't know if newer windows include that, but you might want to look for that and see if it's scriptable... My UDF Threads:Pseudo-Hash: Binary Trees, Flat TablesFiles: Filter by Attribute, Tree List, Recursive Find, Recursive Folders Size, exported to XMLArrays: Nested, Pull Common Elements, Display 2dSystem: Expand Environment Strings, List Drives, List USB DrivesMisc: Multi-Layer Progress Bars, Binary FlagsStrings: Find Char(s) in String, Find String in SetOther UDF Threads I Participated:Base64 Conversions Link to comment Share on other sites More sharing options...
DaleHohm Posted August 9, 2005 Share Posted August 9, 2005 (edited) :"> I wonder can someone show me how to create a phon dialer simpl with auto it..........<{POST_SNAPBACK}>I'm not able to test this at the moment, but not surprisingly there is a COM interface that can do this. I found a VBS example and did a quick conversion... Bone up on your Hayes AT modem commands to do the fancy stuff. (requires 3.1.1+ beta)DaleDial("1234567") Exit Func Dial($pNum) dim $FromModem = "" $DialString = "ATDT" & $pNum & ";" & @CR $com = ObjCreate ("MSCommLib.MSComm") With $com .CommPort = 3 .Settings = "9600,N,8,1" .PortOpen = True .InBufferCount = 0 .Output = $DialString EndWith While 1 If $com.InBufferCount Then $FromModem = $FromModem & $com.Input;* Check for "OK". If StringInStr($FromModem, "OK") Then;* Notify the user to pick up the phone. MsgBox(0, "Phone", "Please pick up the phone and either press Enter or click OK") ExitLoop EndIf EndIf WEnd $com.Output = "ATH" & @CR $com.PortOpen = False $com = 0 EndFunc ;==>DialEdit: fixed a typoEdit: I tested it... it works Edited August 9, 2005 by DaleHohm Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model Automate input type=file (Related) Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded Better Better? IE.au3 issues with Vista - Workarounds SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead? Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble Link to comment Share on other sites More sharing options...
DaleHohm Posted January 3, 2006 Share Posted January 3, 2006 For the previous COM example, many people will not have the MSComm ocx file on thier system (unless they once had VB6 installed). It is a royalty component and therefore cannot be redistributed.Fortunately, there is a freeware version created to be a full emulation of that control that you can doewnload and install... then just replace the MSComm with NetCommOCX in the previous example and you should be set.You'll find the download link here: NetCommHere's an updated example using NetComm with some additional error handling tossed in:expandcollapse popup; Set a COM Error handler -- only one can be active at a time (see helpfile) $oMyError = ObjEvent("AutoIt.Error", "MyErrFunc") $sNumberToDial = "5551212" Dial($sNumberToDial) Exit Func Dial($pNum, $time2wait = 5000) dim $FromModem = "" $DialString = "ATDT" & $pNum & ";" & @CR ; $com = ObjCreate ("MSCommLib.MSComm") $com = ObjCreate ("NETCommOCX.NETComm") With $com .CommPort = 3 .PortOpen = True .Settings = "9600,N,8,1" .InBufferCount = 0 .Output = $DialString EndWith $begin = TimerInit() While 1 If $com.InBufferCount Then $FromModem = $FromModem & $com.Input;* Check for "OK". If StringInStr($FromModem, "OK") Then ;* Notify the user to pick up the phone. MsgBox(0, "Phone", "Please pick up the phone and either press Enter or click OK") ExitLoop EndIf EndIf If (TimerDiff($begin) > $time2wait) Then MsgBox(0, "Error", "No response from modem on COM" & $com.CommPort & " in " & $time2wait & " milliseconds") Exit EndIf WEnd $com.Output = "ATH" & @CR $com.PortOpen = False $com = 0 EndFunc ;==>Dial Func MyErrFunc() ; Set @ERROR to 1 and return control to the program following the trapped error SetError(1) MsgBox(0, "Error", "Error communicating with modem on COM" );& $com.CommPort) Exit EndFunc ;==>MyErrFuncEnjoy,Dale Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model Automate input type=file (Related) Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded Better Better? IE.au3 issues with Vista - Workarounds SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead? Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted January 3, 2006 Moderators Share Posted January 3, 2006 This is very cool Dale... as usual Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now