AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Hot Keys - Newcomer Comment

 
Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
anony1
Guest





PostPosted: Thu Sep 03, 2009 10:01 pm    Post subject: Hot Keys - Newcomer Comment Reply with quote

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.
Back to top
purloinedheart



Joined: 04 Apr 2008
Posts: 537
Location: Canada

PostPosted: Thu Sep 03, 2009 10:09 pm    Post subject: Reply with quote

You don't need the {}s
Back to top
View user's profile Send private message
Leef_me



Joined: 08 Apr 2009
Posts: 5336
Location: San Diego, California

PostPosted: Thu Sep 03, 2009 10:37 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
Tuxhedoh



Joined: 20 Apr 2006
Posts: 25
Location: Baltimore, MD

PostPosted: Thu Sep 03, 2009 11:24 pm    Post subject: Re: Hot Keys - Newcomer Comment Reply with quote

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.
Back to top
View user's profile Send private message Visit poster's website AIM Address
engunneer



Joined: 30 Aug 2005
Posts: 8255
Location: Maywood, IL

PostPosted: Fri Sep 04, 2009 9:23 am    Post subject: Reply with quote

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.
_________________

(Common Answers)
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group