AutoHotkey Community

It is currently May 25th, 2012, 7:33 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 16 posts ]  Go to page 1, 2  Next
Author Message
PostPosted: October 12th, 2007, 4:45 pm 
Offline

Joined: September 16th, 2006, 7:47 pm
Posts: 66
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


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 12th, 2007, 4:52 pm 
Offline

Joined: March 16th, 2005, 10:33 pm
Posts: 968
Location: Frisia
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.

:?

_________________
Image mirror 1mirror 2mirror 3ahk4.me • PM or Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 12th, 2007, 4:57 pm 
Offline

Joined: September 16th, 2006, 7:47 pm
Posts: 66
not sure i understand what you mean....
no console in warcraft 3..


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 12th, 2007, 5:21 pm 
Offline

Joined: September 16th, 2006, 7:47 pm
Posts: 66
weird part is it works in other games so not sure it has anything to do with direct x


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 12th, 2007, 5:28 pm 
hmm doesnt work in quake so i guess you are right... what do i do :/


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: October 12th, 2007, 9:44 pm 
please help :/


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: October 13th, 2007, 1:09 am 
Online
User avatar

Joined: August 30th, 2005, 8:43 pm
Posts: 8663
Location: Salem, MA
please research the use of controlsend in games.

_________________
Image
(Common Answers) - New Tutorials Forum - Humongous FAQ


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 13th, 2007, 1:19 am 
Offline

Joined: September 16th, 2006, 7:47 pm
Posts: 66
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..


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 13th, 2007, 5:38 am 
Offline

Joined: October 17th, 2006, 4:15 pm
Posts: 7501
Location: Australia
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.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 13th, 2007, 5:15 pm 
Offline

Joined: September 16th, 2006, 7:47 pm
Posts: 66
im such a noob, could you please tell me excatly how to modify my script so it works?


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 14th, 2007, 2:22 am 
Offline

Joined: October 17th, 2006, 4:15 pm
Posts: 7501
Location: Australia
Try
Code:
SetKeyDelay, , 50

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


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 14th, 2007, 10:30 am 
Offline

Joined: September 16th, 2006, 7:47 pm
Posts: 66
like this?
____

SetMouseDelay, 10, Play

WheelDown::sendplay {down 5}


Wheelup::sendplay {up 5}

____

Didnt work :(


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 14th, 2007, 12:54 pm 
Offline

Joined: October 17th, 2006, 4:15 pm
Posts: 7501
Location: Australia
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? :?


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 14th, 2007, 6:32 pm 
no neather of them work


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: October 14th, 2007, 6:36 pm 
WheelDown::
SetKeyDelay, , 50, Play
sendplay {down 5}
return

that worked! thank you so much :D even worked with 10 instead of 50


Report this post
Top
  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 16 posts ]  Go to page 1, 2  Next

All times are UTC [ DST ]


Who is online

Users browsing this forum: Baidu [Spider], dra, Google [Bot], Klark92, Pulover, rbrtryn, vsub and 3 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group