AutoHotkey Community

It is currently May 26th, 2012, 10:48 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: Mouse click passing.
PostPosted: August 19th, 2008, 9:40 pm 
Offline

Joined: August 19th, 2008, 9:30 pm
Posts: 2
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.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 19th, 2008, 10:48 pm 
Offline

Joined: April 10th, 2008, 10:08 pm
Posts: 111
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. ;~}


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 19th, 2008, 11:05 pm 
Offline

Joined: August 19th, 2008, 9:30 pm
Posts: 2
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.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 19th, 2008, 11:39 pm 
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


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: August 20th, 2008, 1:13 am 
Offline

Joined: April 10th, 2008, 10:08 pm
Posts: 111
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. 8)

_________________
I slit the sheet, the sheet I slit,
and on the slitted sheet I sit. ;~}


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 20th, 2008, 1:35 am 
Haha well Thank you for the Effort and time <3


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

All times are UTC [ DST ]


Who is online

Users browsing this forum: [VxE], Bing [Bot], Google [Bot], iBob35555VR, Klark92, Tilter_of_Windmills and 60 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