From WikiChip
Difference between revisions of "mirc/identifiers/$click"
m (Bot: Adding a template (template:mIRC identifier list)) |
m (Bot: Automated text replacement (-Added On:.+\n?\n?\n?\n?\n? +)) |
||
Line 63: | Line 63: | ||
== Compatibility == | == Compatibility == | ||
Added: mIRC v5.3 | Added: mIRC v5.3 | ||
− | |||
− | |||
== See Also == | == See Also == |
Revision as of 23:47, 5 July 2014
The $click identifier allows the tracking of clicks within a custom Picture Window.
Contents
Synopsis
$click(@,N)[.property]
Parameters
@ The custom picture window name to target
N The Nth target in the click event list to track.
Properties
x Get the current x position of the mouse click
y Get the current y position of the mouse click
Attached Command
The $click click event history can be cleared from a custom picture window by using the following command:
/clear -c @pictureWindowName
Example
The example below will create a custom alias, /clickWatch, that, when executed, will popup a custom window and display the live click results from the sclick event.
; Create the custom alias to launch the example ; ; Synopsis: /clickWatch alias clickWatch { ; Custom picture window, which is centered window -dpC @clicker 0 0 250 125 ; Custom 'update' alias keeps code from repeating ; During initial launch the values should be empty update 15 Total Clicks: empty update 35 Current Position: none yet update 55 Previous Position: none yet } ; Monitor the sclicks in our custom '@clicker' window menu @clicker { sclick: { ; Clear the window for the new value updates clear @clicker ; Set the %current and %prev variables to the current ; x/y click location, and to the previous x/y click ; locations, respectively var %current = $click(@clicker,0), %prev = $calc(%current - 1) ; Utilizing the custom 'update' alias, update the data update 15 Total Clicks: $click(@clicker,0) update 35 Current Position: $click(@clicker,%current) update 55 Previous Position: $iif(%prev,$click(@clicker,%prev),none yet) } } ; Custom update alias removes a lot of the /drawtext repetition ; from this example alias -l update { drawtext @clicker $color(normal) 7 $1 $2- }
Compatibility
Added: mIRC v5.3
See Also
mIRC identifier list