AutoHotkey Community

It is currently May 27th, 2012, 3:02 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 8 posts ] 
Author Message
PostPosted: March 2nd, 2010, 1:36 pm 
Hye I want to launch a script with the right click with my mouse for a game.


#MaxThreadsPerHotkey 3
é:: ; Win+Z hotkey.
#MaxThreadsPerHotkey 1
if KeepWinZRunning = y ; This means an underlying thread is already running the loop below.
{
KeepWinZRunning = ; Make it blank to signal that thread's loop to stop.
return ; End this thread so that the one underneath will resume and see the change.
}
; Otherwise:
KeepWinZRunning = y
Loop,
{

Send {f2}
Sleep 10
MouseClick, Left
Sleep 10


if KeepWinZRunning = ; The user signaled the loop to stop by pressing Win-Z again.
break ; Break out of this loop.
}
KeepWinZRunning = ; Reset in preparation for the next press of this hotkey.
return


This is my script and I want te change "é" by "right click" but I don't know what is the language to use right click in this program.
Thanks!
Sorry if my english is not good i'm not English.


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: March 2nd, 2010, 1:39 pm 
Offline

Joined: February 1st, 2010, 2:50 pm
Posts: 237
Location: Netherlands
RButton - the right mouse button


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 2nd, 2010, 6:09 pm 
Thank you very much this is exactly what i want !!
Thanks you again lol


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: March 19th, 2010, 5:29 pm 
Hi again !
I have an other question, I want to lauch this program with 2 buttons
F1 and Left click of my mouse
Ex:
(F1 and Lbutton)::

Send a
sleep 100
Send b
sleep 100
send c
return

NB :
I want to have one seconde ore more to launch the program between the F1 and Left click.
Because the button F1 open a "pop-up" to choose a selection with LeftClick.

Thanks to help me !!


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: March 19th, 2010, 6:01 pm 
Offline

Joined: June 18th, 2008, 8:36 am
Posts: 4923
Location: AHK Forum
:?:
Code:
Lbutton::
If !GetKeyState("F1","P")
 Return
Send a
sleep 100
Send b
sleep 100
send c
return

_________________
AHK_H (2alpha) AHF TT _Struct WatchDir Yaml _Input ObjTree RapidHotkey DynaRun :wink:


Last edited by HotKeyIt on March 19th, 2010, 9:27 pm, edited 2 times in total.

Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 19th, 2010, 7:51 pm 
I have done a test but with your help, the Left click is blocked, or I must use the left click to move the character.

And the button F1 isn't affected in the program.
But Thank you really


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: March 19th, 2010, 9:30 pm 
Offline

Joined: June 18th, 2008, 8:36 am
Posts: 4923
Location: AHK Forum
Sorry forgot ~ :oops:
Code:
~Lbutton::
If !GetKeyState("F1","P")
 Return
Send a
sleep 100
Send b
sleep 100
send c
return
This may help :?:
Code:
F1 & LButton::MsgBox
F1::Send {F1}

_________________
AHK_H (2alpha) AHF TT _Struct WatchDir Yaml _Input ObjTree RapidHotkey DynaRun :wink:


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 19th, 2010, 10:52 pm 
Thanks that is works =D !


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

All times are UTC [ DST ]


Who is online

Users browsing this forum: rbrtryn and 31 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