Jump to content
Sign in to follow this  
4ggr35510n

Script pauses when gui windows is moving....

Recommended Posts

4ggr35510n

Greeting.

I hope you're familiar with problem... Although I couldn't find any anwser in FAQ/help/search...

When I'm moving main gui window, whole script pauses and no functions/commands are executed.

Is there any way to avoid this?

Something smarter then "don't move gui window"?

Is there any way to implement some kind of multithreading in autoit?

Some super-sample code here:

$gui = GuiCreate("")
GuiSetState()

Do
    ToolTip("text", Random(0, @DesktopWidth, 1), Random(0, @DesktopHeight, 1))
Until GuiGetMsg() = -3

BR,

4gr

Edited by 4ggr35510n

Share this post


Link to post
Share on other sites
4ggr35510n

Bump.

I would really appreciate any tips or advices =]

Share this post


Link to post
Share on other sites
water

I tested "EventMode" but that doesn't make any difference. Must be a thing of the operating system.

#include <GUIConstantsEx.au3>
Opt("GUIOnEventMode", 1) ; Change to OnEvent mode
$gui = GuiCreate("")
GUISetOnEvent($GUI_EVENT_CLOSE, "CLOSEClicked")
GuiSetState()

While 1=1
    Sleep(10)
    ToolTip("text", Random(0, @DesktopWidth, 1), Random(0, @DesktopHeight, 1))
WEnd

Func CLOSEClicked()
 ;Note: at this point @GUI_CTRLID would equal $GUI_EVENT_CLOSE,
 ;and @GUI_WINHANDLE would equal $mainwindow
 MsgBox(0, "GUI Event", "You clicked CLOSE! Exiting...")
 Exit
EndFunc

EDIT: This thread may shed some light on the subject - it seems to be a Windows thing and you will have to live with it ;)

Edited by water

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.