Jump to content

not planning on doing much...


Guest Singularis
 Share

Recommended Posts

Guest Singularis

i heard about this language from a friend who said it was great for making macros, and i was like "yay, i need macros". so i started lookin into it, and i was like "yay, another programming language to learn!" then after a while, i was thinking, "shit, another language to learn." i dont need alot to be done, all i need is for this to run in the background and press "2" every x amount of seconds, where x is easily modified. could someone be so kind as to write me a little program to do this for me?

[edit] it would be great if it had an exit script button also, but im sure thats assumed. F12 would do fine.

Edited by Singularis
Link to comment
Share on other sites

Well it is really simple to learn. here is an example.

Hotkeyset("{F12}","endthis") ; sets a hotkey to run function

Sleep(10000); start in 10 seconds
while 1; this starts a loop
send("2"); this is what key to press
sleep(2000); wait 2 seconds before continuing
wend; this starts the loop over W(hile)END

func endthis(); this is a funtion
exit ; exits program
endfunc
Edited by scriptkitty

AutoIt3, the MACGYVER Pocket Knife for computers.

Link to comment
Share on other sites

Wow, lol scriptkitty explains it well. You got lotsa comments in there:)

My site for HTML Help :)[quote name='Valik' date='Oct 15 2004, 12:29 PM']Maybe nobody is an "elite uber-coder" like me because thinking is a capital offense in today's online-world?[right][snapback]36427[/snapback][/right][/quote]
Link to comment
Share on other sites

Personally I like to just pause my macros, so I use pause key :)

Hotkeyset("{pause}","pausethis"); sets a hotkey to run function
$x=1
pausethis(); starts it paused
while 1; this starts a loop
send("2"); this is what key to press
sleep(2000); wait 2 seconds before continuing
wend; this starts the loop over W(hile)END

func pausethis(); this is a funtion
$x=NOT $X
while NOT $x
sleep(1)
tooltip("Paused",0,0)
wend
endfunc

heh heh, well if I can't make you try, I can stuff code with info. :)

Edited by scriptkitty

AutoIt3, the MACGYVER Pocket Knife for computers.

Link to comment
Share on other sites

Guest Singularis

Hotkeyset("{F12}","endthis"); sets a hotkey to run function
thanks, this does exactly what i want it to do, but i dont think my exit key is working properly
Link to comment
Share on other sites

Hotkeyset("{pause}","pausethis") ;sets a hotkey to run function
$x=1               ;Dimentions and gives value to $x
pausethis()       ;starts it paused
while 1            ;this starts a loop
send("2")         ; this is what key to press
sleep(2000)        ; wait 2 seconds before continuing
wend                ; this starts the loop over W(hile)END

; a function is like a little program or subroutine that runs when called
; in this case it is called every time you hit the hot key.
; it is ignored until called.

func pausethis()  ; this is a funtion
$x=NOT $X         ;this changes $x to NOT $X   Logical think multiply by -1
while NOT $x       ; if 1 then -1 if -1 then 1, see
sleep(1)              ; just a really fast pause for CPU
tooltip("Paused",0,0); show newer versions of windows a tip that it is paused
wend                   ; same as above
endfunc               ; ends the function and goes back to program

I think it is far easier to read without the comments, but..

Edited by scriptkitty

AutoIt3, the MACGYVER Pocket Knife for computers.

Link to comment
Share on other sites

Guest Singularis

thanks guys, i was able to mod it to fit my needs just fine. couldnt get the pause to work right, so i just set it to run a 10 sec timer at the very beginning.

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