| View previous topic :: View next topic |
| Author |
Message |
marlap
Joined: 01 Mar 2008 Posts: 11 Location: Canada
|
Posted: Sat Mar 01, 2008 3:47 pm Post subject: Tutorial for Newbies |
|
|
| Aside from the quick start tutorial that comes with the standard download of Autohotkey, is there any other literature or other resources to help newbies get started in Autohotkey scripting (programming)? I'm talking real newbies! |
|
| Back to top |
|
 |
Ian
Joined: 15 Jul 2007 Posts: 1157 Location: Enterprise, Alabama
|
Posted: Sat Mar 01, 2008 4:48 pm Post subject: |
|
|
| I really didn't use the tutorial, I just looked around on the forums and looked up the commands I saw. |
|
| Back to top |
|
 |
NLI-Conquer Guest
|
Posted: Sat Mar 01, 2008 6:19 pm Post subject: |
|
|
Looking around the scripts and functions is a great way to learn what you need, then you can build yourself up from there.
If you're trying to do something in particular, use the Search tool to find what you're trying to script and examine the scripts source code, look up the commands used if you don't understand them. That should give you a basic idea to be able to "Script it in your own words" if you will.
Hope this helped. |
|
| Back to top |
|
 |
jaco0646
Joined: 07 Oct 2006 Posts: 553 Location: MN, USA
|
Posted: Sat Mar 01, 2008 11:09 pm Post subject: |
|
|
As a person who started using AHK having absolutely zero programming experience (never taken a class or read a book on computers in my life), I will give you my 2 cents on learning it.
I think exploring the forum works great if you have even a little bit of background in this area. If, like me, you have none, I would learn it in the following order (this is how I would do it if I had to do it over again). My reasoning here is that for a person starting from scratch, you need to learn concepts before learning commands, and the forum is geared more towards commands.
First read the Tutorial, the Scripts page, and then the FAQ. Afterwards, I would recommend learning concepts in the following order:
1. Hotstrings
2. Hotkeys
3. Mouse Clicks & Mouse HotKeys
4. Variables
5. Loops - especially Parsing Loops
6. String commands - (e.g. StringMid, StringReplace)
7. If,Else statements
8. Expressions
9. Arrays & Dynamic variables - (StringSplit)
10. GoSub & Functions
11. GUIs
12. Windows Messages
13. DllCall
The first 3 you will not necessarily use very often once you become proficient with the program; but they are the easiest to comprehend and implement. Everything from Variables through GUIs is what I would consider the "core" of the program that you will use repeatedly to write virtually all of your scripts with. Windows Messages and DLLCalls are the advanced techniques that are the most powerful but most complicated. The average user will probably never have the need and desire to master these two.
Of course this list is not set in stone, and you may be learning multiple items at once (for example you may want to scratch the surface of GUIs right away), but I think all of the items are important to learn about if you plan to use AHK more than a few times, and I tried to arrange them in an order that would be most logical and systematic.
When you're wondering how to accomplish a specific task in AHK, remember that most of the commands have a common naming scheme to identify what they do. For example:
Commands dealing with files start with File.
Commands dealing with windows start with Win.
Commands dealing with text start with String.
Similarly:
Commands that retrieve data from somewhere contain Get.
Commands that apply data to somewhere contain Set.
Combining the two previous structures, we have commands like:
FileGetSize - Retrieve the size of a file.
WinGetTitle - Retrieve the title of a window.
StringGetPos - Retrieve the position of a piece of text inside a larger piece (like a sentence in a paragraph).
FileSetTime - Apply a new Time Stamp to a file.
WinSetTitle - Apply a new title to a window.
SetTimer - Apply a new Timer, which is a command or group of commands that run at timed intervals.
Good Luck, and remember that nobody was born knowing any of this. It takes time. _________________ http://autohotkey.net/~jaco0646/ |
|
| Back to top |
|
 |
memoday
Joined: 19 Feb 2008 Posts: 17
|
Posted: Wed Mar 05, 2008 8:58 pm Post subject: great logical thinking |
|
|
| jaco0646 wrote: | As a person who started using AHK having absolutely zero programming experience (never taken a class or read a book on computers in my life), I will give you my 2 cents on learning it.
|
Thanks A Million jaco0646. I have just come across this thread, and I am a newbie too. You have a really smart logical thinking and you explained it in a way that really makes much sense. I like the part about (Set-Get concept). You must be a smart teacher. If not, then you should go ahead and write a book about AHK. I will be the first buyer
Thanks again!  |
|
| Back to top |
|
 |
marlap
Joined: 01 Mar 2008 Posts: 11 Location: Canada
|
Posted: Thu Mar 27, 2008 6:38 pm Post subject: |
|
|
| Thanks all for your time spent in replying to my post. Hopefully, in the future I'll be able to spend time helping others out. Actually, I do have experience on basic programming (back in the Commodore 64 days), so I do know a little about programming structure, but the syntax for this scripting stuff is so different. |
|
| Back to top |
|
 |
DevinChopra
Joined: 11 Jun 2008 Posts: 4
|
Posted: Sat Jun 14, 2008 5:10 am Post subject: :D I think your post should be made sticky |
|
|
jaco0646 Thanx,
I am a total novice at AHK and programming - though I am a webmaster, I could never wrap my head around php and other scripting languages.
But the need of the hour demands it.
I have been trying to make out head and tail of the tutorial and the help file, your post has come as an epiphany!
I think it should be made sticky for newbies like me.
Cheerios,
Devin _________________ Knowledge is more precious than Gold! |
|
| Back to top |
|
 |
mai9
Joined: 18 Mar 2008 Posts: 26 Location: Barcelona, Catalonia
|
Posted: Sun Jun 15, 2008 12:09 am Post subject: |
|
|
| jaco0646, I loved your post aswell, specially the 1-13 steps and the reasoning behind what is core and what is advanced. |
|
| Back to top |
|
 |
|