Sign in to follow this  
Followers 0
casio

Hi im new and im a noob, please help me

7 posts in this topic

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

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Now that is simple:

while 1
Send("2")
Sleep(40000)
WEnd

And for your future scripting experience, read the entire Language Reference in the help file. It will get you some of the basic concepts of programming! :D

Edited by monoceres

Broken link? PM me and I'll send you the file!

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

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

Share this post


Link to post
Share on other sites

Haha. Both of you are wrong :D

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

Share this post


Link to post
Share on other sites

ok thats wat i thought. milliseconds not seconds (or watever those are).

Share this post


Link to post
Share on other sites

Haha. Both of you are wrong :D

While 1
     Send("2")
     Sleep(40000)
Wend
No I'm not :D (What do you mean by edit?)

Broken link? PM me and I'll send you the file!

Share this post


Link to post
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

Share this post


Link to post
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
Sign in to follow this  
Followers 0