| View previous topic :: View next topic |
| Author |
Message |
whacko
Joined: 31 Oct 2006 Posts: 7
|
Posted: Tue Oct 31, 2006 8:28 am Post subject: new user |
|
|
i am a new user and need help with the program
how can i type a script that for example:
type the key "a"
delay for 3 secs
then type the key "p"?
any similar codes would be greatly appreciated |
|
| Back to top |
|
 |
.AHK
Joined: 26 Apr 2006 Posts: 662 Location: USA
|
Posted: Tue Oct 31, 2006 8:37 am Post subject: |
|
|
| Code: |
; Pressing "a" will delay 3 seconds and send "p" after the delay.
a::
Sleep 3000
Send p
Return
; Pressing "s" will send "o" instead.
s::o
; Pressing "d" will sleep 200ms, and send "i" 5 times.
d::
Loop 5 {
Sleep 200
Send i
}
Return |
These simple examples should help you. If you have any questions just ask. |
|
| Back to top |
|
 |
whacko
Joined: 31 Oct 2006 Posts: 7
|
Posted: Tue Oct 31, 2006 8:48 am Post subject: |
|
|
| can these codes work in windows media player and game programs? |
|
| Back to top |
|
 |
.AHK
Joined: 26 Apr 2006 Posts: 662 Location: USA
|
Posted: Tue Oct 31, 2006 9:18 am Post subject: |
|
|
| Quote: | | can these codes work in windows media player and game programs? |
They should work in most applications. If it does not work on a game you can try "SendPlay" instead of "Send" and see if that works. By the way, a lot of games with online play block this type of artificial input. |
|
| Back to top |
|
 |
whacko
Joined: 31 Oct 2006 Posts: 7
|
Posted: Tue Oct 31, 2006 9:21 am Post subject: |
|
|
| is it possible to get round with these blocks? |
|
| Back to top |
|
 |
BoBo Guest
|
Posted: Tue Oct 31, 2006 9:26 am Post subject: |
|
|
| Quote: | | is it possible to get round with these blocks? | Yes. Get in touch with its developers. Ask that they remove their anti-cheating-protection. Good luck.  |
|
| Back to top |
|
 |
whacko
Joined: 31 Oct 2006 Posts: 7
|
Posted: Tue Oct 31, 2006 12:30 pm Post subject: |
|
|
yes that is a very good solution
i will look into that
how do i make an infinite loop? |
|
| Back to top |
|
 |
LoSinG_LoSeR
Joined: 12 Jun 2006 Posts: 61
|
Posted: Tue Oct 31, 2006 12:44 pm Post subject: |
|
|
| Code: | Loop {
Send, a
sleep, 200
} |
Loop |
|
| Back to top |
|
 |
whacko
Joined: 31 Oct 2006 Posts: 7
|
Posted: Tue Oct 31, 2006 1:44 pm Post subject: |
|
|
| thanks |
|
| Back to top |
|
 |
Guest
|
Posted: Tue Oct 31, 2006 1:48 pm Post subject: |
|
|
iŽd prefer
| Code: | Loop
{
Tooltip %A_Index%
} |
for an example
^^ |
|
| Back to top |
|
 |
whacko
Joined: 31 Oct 2006 Posts: 7
|
Posted: Wed Nov 01, 2006 2:55 pm Post subject: |
|
|
| how do i stop an infinite loop? like for example hitting a key to stop the loop |
|
| Back to top |
|
 |
neyon
Joined: 29 May 2005 Posts: 34 Location: The Netherlands
|
Posted: Wed Nov 01, 2006 3:06 pm Post subject: |
|
|
Read the perfect manual, Whacko  _________________ Greetz,
Neyon |
|
| Back to top |
|
 |
whacko
Joined: 31 Oct 2006 Posts: 7
|
Posted: Wed Nov 01, 2006 3:08 pm Post subject: |
|
|
| the help section only provide a way to break the loop which is setting the number of loops |
|
| Back to top |
|
 |
LoSinG_LoSeR
Joined: 12 Jun 2006 Posts: 61
|
Posted: Wed Nov 01, 2006 3:16 pm Post subject: |
|
|
| Code: | Loop
{
GetKeyState, akeystate, a ;Checks the keystate for 'a'
If Akeystate = D ;If the keyState is 'down'
Break ;Then break the loop
Tooltip %A_Index%
} |
Thank you 'Guest' for helping a noob help a noob ^_^ |
|
| Back to top |
|
 |
|