Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Autohotkey Help

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
lucid
Master Cheater
Reputation: 0

Joined: 23 Jan 2008
Posts: 424

PostPosted: Sat Nov 06, 2010 4:55 pm    Post subject: Autohotkey Help Reply with quote

I want to make a script in autohotkey that causes 'w' to be held down as long as BOTH the Left mouse button and the right mouse button are held down.

I have tried a simple code like this

Code:
lbutton & rbutton::send w


When this code was active, you could not use the left mouse button. The right mouse button worked fine, but the left mouse button would not work at all.

Another problem with this script is that the 'w' key is only pressed down once, and not held.

So I want the left and right mouse buttons to work fine by themselves, but to hold down 'w' when pressed together.

How would I do this?
Back to top
View user's profile Send private message
atom0s
Moderator
Reputation: 205

Joined: 25 Jan 2006
Posts: 8587
Location: 127.0.0.1

PostPosted: Sat Nov 06, 2010 5:39 pm    Post subject: Reply with quote

You can send keys and "press" them down using:
Code:
Send {w down}


And then to release it:
Code:
Send {w up}


You can check the status of the mouse using:
Code:
mouse1 := GetKeyState("LButton", "T")
mouse2 := GetKeyState("RButton", "T")


I'm not one to use AutoHotKey though, I gathered this just by looking at the docs.

_________________
- Retired.
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites