Sign in to follow this  
Followers 0
andrew2

Repeat without while

9 posts in this topic

#1 ·  Posted (edited)

the script recieves a message from the internet and shows it in the dialogbox

my problem the script should keep doing that every 2 min

i kept trying it with a while function

but now if the while function is active the script is not reacting to anything i cant close or do anything else

i uploaded the scriptfile so you can see what i mean just execute in scite

Edited by andrew2

Share this post


Link to post
Share on other sites



...

but now if the while function is active the script is not reacting to anything i cant close or do anything else

....

You have alternatives to exit an "While".

$nExit= 1
HotKeySet("^!d", "_SetExit")

While $nExit
    ToolTip("Inside function: Press CTRL+ALT+D for exit of 'While'")
    Sleep(100)
WEnd
MsgBox(0, "", "I'm out!")
Exit

Func _SetExit()
    $nExit= 0
EndFunc

Share this post


Link to post
Share on other sites

You have alternatives to exit an "While".

$nExit= 1
HotKeySet("^!d", "_SetExit")

While $nExit
    ToolTip("Inside function: Press CTRL+ALT+D for exit of 'While'")
    Sleep(100)
WEnd
MsgBox(0, "", "I'm out!")
Exit

Func _SetExit()
    $nExit= 0
EndFunc
i never though about hotkeys thx :) i will try

Share this post


Link to post
Share on other sites

i tried but the while is still going on i reattched the script

test.au3


Share this post


Link to post
Share on other sites

actually...

...
  Func getmsgs()
            $nExit= 1
      While $nExit
...
yes that worked :) i just forgot to set it global thanks dude my script is ready to get finished :)

Share this post


Link to post
Share on other sites

is it also possible to do that via a button or are only hotkeys working then ?


Share this post


Link to post
Share on other sites

is it also possible to do that via a button or are only hotkeys working then ?

Of course. Thru a button could be another alternative. Or simply clicking the 'X' button in your window, setting the close event*.

E.g.:

GUISetOnEvent($GUI_EVENT_CLOSE, "_SetExit")

*More details here.

Share this post


Link to post
Share on other sites

#9 ·  Posted (edited)

Of course. Thru a button could be another alternative. Or simply clicking the 'X' button in your window, setting the close event*.

E.g.:

GUISetOnEvent($GUI_EVENT_CLOSE, "_SetExit")

*More details here.

EDIT : I tried but the script is keep going so ill keep it like it is with a nice hotkey :) Edited by andrew2

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