Jump to content

pause just like batch script


Recommended Posts

A blocking function like a MsgBox() would work.

Else using some sort of loop would be a more complicated way to do it but can be done with no on screen pop ups.

 

Send("{TAB 4}")
MsgBox(0, "", "Pause #1")
ShellExecute($vCode)

 

#Include <Misc.au3>

Send("{Tab 4}")
While 1
Sleep(10)
If _IsPressed("0D") Then ExitLoop ;Enter Key
WEnd

ShellExecute($vCode)

You could then convert the later into a function to reuse it easy.

#Include <Misc.au3>

MsgBox(0, "", "Start Script")
Pause()
MsgBox(0, "", "End Script")

Func Pause()
    While 1
        Sleep(10)
        If _IsPressed("0D") Then Return
    WEnd
EndFunc

 

Edited by ViciousXUSMC
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...