Jump to content

_CommGetLineStates()


ajit
 Share

Recommended Posts

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
Link to comment
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.
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...