Close
Showing results 1 to 5 of 5
  1. #1

    Default Keyboard Hotkey set to do a Mouse Click Action - Autohotkey

    Hi, I am trying to use Autohotkey and set up a script that would make a keyboard key do a mouse click to a minimized window.
    EX: Clicking on a characters portrait.

    The only thing that I have found was this:

    #IfWinActive World of Warcraft
    ~LButton::
    CoordMode, Mouse, Relative
    MouseGetPos, x, y
    ControlClick, X%x% Y%y%, ahk_id %wowid2%
    ControlClick, X%x% Y%y%, ahk_id %wowid3%
    return

    #IfWinActive World of Warcraft
    ~RButton::
    CoordMode, Mouse, Relative
    MouseGetPos, x, y
    ControlClick, X%x% Y%y%, ahk_id %wowid2%,, R
    ControlClick, X%x% Y%y%, ahk_id %wowid3%,, R
    return

    But that does every coordinate on both screens, and I just want to set a keyboard key to send the mouse click to just the one.
    What do you guys think?
    I will continue to mess around with the script and do more endless forum searches in the mean time :shock:

  2. #2

    Default

    So you want to use a keyboard instead of a mouse to initate the clicking?
    Replace "~LButton" with whatever key you want to use. And since your not getting your click values from your current mouse cursor position, you have to specify where they are manually. You could also simply replace the "~LButton" with your hotkey, but still use the mouse cursor position to position the cursor on the other screens.

    I don't know whats up with the X%x%, that to me means there are two x values, when there is only one X and Y. I just realized, one X% and the other x% are simply relative and fixed mouse positions. Still not exactly sure how it works. The script code for AHK is incredibly cryptic to me.

    Asking on the AHK forums will you get you a much more knowledgable and probably better answer then asking on here.

    But anyway, your new code would look something like this:

    [code:1]
    ~F1::
    ControlClick, 200 300, ahk_id %wowid2%
    ControlClick, 200 300, ahk_id %wowid3%
    return
    [/code:1]

  3. #3

    Default

    Thanks for the reply, really helped me out to know the difference between ControlSend & ControlClick
    It ended up looking like this when I was done
    ControlClick,x112 y255, ahk_id %idClone%, , LEFT

    Had trouble figuring out where to put the "LEFT or RIGHT" in the script but I figured it out "Leaving it blank defaults it to a left click"

  4. #4

    Default

    Would it be possible to do a ctrl+alt+left click sends it to other screens? (or some variation of that)
    Currently running 3x City of Heroes under Octopus

  5. #5

    Default

    potentially yes... I haven't looked at this but there should be no reason why...

    ^!LBUTTON::


    shouldn't work

Similar Threads

  1. Replies: 2
    Last Post: 02-26-2009, 03:10 AM
  2. Mouse Click Broadcasting on a Mac?
    By Feider in forum Software Tools
    Replies: 2
    Last Post: 01-26-2009, 02:02 PM
  3. Mouse click passing.
    By Sevire in forum General WoW Discussion
    Replies: 5
    Last Post: 08-19-2008, 03:47 PM
  4. Action bar scrolling with mouse possible??
    By Doomreaper in forum New Multi-Boxers & Support
    Replies: 0
    Last Post: 07-19-2008, 12:29 AM
  5. Mouse click issue
    By Fuzzyboy in forum Software Tools
    Replies: 4
    Last Post: 07-15-2008, 10:15 AM

Posting Rules

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •