Jump to content

Repeat without while


andrew2
 Share

Recommended Posts

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

Link to comment
Share on other sites

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