 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
Sevire
Joined: 19 Aug 2008 Posts: 2
|
Posted: Tue Aug 19, 2008 8:40 pm Post subject: Mouse click passing. |
|
|
I have Searched through the forums and read up and not quite understanding how to get mouse clicks to send through to other clients..
I Can get keystrokes though.
;Grab unique window ID's
WinGet, WinId, List, Untitled - Notepad
ClonesPush(strKeys)
{
global WinId1
global WinId2
IfWinNotActive, ahk_id %WinId1%
ControlSend, , %strKeys%, ahk_id %WinId1%
IfWinNotActive, ahk_id %WinId2%
ControlSend, , %strKeys%, ahk_id %WinId2%
}
~Space::ClonesPush("{Space down}{Space up}")
~a::ClonesPush("{a}")
~b::ClonesPush("{b}")
~c::ClonesPush("{c}")
Etc. Like that..
Please help I just wish to learn and will do what is required of me to learn that <3 Thank you. |
|
| Back to top |
|
 |
Red Hat Boy
Joined: 10 Apr 2008 Posts: 111
|
Posted: Tue Aug 19, 2008 9:48 pm Post subject: |
|
|
| Help File wrote: | | Unlike the Send command, mouse clicks cannot be sent by ControlSend. Use ControlClick for that. |
| Code: |
;Grab unique window ID's
WinGet, WinId, List, Untitled - Notepad
ClonesPush(strKeys)
{
global WinId1
global WinId2
IfWinNotActive, ahk_id %WinId1%
ControlSend, , %strKeys%, ahk_id %WinId1%
IfWinNotActive, ahk_id %WinId2%
ControlSend, , %strKeys%, ahk_id %WinId2%
}
ClonesClick(strKeys)
{
global WinId1
global WinId2
IfWinNotActive, ahk_id %WinId1%
ControlClick, , ahk_id %WinId1%, , %strKeys%,
IfWinNotActive, ahk_id %WinId2%
ControlClick, , ahk_id %WinId2%, , %strKeys%,
}
~Space::ClonesPush("{Space down}{Space up}")
~a::ClonesPush("{a}")
~b::ClonesPush("{b}")
~c::ClonesPush("{c}")
~RButton::ClonesClick("Right")
~LButton::ClonesClick("Left")
x::ExitApp |
Weird...  _________________ I slit the sheet, the sheet I slit,
and on the slitted sheet I sit. ;~} |
|
| Back to top |
|
 |
Sevire
Joined: 19 Aug 2008 Posts: 2
|
Posted: Tue Aug 19, 2008 10:05 pm Post subject: |
|
|
Ok so if Thats how to make it click, I still would need to make it Recognize a spot to click.
Since as that it just clicks
Not clicking a certain spot like Well Like Mouseclick, right, 57, 44..
So I need to somehow implement this into it
!S::
{
Loop, 100
{
MouseClick, right, 57, 44
PixelSearch, cX, cY, 0, 0, 976, 582, 0x26234A, ,Fast
Click, %cX%, %cY%
sleep,15000
}
!p::Pause
}
So It has a Cordinate for the Clone to click..?
So I need to add a MouseGetPos to find
I appreciate the help thusfar.. <3 Thank you.
I am tring to make one paint Do the same thing I am doing on Another Paint <3. |
|
| Back to top |
|
 |
Sevire. Guest
|
Posted: Tue Aug 19, 2008 10:39 pm Post subject: |
|
|
Lets say I want him to click
MouseClick, right, 75, 75 when I do.. I would think it would be something like
!S::
;Grab unique window ID's
WinGet, WinId, List, Untitled - Paint
ClonesClick(strKeys)
{
global WinId1
global WinId2
IfWinNotActive, ahk_id %WinId1%
ControlClick, , ahk_id %WinId1%, , %strKeys%,
IfWinNotActive, ahk_id %WinId2%
ControlClick, , ahk_id %WinId2%, , %strKeys%,
}
~RButton::ClonesClick("Right")
~LButton::ClonesClick("Left")
MouseClick, right, 75, 75::ClonesClick("right, 75,75")
However I cant get the 2nd paint to follow and also click that spot.
Please help and thank you.. Sorry for double post <3 |
|
| Back to top |
|
 |
Red Hat Boy
Joined: 10 Apr 2008 Posts: 111
|
Posted: Wed Aug 20, 2008 12:13 am Post subject: |
|
|
Hmmm...
I'm not sure what you're trying to do is even possible...at least, not without two different mouse cursors on the screen. I have no idea how to accomplish such a thing, since only one window can have focus at a time.
Oh, and, uh, please use [code]code tags[/code] for your code.  _________________ I slit the sheet, the sheet I slit,
and on the slitted sheet I sit. ;~} |
|
| Back to top |
|
 |
Sevire. Guest
|
Posted: Wed Aug 20, 2008 12:35 am Post subject: |
|
|
| Haha well Thank you for the Effort and time <3 |
|
| Back to top |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|