AutoHotkey Community

It is currently May 26th, 2012, 10:29 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 5 posts ] 
Author Message
PostPosted: September 3rd, 2009, 11:01 pm 
Hello,

I'm writing this only to help someone who might be having as much trouble as I did when I tried to use Hot Keys.

While it is clear what the commands are, the instructions are not clear on the following:

First, after putting the HotKey trigger such as ^1:: (control 1), it is recommended that you put {} around the entire function of that HotKey. After you close the bracket, you should finish it off with a "return".

Second, you need to be running the script. Once you double click on the script, you will see the Green H appear at the bottom right of your screen in the task tray. Then, and only then, will your HotKeys trigger.

Finally, you can put multiple macros into the same Script File. If you bracket them off and use the return function, it appears you can place as many different macros into the same file as you would like.

Now, I'm sure there are some better technical methods than the ones I have described here, however there was no such instruction in my 6 hours of working on this project. I don't write this as though I'm an expert on this by any means, but in hope that those who are first using this program will have a better understanding on how to accomplish their goal.

I hope that those who need it find this helpful.


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: September 3rd, 2009, 11:09 pm 
Offline

Joined: April 4th, 2008, 8:15 pm
Posts: 538
Location: Canada
You don't need the {}s


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 3rd, 2009, 11:37 pm 
Online

Joined: April 8th, 2009, 7:49 pm
Posts: 6066
Location: San Diego, California
Quote:
I'm writing this only to help someone who might be having as much trouble as I did when I tried to use Hot Keys.

While it is clear what the commands are, the instructions are not clear on the following:

Please, pardon a few impertinent questions from a fellow newbie:

Did you read the helpfile, particularly the Contents tab, and the subject "tutorial (quick start)" ?

Did you read "Tutorial for Newbies" ?
http://www.autohotkey.com/forum/viewtopic.php?t=47791

Did you read the docs (which seem to me to be a duplication of the help file) ?
http://www.autohotkey.com/docs/

As I have found, newbie questions are welcome. Comments, suggestions and critiques are welcome.

You might want to start by Reading The Manual (RTM) :wink:

Leef_me


Report this post
Top
 Profile  
Reply with quote  
PostPosted: September 4th, 2009, 12:24 am 
Offline

Joined: April 20th, 2006, 4:08 pm
Posts: 25
Location: Baltimore, MD
anony1 wrote:
First, after putting the HotKey trigger such as ^1:: (control 1), it is recommended that you put {} around the entire function of that HotKey. After you close the bracket, you should finish it off with a "return".


This is mostly wrong - http://www.autohotkey.com/docs/Hotkeys.htm is clear..
Quote:
In the following example, the hotkey Win+N is configured to launch Notepad. The pound sign [#] stands for the Windows key, which is known as a modifier:

#n::
Run Notepad
return

In the final line above, "return" serves to finish the hotkey. However, if a hotkey needs to execute only a single line, that line can be listed to the right of the double-colon. In other words, the return is implicit:

#n::Run Notepad


So... a Return is only necessary if your hotkey is more than one line.
And... with regard to Hotkeys, the only time Brackets are required is if they are for a special character {Tab},{Enter}, etc...

Now if you are adding logic, and conditions (Checking active windows or such) brackets are needed, but not for hotkeys in particular.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 4th, 2009, 10:23 am 
Offline
User avatar

Joined: August 30th, 2005, 8:43 pm
Posts: 8666
Location: Salem, MA
Some of this basic info is not in the tutorial because it is (possibly incorrectly) assumed that people know that they need to actually execute the script file for the hotkeys inside it to work.

I'll ask jaco if he has time to add a bit to his Tutorial for Newbies: Prerequisite knowledge, which can cover things like downloading and installing AHK. Why you don't need to run AHK from the start menu, how to create a blank file, how to execute (and close) AHK scripts, Using Task Manager, Using Window Spy, etc.

_________________
Image
(Common Answers) - New Tutorials Forum - Humongous FAQ


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: AndyJenk, Bing [Bot], JSLover, Leef_me, Miguel, patgenn123, rbrtryn and 70 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group