Jump to content

Need pause and continue button in the script


Recommended Posts

#include <GUIConstants.au3>

$Main = GUICreate("Example", 117, 117, 303, 219)

$Input1 = GUICtrlCreateInput("0", 40, 40, 33, 21)

$OK = GUICtrlCreateButton("OK", 40, 64, 33, 17, 0)

GUISetState(@SW_SHOW)

While 1

$nMsg = GUIGetMsg()

Switch $nMsg

Case $GUI_EVENT_CLOSE

Exit

Case $OK

text()

EndSwitch

WEnd

Func text()

Local $times

Do

$times += 1

sleep(300)

MouseMove(1170, 131)

MouseClick("left")

sleep(300)

send("{f2}")

sleep(300)

send("+{HOME}")

sleep(100)

Send("^c")

MouseMove(216, 95)

MouseClick("left")

sleep(1000)

Send("^v")

sleep(1000)

send("!d")

sleep(1000)

send("!{tab}")

sleep(300)

MouseMove(1170, 131)

MouseClick("left")

Send('{ESC}')

send("^-")

send ("{enter}")

Until $times = GUICtrlRead($Input1)

EndFunc

this above im trying to use for copying value from excel and pasting in third party application, i need pause and continue gui button and some keys to pause and continue the script. please help.

Link to comment
Share on other sites

  • Moderators

davidbl, we do not spoon feed code to you, but we are happy to assist. Look at GUICtrlCreateButton in the help file. Once you figure out how to place the buttons on your GUI, look at the example under GUICtrlCreateButton to show you how to add it in to your Case statement.

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to comment
Share on other sites

  • Moderators

Glad to help. Once you have something, if you run into trouble, feel free to post here and we'll do our best to help :)

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

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