Jump to content

Help i am a noob :)


Recommended Posts

Hello,

i downloaded the newest version of Autoit and i set up

a code. I want a script which i can activate and stop with

the pause key. I want it to press left mouse key, press

arrow down, enter, enter. Wait 1 secound and then repeat.

this is what i got

;Script
;Activation
$answer = MsgBox(4, "Script", "Do you want to activate the script?.  Run?")
If $answer = 7 Then
    MsgBox(0, "AutoIt", "OK.  Bye!")
    Exit
EndIf
;Activate Windows
WinActivate("Firefox")
;hotkey
....
;Main function
MouseClick("left")
Send("{ENTER}")
Send("{DOWN}")
Send("{ENTER}")
Send("{ENTER}")

but its not complete.

I NEED YOUR HELP.

It would be very kind if you could complete the code!!!!!

thanks :(

Link to comment
Share on other sites

; Press Esc to terminate script, Pause/Break to "pause"

Global $Paused
HotKeySet("{PAUSE}", "TogglePause")
HotKeySet("{ESC}", "Terminate")
HotKeySet("+!d", "ShowMessage") ;Shift-Alt-d

;;;; Body of program would go here;;;;
    Sleep(100)
MouseClick("left", 1041, 423, 2)
    Sleep(100)
Send("aeroclient.exe{DOWN}")
    Sleep(100)
Send("aeroclient.exe{Enter}")
    Sleep(100)
Send("aeroclient.exe{Enter}")
    Sleep(100)
;;;;;;;;

Func TogglePause()
    $Paused = NOT $Paused
    While $Paused
        sleep(100)
        ToolTip('Script is "Paused"',0,0)
    WEnd
    ToolTip("")
EndFunc

Func Terminate()
    Exit 0
EndFunc

Func ShowMessage()
    MsgBox(4096,"","Thank you for using the 
]script!")
EndFunc

it still doesnt work plz help!

Edited by sd333221
Link to comment
Share on other sites

Obviously you didn't bother to thouroughly look at "Loop Statements". As I provided sufficient information I will not bother repeating myself.

<{POST_SNAPBACK}>

Sorry but i couldnt find the file,

where is it located? :(

Link to comment
Share on other sites

Ok my final script is:

; Press Esc to terminate script, Pause/Break to "pause"
Global $Paused
HotKeySet("{PAUSE}", "TogglePause")
HotKeySet("{ESC}", "Terminate")
HotKeySet("+!d", "ShowMessage") ;Shift-Alt-d
; Initial shit
WinActivate("Firefox")
;;;; Body of program;;;;
$i = 0
Do
MouseClick("left")
Send("{Enter}")
sleep(300)
Send("{Enter}")
sleep(300)
Send("{DOWN}")
Send("{Enter}")
sleep(300)
Send("{Enter}")
sleep(300)
Send("{Enter}")
Sleep(100)
$i = $i + 1
Until $i = 10000

;;;;;;;;
Func TogglePause()
    $Paused = NOT $Paused
    While $Paused
        sleep(100)
        ToolTip('Script is "Paused"',0,0)
    WEnd
    ToolTip("")
EndFunc

Func Terminate()
    Exit 0
EndFunc

Func ShowMessage()
    MsgBox(4096,"","Thank you for using, the script.")
EndFunc

I added "sleep(300)" commands but he doesnt sleep, he klicks

too fast. How can i make him wait? Thanks for ur great help :()

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