Jump to content

Hi im new and im a noob, please help me


 Share

Recommended Posts

hi im new in this :D and i want to know if with autoit can be make a scrip which send a key, for example 2, indefinitely, all the time sending the key "2" but with a timer, for example every 40 s. Is it possible?how? thanks and sorry for my question its too "nooby" but i just started with a3

Link to comment
Share on other sites

Yes autoit can:

While 1
send ("2")
Sleep (40000)
Wend

Also next time make your topic title more descriptive, and show us some code that you have tried. Do you have scite yet? If not, download it and also look through the autoit helpfile.

Edit: is autoit sleep in seconds? been a while

Edit2: dam too slow

Edited by sccrstvn93
Link to comment
Share on other sites

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

Global $Paused, $Runner, $begin
HotKeySet("{PAUSE}", "TogglePause")
HotKeySet("{ESC}", "Terminate")
HotKeySet("{F9}", "ShowMe") 

;;;; Body of program would go here ;;;;
While 1
    Sleep(10)
    If $Runner Then
        $dif = Int(TimerDiff($begin)/1000)
        If $dif >= 40 Then
            Send("2")
            $begin = TimerInit()
        EndIf
    EndIf
WEnd
;;;;;;;;

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

Func Terminate()
    Exit 0
EndFunc

Func ShowMe()
    $Runner = Not $Runner
    $begin = TimerInit()
EndFunc

w..tiamw

8)

NEWHeader1.png

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