Sign in to follow this  
Followers 0
sheck

Gui And Loop Problem

11 posts in this topic

#1 ·  Posted (edited)

I noticed that when I create GUI window with a While.....Wend loop the script is being paused if I click and hold my mouse down on GUI window. If you performe timed commands such as Adlibenable, this is really annoying.

Is there a way to go around that ?

Edited by sheckandar

Live and Learn, 'cause Knowledge is Super Power.

Share this post


Link to post
Share on other sites



Can you post an example script?

Share this post


Link to post
Share on other sites

In the example below we have While....Wend loop and AdlibEnable function. If I click and hold my left mouse button down on GUI window, script is paused for as long as I hold the left mouse button.

#include<GUIConstants.au3>
  
  AdlibEnable("message", 4000)
  
  GUICreate("Test GUI", 200, 200, -1 , -1)
  GUISetState()
  
  While 1
      $msg = GUIGetMsg()
      Select
      Case $msg = $GUI_EVENT_CLOSE
          Exit
      EndSelect
      Sleep(2000)
      MsgBox(64, "Test", "This box is in While 1 loop", 3)
  WEnd
  
  Func message()
  MsgBox(64, "Test2", "This box is in message() function", 3)
  EndFunc

Live and Learn, 'cause Knowledge is Super Power.

Share this post


Link to post
Share on other sites

In the example below we have While....Wend loop and AdlibEnable function. If I click and hold my left mouse button down on GUI window, script is paused for as long as I hold the left mouse button.

#include<GUIConstants.au3>
  
  AdlibEnable("message", 4000)
  
  GUICreate("Test GUI", 200, 200, -1 , -1)
  GUISetState()
  
  While 1
      $msg = GUIGetMsg()
      Select
      Case $msg = $GUI_EVENT_CLOSE
          Exit
      EndSelect
      Sleep(2000)
      MsgBox(64, "Test", "This box is in While 1 loop", 3)
  WEnd
  
  Func message()
  MsgBox(64, "Test2", "This box is in message() function", 3)
  EndFunc

Not on my laptop it doesn't, it keeps running

Share this post


Link to post
Share on other sites

Not on my laptop it doesn't, it keeps running

I thought that at first also...

did you click and hold the mouse on the upper window title-bar...

thats when i noticed he is correct

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

Not on my laptop it doesn't, it keeps running

Doesnt hang on my laptop or my other 2 computers here. Not sure why yours would pause like that.

EDIT: TYPO

Edited by Don N

_____________________________________________________"some people live for the rules, I live for exceptions"Wallpaper Changer - Easily Change Your Windows Wallpaper

Share this post


Link to post
Share on other sites

click and hold the title bar then move the window around.. you will see

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites

click and hold the title bar then move the window around.. you will see

8)

Ha!!, I've never noticed that...

[center]Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.[/center]

Share this post


Link to post
Share on other sites

Ha!!, I've never noticed that...

I guest since no one noticed it before, it's not such a big deal.

But I would still like to know if there is a way around that.


Live and Learn, 'cause Knowledge is Super Power.

Share this post


Link to post
Share on other sites

#10 ·  Posted

I guest since no one noticed it before, it's not such a big deal.

But I would still like to know if there is a way around that.

Have you thought of making your own title bar?

[center]Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.[/center]

Share this post


Link to post
Share on other sites

#11 ·  Posted

Have you thought of making your own title bar?

I have, but it happens with any control in GUI window, such as scroll bar or a label.


Live and Learn, 'cause Knowledge is Super Power.

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