Difference between revisions of "GetAltControl"
Jump to navigation
Jump to search
revert
imported>JlnHd0 m |
imported>Entim (revert) |
||
Line 15: | Line 15: | ||
==Notes== | ==Notes== | ||
* This function returns a number which is (255 | * This function returns a number which is (255 + MouseButtonID*256). The left mouse button has an ID of 0, the right an ID of 1, the middle 2 and so on up to a maximum of 7. | ||
* If there is no button bound to the requested control, or if the requested control is not valid, this function will return 65535. (-1, if read as a short) | * If there is no button bound to the requested control, or if the requested control is not valid, this function will return 65535. (-1, if read as a short) | ||
* If you want to know which keyboard key, if any, is bound to a control, use [[GetControl]]. | * If you want to know which keyboard key, if any, is bound to a control, use [[GetControl]]. | ||
Line 22: | Line 22: | ||
set button to getAltControl 4 ; attack button | set button to getAltControl 4 ; attack button | ||
if ( button != -1 ) | if ( button != -1 ) | ||
set button to ( button - 255 ) / 256 | set button to ( button - 255 ) / 256 + 256 | ||
endif</pre> | endif</pre> | ||