| View previous topic :: View next topic |
| Author |
Message |
fenix
Joined: 16 Sep 2006 Posts: 21
|
Posted: Fri Oct 12, 2007 4:45 pm Post subject: Problem with wheel down and wheel up please help |
|
|
SendMode Input
setbatchlines, -1
WheelDown::sendinput {down}
WheelUp::sendinput {up}
ok so thats my script, it works in windows but when i tab in game (warcraft 3) the wheel down doesnt work |
|
| Back to top |
|
 |
daonlyfreez
Joined: 16 Mar 2005 Posts: 745 Location: Berlin
|
Posted: Fri Oct 12, 2007 4:52 pm Post subject: |
|
|
Many times AHK's hotkeys do not work in DirectX/OpenGL games. On scripting the settings/in-game console you might have luck however. Depends.
 _________________ (sorry, homesite offline atm) |
|
| Back to top |
|
 |
fenix
Joined: 16 Sep 2006 Posts: 21
|
Posted: Fri Oct 12, 2007 4:57 pm Post subject: |
|
|
not sure i understand what you mean....
no console in warcraft 3.. |
|
| Back to top |
|
 |
fenix
Joined: 16 Sep 2006 Posts: 21
|
Posted: Fri Oct 12, 2007 5:21 pm Post subject: |
|
|
| weird part is it works in other games so not sure it has anything to do with direct x |
|
| Back to top |
|
 |
Guest
|
Posted: Fri Oct 12, 2007 5:28 pm Post subject: |
|
|
| hmm doesnt work in quake so i guess you are right... what do i do :/ |
|
| Back to top |
|
 |
Guest
|
Posted: Fri Oct 12, 2007 9:44 pm Post subject: |
|
|
| please help :/ |
|
| Back to top |
|
 |
engunneer
Joined: 30 Aug 2005 Posts: 6772 Location: Pacific Northwest, US
|
Posted: Sat Oct 13, 2007 1:09 am Post subject: |
|
|
please research the use of controlsend in games. _________________
Unless otherwise noted, all code is untested.
Common Answers: 1.(Loops, Viruses, etc.) 2. Search 3.RTFM |
|
| Back to top |
|
 |
fenix
Joined: 16 Sep 2006 Posts: 21
|
Posted: Sat Oct 13, 2007 1:19 am Post subject: |
|
|
i have spend atleast 5 hours searching forums and autohotkey help for info with no luck so far =/
edit: hmm been looking into this controle send, dont really understand how it works.. |
|
| Back to top |
|
 |
Lexikos
Joined: 17 Oct 2006 Posts: 2558 Location: Australia, Qld
|
Posted: Sat Oct 13, 2007 5:38 am Post subject: |
|
|
Often SetKeyDelay is the answer. See the manual for usage.
| Quote: | | SetKeyDelay [, Delay, PressDuration, Play] |
| SetKeyDelay wrote: | | Certain games and other specialized applications may require a delay inside each keystroke; that is, after the press of the key but before its release. |
|
|
| Back to top |
|
 |
fenix
Joined: 16 Sep 2006 Posts: 21
|
Posted: Sat Oct 13, 2007 5:15 pm Post subject: |
|
|
| im such a noob, could you please tell me excatly how to modify my script so it works? |
|
| Back to top |
|
 |
Lexikos
Joined: 17 Oct 2006 Posts: 2558 Location: Australia, Qld
|
Posted: Sun Oct 14, 2007 2:22 am Post subject: |
|
|
Try
| Quote: | | Note: SetKeyDelay is not obeyed by SendInput; there is no delay between keystrokes in that mode. This same is true for Send when SendMode Input is in effect. |
Also try using SendPlay instead of Send (assuming you don't have SendMode,Play.) To set key delay for SendPlay (may not be necessary):
| Quote: | SendPlay does not use the standard settings of SetKeyDelay and SetMouseDelay. Instead, it defaults to no delay at all, which can be changed as shown in the following examples:
| Code: | SetKeyDelay, 0, 10, Play ; Note that both 0 and -1 are the same in SendPlay mode.
SetMouseDelay, 10, Play |
|
|
|
| Back to top |
|
 |
fenix
Joined: 16 Sep 2006 Posts: 21
|
Posted: Sun Oct 14, 2007 10:30 am Post subject: |
|
|
like this?
____
SetMouseDelay, 10, Play
WheelDown::sendplay {down 5}
Wheelup::sendplay {up 5}
____
Didnt work  |
|
| Back to top |
|
 |
Lexikos
Joined: 17 Oct 2006 Posts: 2558 Location: Australia, Qld
|
Posted: Sun Oct 14, 2007 12:54 pm Post subject: |
|
|
No. | Quote: | SetMouseDelay
Sets the delay that will occur after each mouse movement or click. | This refers to MouseMove, MouseClick, Click, etc. (simulating mouse input), not mouse hotkeys. You are sending keyboard input, so try SetKeyDelay. Also, 10 milliseconds may not be enough.
It can be called from the auto-execute section to set the default: | Code: | | SetKeyDelay, , 50, Play |
or in the hotkey itself: | Code: | WheelDown::
SetKeyDelay, , 50, Play
sendplay {down 5}
return | Note that it is the second parameter, PressDuration, not Delay.
Then again, looking at this script for Warcraft III, it doesn't seem to need anything special for Send to work. It seems to use the default send mode (SendEvent) - have you tried your script without SendMode Input, and Send or SendEvent instead of SendInput?
Rereading your original post, you say wheel down doesn't work. Does that mean | Code: | | WheelUp::sendinput {up} | does work? And WheelDown should send {down} but doesn't?  |
|
| Back to top |
|
 |
Guest
|
Posted: Sun Oct 14, 2007 6:32 pm Post subject: |
|
|
| no neather of them work |
|
| Back to top |
|
 |
Guest
|
Posted: Sun Oct 14, 2007 6:36 pm Post subject: |
|
|
WheelDown::
SetKeyDelay, , 50, Play
sendplay {down 5}
return
that worked! thank you so much even worked with 10 instead of 50 |
|
| Back to top |
|
 |
|