Jump to content

If.. Then.. Continue Script


Recommended Posts

I don't have to say anything, just see below:

HotKeySet("^!x", "_exit")

While 1
    If WinExists("window1") Then
        Send("!n")
    EndIf
    If WinExists("window2") Then
        Sleep(1000)
        Send("something{ENTER}")
    EndIf
WEnd

Func _exit()
    $msg = MsgBox(1, "Exit Script", "Are you sure?")
    If $msg = 1 Then
        Exit
    ElseIf $msg = 2 Then
    ;??? What do I have to do to continue script?
    EndIf
EndFuncoÝ÷ Øî±ëaÆ®¶­sdgVæ2öWB b33c¶×6rÒ×6t&÷ÂgV÷C´WB67&BgV÷C²ÂgV÷C´&R÷R7W&SògV÷C² bb33c¶×6rÒFVà W@ VÇ6Tbb33c¶×6rÒ"FVà ²fÇC²fÇC²fÇC²fÇC²fÇC²fÇC²fÇC²fÇC²bFöâb33·B6çFærW&RÂæ÷FærvÆÂVç2ÂFR67&BvÆÂ6öçFçVRà VæD`¤VæDgVæ

It is ok to leave it empty after "ElseIf $msg = 2 Then", but is there anything that I can do?

Edited by Hello Me You
Random
Link to comment
Share on other sites

Try this:

HotKeySet("^!x", "_exit")

While 1
    If WinExists("window1") Then
        Send("!n")
    EndIf
    If WinExists("window2") Then
        Sleep(1000)
        Send("something{ENTER}")
    EndIf
WEnd

Func _exit()
    $msg = MsgBox(1, "Exit Script", "Are you sure?")
    If $msg = 1 Then
        Exit
    EndIf
EndFunc

Will contiue the script if cancel is pressed... :whistle: hope it helps

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