Sign in to follow this  
Followers 0
VietSoJah

A Send Script

7 posts in this topic

I want to make a script that sends F1, then wait 20 seconds and then send F2 then 20 seconds again and send F2. Making it in an unlimited of time loop. I don't know how to write a script that exactly works. So could anyone teach me or could help me write this script?

Share this post


Link to post
Share on other sites



I want to make a script that sends F1, then wait 20 seconds and then send F2 then 20 seconds again and send F2. Making it in an unlimited of time loop. I don't know how to write a script that exactly works. So could anyone teach me or could help me write this script?

Umm here.

Send("{F1}")
Sleep(20000)
Send("{F2}")
Sleep(20000)
Send("{F2}")
Exit

[quote] Gilbertson's Law: Nothing is foolproof to a sufficiently talented fool.Sandro Alvares: Flaxcrack is please not noob! i can report you is stop stupid. The Post[/quote]I made this: FWD & MD5PWD()

Share this post


Link to post
Share on other sites

I want to make a script that sends F1, then wait 20 seconds and then send F2 then 20 seconds again and send F2. Making it in an unlimited of time loop. I don't know how to write a script that exactly works. So could anyone teach me or could help me write this script?

Check the HELP file all of the AutoIT3 commands are in there you need to do anything you could ever want to do.


[quote] Gilbertson's Law: Nothing is foolproof to a sufficiently talented fool.Sandro Alvares: Flaxcrack is please not noob! i can report you is stop stupid. The Post[/quote]I made this: FWD & MD5PWD()

Share this post


Link to post
Share on other sites

well from what i read u want an infinite loop, yes? well then do this

While 1;1 is always true so this will go for ever
Send("{F11}")
Sleep(20000)
Send("{F12}")
sleep(20000)
WEnd

that will send F11 sleep 20 secs, send F12 sleep 20 secs, send F11 etc for ever


AutoIt Console written in C#. Write au3 code right at the console :D_FileWriteToLineWrite to a specific line in a file.My UDF Libraries: MySQL UDF Library version 1.6 MySQL Database UDF's for AutoItI have stopped updating the MySQL thread above, all future updates will be on my SVN. The svn location is:kan2.sytes.net/publicsvn/mysqlnote: This will still be available, but due to my new job, and school hours, am no longer developing this udf.My business: www.hirethebrain.com Hire The Brain HireTheBrain.com Computer Consulting, Design, Assembly and RepairOh no! I've commited Scriptocide!

Share this post


Link to post
Share on other sites

Here is a 'Fancy' script. Just press F1 to exit. When I was just into autoit, i didn't know how to exit a script! lol. This will do what you want. And cdkid, yours doesn't work because it just press F11 and not F1 and then pauses for 20 secs, then presses F12 not F2 and doesn't wait another 20 sec. and press F2 again.

HotKeySet('{F1}', 'Exit')
;Sets the hotkey 'F1' to the function 'Exit'

While 1
;Start Loop

Send("{F1}")
;Press F1

Sleep(20000)
;Pause the script for 20000 milliseconds or 20 seconds

Send("{F2}")
;Press F2

Sleep(20000)
;Pause the script for 20000 milliseconds or 20 seconds

Send("{F2}")
;Press F2

Wend
;Exit Loop

Func
;Start a function

Exit
;Exit

EndFunc
;End the function

Share this post


Link to post
Share on other sites

Here is a 'Fancy' script. Just press F1 to exit. When I was just into autoit, i didn't know how to exit a script! lol. This will do what you want. And cdkid, yours doesn't work because it just press F11 and not F1 and then pauses for 20 secs, then presses F12 not F2 and doesn't wait another 20 sec. and press F2 again.

HotKeySet('{F1}', 'Exit')
;Sets the hotkey 'F1' to the function 'Exit'

While 1
;Start Loop

Send("{F1}")
;Press F1

Sleep(20000)
;Pause the script for 20000 milliseconds or 20 seconds

Send("{F2}")
;Press F2

Sleep(20000)
;Pause the script for 20000 milliseconds or 20 seconds

Send("{F2}")
;Press F2

Wend
;Exit Loop

Func
;Start a function

Exit
;Exit

EndFunc
;End the function
Hmm... your using F1 to exit the script, and that's the first thing your loop does is send F1, so it will exit.

Also, on Func ... you don't have a Func name.


[center]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.[/center]

Share this post


Link to post
Share on other sites

woops i thought he said send F11 then F12 not F1 & F2


AutoIt Console written in C#. Write au3 code right at the console :D_FileWriteToLineWrite to a specific line in a file.My UDF Libraries: MySQL UDF Library version 1.6 MySQL Database UDF's for AutoItI have stopped updating the MySQL thread above, all future updates will be on my SVN. The svn location is:kan2.sytes.net/publicsvn/mysqlnote: This will still be available, but due to my new job, and school hours, am no longer developing this udf.My business: www.hirethebrain.com Hire The Brain HireTheBrain.com Computer Consulting, Design, Assembly and RepairOh no! I've commited Scriptocide!

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