Jump to content

Another Question


Recommended Posts

I need to know how to make it start...paused i guess. When i open my script it clicks where i want it to, but i need some time to open the window its clicking for back up. So is there a way to start the script paused?

A second question. How do i make a button on a GUI do what i want it to? Ex: i want the ok button to start my script, I've read the help files and i sort of understand, but could someone show me an example of how i could make my "OK" button to start the script, and my "Exit" button to close the GUI and script?

Thanks!

Link to comment
Share on other sites

  • Moderators

Sounds like you need a:

Mouseclick("left", $xcoord, $ycoord, 1, 1)
Sleep(500)
If WinExist("Your title of window your waiting for") Then
Sleep(500)
; The rest of your script here
Endif

And for the button:

While 1
   $msg = GUIGetMsg()
   Select
      Case $msg = $GUI_EVENT_CLOSE
         ExitLoop
      Case $msg = $Button_1
      ; what you want the button to do
   EndSelect
Wend

Edit: Forgot an EndSelect!!

Edited by ronsrules

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

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