REFERENCE
MouseClick

This command was renamed ClickMouse in build 113.

Moves the cursor to desired location and clicks a mouse button. You can choose from a number of different ways to set the location.

Syntax

<MouseClick Button Target Mode Restore>

Parameters

Button indicates which button to click. This parameter can be LButton, MButton, RButton, Button4, or Button5. This parameter is optional. If you omit it, the default is LButton.

Target indicates whether the cursor gets positioned relative to the window or screen. This parameter can be Window or Screen. This parameter is optional. If you omit it, the default is Window.

Mode indicates how the position of the cursor is set. This parameter is optional. If you omit it, the default is Scale. This parameter can be one of the following:


NoMove
The cursor will not be moved. The click will happen wherever the cursor happens to be.

# #
You can specify the cursor coordinates of the clicked cursor with two numbers separated by a space. If target is Screen, the coordinates are relative to the screen; if target is Window, the coordinates are relative to the window.

Dupe
Clicked cursor's coordinates are the same as coordinates of cursor on machine where hotkey is pressed. If target is Screen, the coordinates are relative to the screen; if target is Window, the coordinates are relative to the window.

Scale
Same as Dupe, except coordinates are adjusted for difference in screen resolution (if target is Screen) or window size (if target is window).

#% #%
Same as Scale, except you specify the scaling factors for the x and y coordinates with two numbers, each followed by a percent sign.

±# ±#
Use plus or minus symbols in front of numbers to specify a cursor offset. For example, if you want to click your target window 50 pixels to the left and 40 pixels below the point where the click would otherwise occur, write –50 +40. Offsets are added or subtracted before scaling.

Restore indicates whether the cursor gets moved back to its original location after the click. This parameter can be Restore or NoRestore. If you omit this parameter, the default is Restore.

Remarks

Your choice of SendWin or SendWinM or SendWinMF affects MouseClick. If you use SendWin and target a window, HotkeyNet will bring that window to the foreground if necessary to deliver the click. If you want to deliver a mouseclick to a window in the background without bringing it to the foreground, use SendWinM or SendWinMF.

You can write parameters in any order.


Sometimes the click will occur before the cursor moves. If this happens, you need to increase one or both MouseClick delays on the Settings Panel. These delays are inserted by HotkeyNet between the move, click, and restore to ensure that the target window sees the events in the correct order.


Note to World of Warcraft Players

By default, this command inserts tiny delays as described above in Remarks. The delays occur only for technical reasons and the default values are too short to affect game play. If you are concerned that these delays might violate the rules in World of Warcraft you can disable them by setting MouseClick delays to "0 0" (zero zero) on the Settings Panel. Unfortunately, without the delays it's very difficult to get MouseClick to work.

The need for these delays may be eliminated in future builds.


Examples

The following hotkey left clicks a window. The location of the click will be determined by the location of the cursor on the machine where the hotkey is pressed. If the windows have different sizes, the location will be scaled:

    <Sendwin MyGame>
         <MouseClick>


The following hotkey is the same as the previous one, except that since it uses SendWinM, it will attempt to click on background windows without bringing them to the foreground.

    <SendWinM MyGame>
         <MouseClick>


The following hotkey right clicks the screen at coordinates 400, 800 — in other words, at the point which is 400 pixels from the left edge of the screen and 800 pixels from the top of the screen:

        <MouseClick Right Screen 400 800>


The following hotkey is similar to the last one except that it clicks the window at the point which is 400 pixels from the left edge of the window and 800 pixels from the top of the window:

        <MouseClick Right Window 400 800>


The following hotkey left clicks the screen wherever the cursor happens to be:

        <MouseClick Screen NoMove>


The following hotkey left clicks simultaneously on the same spot in three different WoW windows. The windows can be covered by other windows while the clicks occur:

        <Hotkey F1>
        <SendPC Local>
            <SendWinM wow1>
            <MouseClick>
            <SendWinM wow2>
            <MouseClick>

            <SendWinM wow3>
            <MouseClick>


This page was last revised on June 11, 2008
 
INSTRUCTIONS


REFERENCE


OTHER STUFF


WORLD OF WARCRAFT