Jump to content

Interesting observations on **GetMsg() blocking functions


AutoXenon
 Share

Recommended Posts

#NoTrayIcon

Opt("GUIOnEventMode", 1)
Global $hWnd = GUICreate('')
GUISetState()
GUISetOnEvent(-3,Quit)

local $i=0
Do
   WinSetTitle($hWnd,'',$i)
   $i+=1
Until TrayGetMsg()=-3

Func Quit()
     Exit
EndFunc

This seems to tick roughly every 16ms, a default Idle rate.

 

 

#NoTrayIcon

Global $hWnd = GUICreate('')
GUISetState()

local $i=0
Do
   WinSetTitle($hWnd,'',$i)
   $i+=1
Until GUIGetMsg()=-3

This also seems to tick every 16ms when idle, but if you start moving your mouse or generate window messages in some way, they increment much faster based on how quickly AutoIt comes out of idle.

 

 

Conclusion: the **GetMsg() functions are blocking but does come out of hibernation at a guaranteed idle interval

Edited by AutoXenon
Link to comment
Share on other sites

  • AutoXenon changed the title to Interesting observations on **GetMsg() blocking functions

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...