DaleHohm Posted November 22, 2007 Author Share Posted November 22, 2007 @Champak:You'll need to look at documentation for MSCOMM (probably in MSDN) and NETComm (at the HardAndSoftware link in the base note).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...
oliquir Posted March 26, 2008 Share Posted March 26, 2008 hi i am new ti autoIt and i tried the netcommocx example and it works great, but for my application i need the modem to stay connected and close the com port so other program can use it and communicates with remote modem. (i use it to connect to a plc) i am able to do it in hyperterminal with atdt+ phone number then close program and the modem stay connected, but with the example the modem disconnect as soon as the program closes. Is it something possible to do? Link to comment Share on other sites More sharing options...
DaleHohm Posted March 26, 2008 Author Share Posted March 26, 2008 Sorry, don't know. Please reference the MSComm and NetComm documentation. 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...
mashenden Posted April 3, 2008 Share Posted April 3, 2008 (edited) Please have mercy. I am trying to make a script that detects ringing on the phone line related to the internal modem. I have looked at MS and NETComm, and Googled my fingers raw, but the problem is I am still learning. I only have one AutoIt script under my belt (posted yesterday as iTunes Launch by mashenden) so I am making progress but still very much on the learning curve. The trouble with reading the explanations is it looks a bit like Greek to me. Anyways, enough excuses. Here is what I have (much to this post's credit)... ; Set a COM Error handler -- only one can be active at a time (see helpfile) $oMyError = ObjEvent("AutoIt.Error", "MyErrFunc") $com = ObjCreate ("NETCommOCX.NETComm") With $com .CommPort = 3 .PortOpen = True .Settings = "9600,N,8,1" .InBufferCount = 0 EndWith Dim $done While Not $done Select Case comEvRing ' Change in the Ring Indicator. MsgBox(0, "Notice", "Detected Ringing on: " );& $com.CommPort) $done = 1 Case Else Sleep(250) EndSelect WEnd $com.Output = "ATH" & @CR $com.PortOpen = False $com = 0 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;==>MyErrFunc What am I doing wrong with respect to either the use of Case or comEvRing? Edited April 3, 2008 by mashenden Link to comment Share on other sites More sharing options...
mashenden Posted April 3, 2008 Share Posted April 3, 2008 Maybe another way to get me where I would like to be in learning the fundamentals is to explain how to integrate the code provided by JoseLB in the post on Mar 2, 2006 @ 2:16 pm into the "freeware NET Comm example" initially provided by DaleHohm. Or even suggest a good place to relearn the programming basics (pun intended - I used to do a lot of programming but things have changed and I am very rusty but will learn quickly. I need to understand how Case and Func work, mainly what the things in the () do, and how to establish the main part of the script in a loop while checking the modem using Case or Func or whatever. Please invest time in me as I will repay by posting my results in a well documented fashion so others can use and learn. If this should be posted in the General Support forum, let me know. Since the questions relate closely to this script, I figured this was OK. Matt A Link to comment Share on other sites More sharing options...
mashenden Posted April 3, 2008 Share Posted April 3, 2008 This is helping me.http://www.edgeofnowhere.cc/viewtopic.php?p=1166419If there is something better I am open to suggestions... Link to comment Share on other sites More sharing options...
mashenden Posted April 3, 2008 Share Posted April 3, 2008 I think I am OK with respect to Case, While, loops, etc. It must be my lack of understanding on the ObjCreate. Any good references on this? Is anyone out there? Hello, hello... Link to comment Share on other sites More sharing options...
DaleHohm Posted April 3, 2008 Author Share Posted April 3, 2008 You'll get more attention with a new post. 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...
Rambo Posted January 21, 2010 Share Posted January 21, 2010 Hey there! I´ve tried this script using my PCI modem, and two USB modems with no success. Does this script may be used with a serial cable port? Thanks Link to comment Share on other sites More sharing options...
DaleHohm Posted January 22, 2010 Author Share Posted January 22, 2010 NetComm and MSComm work with COM1, COM2 etc serial ports. 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...
Rambo Posted March 2, 2010 Share Posted March 2, 2010 Dale, how could i send Ctrl-Z keystroke via COM? I can send "AT+CMGS=123456789 & @CR" (123456789 is the phone number) but then i need to enter the string for the text and Ctrl-Z at the end to indicate it(@CR is no use) Any idea? Thanks Link to comment Share on other sites More sharing options...
martin Posted March 2, 2010 Share Posted March 2, 2010 Dale, how could i send Ctrl-Z keystroke via COM?I can send "AT+CMGS=123456789 & @CR" (123456789 is the phone number)but then i need to enter the string for the text and Ctrl-Z at the end to indicate it(@CR is no use)Any idea?ThanksJust add the Ascii code for Ctrl Z "AT+CMGS=123456789" & Chr(26)You can find that in any Ascii table, but the control codes are simply Ctl A = 1, Ctrl B = 2 ... Ctrl Z = 26 mLipok 1 Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script. Link to comment Share on other sites More sharing options...
Rambo Posted March 3, 2010 Share Posted March 3, 2010 Thanks Martin, Now i can send SMS using autoit Code based on Dale´s app 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