Jump to content
Sign in to follow this  
Okami

F1 KeyPress

Recommended Posts

Okami

First post and it is a question :D

I dont know nothing about scripting, my friend told me that what i want to do could be done with AutoIT

what i want to do looks simple

When i press PageUP it starts a function in witch the key F1 is pressed 27 time with 6 seconds interval, then after the key F1 is pressed 27 time

the key F2 is pressed 4 time with nearly no interval, only some milesconds, and it keeps going on and on the function only stops when i press PageDOWN

i tried to do something like it on VB 2008 Express , but i dont know anything about programming

Can someone help me please?

Edited by Okami

Share this post


Link to post
Share on other sites
Sobiech

When i press PageUP it starts a function in witch the key F1 is pressed 27 time with 6 seconds interval, then after the key F1 is pressed 27 time

the key F2 is pressed 4 time with nearly no interval, only some milesconds, and it keeps going on and on the function only stops when i press PageDOWN

HotkeySet("{PGUP}", "_Start")
HotkeySet("{PGDN}", "_Exit")

$F1Time = 6000
$F4Time = 40

Func _Start()
While 1
For $i=1 To 27 Step 1
Send("{F1}")
Sleep($F1Time)
Next

For $j=1 To 4 Step 1
Send("{F4}")
Sleep($F4Time)
Next
WEnd
EndFunc

Func _Exit()
Exit
EndFunc

Should work


This world is crazy

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  

×