Look at the QM Toolbar that starts up with the Editor; the second icon opens a dialog to show you all the special characters. You can start using these very easily by invoking the function with an apostrophe like this ' .
Note: I'll be taking many of the examples directly out of the QM Help. BTW: you can easily access the help documentation and go to the function you are curious about by just placing your cursor on the function and hitting F1; often times there is a very well documented article on the function (sometimes the help text appears in the output window below the editor instead).
The apostrophe is a quick and dirty way of getting text to type rather than pasting text via the 'outp' function. The 'key' function works similarly but has more flexibility. Here is how those examples would look when using 'key'.'CSf A{ec} Wd ;;Ctrl+Shift+F, Alt+E+C, Win+D
note: the Alt key is released after the c key
'SnewVSyork ;;type "New York" using QM key codes
Yeah I know but that was just to show you how it looks; now let's really get into it.key CSf A{ec} Wd ;;Ctrl+Shift+F, Alt+E+C, Win+D note: the Alt key is released after the c key
key SnewVSyork ;;type "New York" using QM key codes
Here's another way of doing multiple keystrokes while holding down modifier keys. You can put all kinds of things inside that block; not sure what other types of things you would want to though.key (VK_MEDIA_PLAY_PAUSE)
;;Mimics hitting the Play/Pause button
key a (0.5) b ;;a waits 0.5 second b
key+ CS
lef
key- SC
'Key
' will also let you feed the contents of a string variable into it. So, you can easily create the variable value from any other method and then you can have 'key' type it in. This works especially well for a telnet program I use that won't allow direct pasting into the command line.
key _s
Now usually, you won't have to go to such drastic measures just to input some text but if you need it (like in my telnet program) you've got it. Granted, it's not particularly strong me (mĀ), but when you gotta have it, you gotta have it.So have at it and I'll see you next time cause the hook always brings you back.
1 comment:
The key() function is different than all other. With other functions,
func _s
means that _s is a variable. In case of key() function, variables must be enclosed:
key (_s)
Everything that is not enclosed in () or "" is interpreted as key codes. Parts enclosed in "" are interpreted as simple text.
key keycodes (variable) "text"
Post a Comment