ajit 0 Posted August 27, 2011 (edited) Hi, This is regarding Martin's Serial Port UDF. I want to poll _CommGetLineStates() continuously. Is there a way other than to use AdlibRegister or putting _CommGetLineStates()in a While Loop as these methods stop the polling as soon as the script is paused for example with a Message Box? Thanking in anticipation Regards Ajit Edit: Sorry, I posted in wrong forum, please transfer to correct forum. Edited August 27, 2011 by ajit Share this post Link to post Share on other sites
martin 85 Posted August 28, 2011 Hi, This is regarding Martin's Serial Port UDF. I want to poll _CommGetLineStates() continuously. Is there a way other than to use AdlibRegister or putting _CommGetLineStates()in a While Loop as these methods stop the polling as soon as the script is paused for example with a Message Box? Thanking in anticipation Regards Ajit Edit: Sorry, I posted in wrong forum, please transfer to correct forum. Use a timer. #include <timers.au3> Global $hMB, $iCount $t1 = _Timer_SetTimer(0, 500, "UpdateMsgbox") MsgBox(262144, "Title Number 1", "The timer is still working!") _Timer_KillTimer(0,$t1) exit Func UpdateMsgbox($a, $b, $c, $d);must have parameters or func will not work even though they are not used If $hMB = '' Then $hMB = WinGetHandle("Title Number") $iCount += 1 WinSetTitle($hMB, "", "Title Number " & $iCount) EndFunc ;==>UpdateMsgbox $ 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. Share this post Link to post Share on other sites
ajit 0 Posted August 28, 2011 @martin That works fine. Thanks very much for the help. Regards, Ajit Share this post Link to post Share on other sites