Sign in to follow this  
Followers 0
ajit

_CommGetLineStates()

3 posts in this topic

#1 ·  Posted (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 by ajit

Share this post


Link to post
Share on other sites



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

@martin

That works fine. Thanks very much for the help.

Regards,

Ajit

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0