I just discovered AutoHotKey, and would like to thank you for an amazing piece of software! I recently purchased a Mac, and am able to do things like global auto-completes and such, and was sorely missing this when I was working on Windows boxes. Your program was the solution!
My question is regarding multi-line, or more specifically mult-function scripts. Perhaps I'm making them more complex than they are, but I'm running into problems performing multiple commands in a script. Or more specifically, I'm seemingly unable to create multi-line scripts that recognize and process each line of code. Instead, the first command will process, and the rest are seemingly ignored.
From looking at the samples and such, it appears that multi-line scripts are possible, but where I'm getting confused is how to structure these so that each line is picked up/handled.
Here's an example:
^+SPACE:: clipboard = ;
Send, ^c/* ^v */
The above script 'should' empty the clipboard, then copy the currently selected text (if any is selected), and insert it between the beginning and ending comment brackets. Instead, it simply empties the clipboard, and the script ends.
If I remove the semi-colon, and/or put the commands all on one line (with appropriate spacing, of course), then it sets the clipboard contents equal to "Send, ^c/* ^v */" instead of processing the commands. The programmer in me wants to put a semicolon at the end of each line, or use bracketing to tell it what and how to process the lines, but this obviously isn't how AutoHotKey works.
So what is the solution? I have other examples of similar problems, but am unable to determine how to handle such items. Help!