AutoHotkey Community

It is currently May 27th, 2012, 1:39 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 4 posts ] 
Author Message
PostPosted: June 11th, 2009, 1:48 am 
Offline

Joined: May 17th, 2009, 11:37 am
Posts: 51
here is what I want to do

In a directx game (not full screen) when i press hotkey F3
the mouse will move 50 pixel right .

Code:
$f3::
stop = 0
loop, 1
{
MouseMove, 50, 0, 100, R

 if stop
   break
}
return


but the problem with this, is that sometimes the cursor doesn't listen to me, etc, i ask it to move 50 pixel left the mouse went 120 pixel left.

----------
and if I try to move the cursor to certain location in the window

MouseMove, x, y, 100

every time the outcome is different.

(it seems that the game emulate another mouse)

===================

So then i remember windows has a tool allows keyboard to control move movements,, (mouse keys). I tested manually its really accurate and useful.

But when I try write the script to autokey I couldnt do it.

for example when I manually press ctrl num6 , it will move left a lil bit.
then I write this code



Code:
$f4::
stop = 0
loop, 1
{
Send, {CTRL DOWN}
send, {Numpad6 down}   
send, {Numpad6 up}         
Send, {CTRL UP}

 if stop
   break
}
return


and when i press f4, nothing happened. what went wrong?



help~ so does anyone knows how to move a mouse in a directx game with accuracy?

thanks a lot.


Last edited by googlefox on June 12th, 2009, 6:23 am, edited 1 time in total.

Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: June 11th, 2009, 6:50 am 
Offline

Joined: October 9th, 2008, 6:04 am
Posts: 180
Location: Finland
u can make ur current codes much shorter:

Code:
$F3:: MouseMove, 50, 0, 100, R


Code:
$F4:: Send {CTRL DOWN}{Numpad6 down}{Numpad6 up}{CTRL UP}

_________________
was i wrong, it makes me a very sad panda!


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: June 11th, 2009, 6:58 am 
Offline

Joined: October 9th, 2008, 6:04 am
Posts: 180
Location: Finland
Have u tried SendPlay?
I dont have the experience, but it might work somehow.. =P

_________________
was i wrong, it makes me a very sad panda!


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: June 11th, 2009, 8:21 am 
Offline

Joined: May 17th, 2009, 11:37 am
Posts: 51
I tried, nope, it still doesnt work, ctrl+num6 seems to be a hidden key.


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: chaosad and 15 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