Learn AHK basics! :D

Helpful script writing tricks and HowTo's
User avatar
tidbit
Posts: 816
Joined: 29 Sep 2013, 17:15
Location: Minnesota, US

Learn AHK basics! :D

30 Sep 2013, 09:50

So long ago I made a tutorial that was supposed to replace the current (IMO, outdated) quickstart tutorial. It was going to be part of the website changes. I've been giving the link out on IRC for a while now but didn't want to make it public as I don't think it's 100% ready. I think some grammar and some examples could be fixed up a bit. And the page/layout could probably be prettier.

Anywho, it's meant to be a friendly and mildly fun tutorial, not a monotone bland piece of poo that's full of terms a noob has never heard without any explanation.

But I have given up on it a few times (lack of motivation. and I HATE GIT) and well, I guess it's time to release it.

So here are some links:
tutorial: http://ahkscript.github.io/AHK_Tutorial/
Translations:
the actual git page: https://github.com/ahkscript/AHK_Tutorial
trello card: https://trello.com/c/ui5Dfema


Ultimately, I would prefer this to replace the current tutorial as it has more samples and covers more topics. I would also like it to be part of the main AHK documentation github page as [1] I don't feel like maintaining it anymore [2] My git skills are next to 0 and every little thing takes me like 2 hours to figure out...and I don't plan on learning the junk. [3] It'd be more noticeable for actual git & ahk users to find, change, update, enhance.
rawr. fear me.
*poke*
Is it December 21, 2012 yet?
User avatar
tank
Posts: 1839
Joined: 28 Sep 2013, 22:15
Facebook: charlie.simmons.7334
GitHub: ttnnkkrr
Location: Louisville KY
Contact:

Re: Learn AHK basics! :D

30 Sep 2013, 10:10

Tidbit I have absolutely no problem or hesitation giving you FTP access to the docs folder so you can plug them in as you see fit.
Let me know if your interested otherwise ill try and get to this as soon as i can
We are troubled on every side‚ yet not distressed; we are perplexed‚
but not in despair; Persecuted‚ but not forsaken; cast down‚ but not destroyed;
https://www.facebook.com/ahkscript.org
User avatar
tidbit
Posts: 816
Joined: 29 Sep 2013, 17:15
Location: Minnesota, US

Re: Learn AHK basics! :D

30 Sep 2013, 10:54

Hmm, not quite yet.
I think I'll go through it this week (maybe today, no idea) and finally make a list of things I think need changed. Then post them here and maybe work on it a bit more.
rawr. fear me.
*poke*
Is it December 21, 2012 yet?
User avatar
nnnik
Posts: 1682
Joined: 30 Sep 2013, 01:01
Location: Germany

Re: Learn AHK basics! :D

30 Sep 2013, 11:21

Aww I wanted to be the first one.
BTW nice tut.
I am not afraid of many things. But I do fear fear.
User avatar
tidbit
Posts: 816
Joined: 29 Sep 2013, 17:15
Location: Minnesota, US

Re: Learn AHK basics! :D

01 Oct 2013, 13:26

Seems I was just being too harsh on myself, It's not as bad as I expected :D
But this is a list of things I found:
1)
section names visible to the user start at 1, but the urls start at 0.
1 - The basics ---- http://acorns.github.io/AHK_Tutorial/#s0

2)
http://acorns.github.io/AHK_Tutorial/#s03 should have a link to http://acorns.github.io/AHK_Tutorial/#s4

3)
http://acorns.github.io/AHK_Tutorial/#s11
http://acorns.github.io/AHK_Tutorial/#s12
the first example doesn't use the 'multi-line hotkey with return' I recommend to use in the previous section.

4)
the second <hr> in http://acorns.github.io/AHK_Tutorial/#s12 should be below the example showing how hotkeys and SEND are not related. Perhaps that whole section should have a BG separate style?

"The next couple of paragraphs are talking about the table on send page." should also be below the example.

5)
remove: "This page contains a list of all Commands that come with AHK." from: http://acorns.github.io/AHK_Tutorial/#s4

6)
Make all headers/anchors clickable so you can get urls for that section easily.

7)
Perhaps we could expand on AHK's biggest cause of noob confusion:
"a. When to use percents" http://acorns.github.io/AHK_Tutorial/#s51

8)
switch "If (Var1 <> Var2)" to "If (Var1 != Var2)" as that's what I prefer and use elsewhere.
http://acorns.github.io/AHK_Tutorial/#s51

9)
Does the style suck? I'm not too sure. I do like contrast and slightly larger font as I have bad eyes.
Perhaps it could be a dark theme? But that wouldn't match the site or forum. Hmm...
One thing's for sure: keep the hidden owl!
rawr. fear me.
*poke*
Is it December 21, 2012 yet?
Alibaba
Posts: 427
Joined: 29 Sep 2013, 16:15
Location: Germany

Re: Learn AHK basics! :D

02 Oct 2013, 19:48

IMHO the font size for the normal explanation text is a little bit too high.
"Nothing is quieter than a loaded gun." - Heinrich Heine
User avatar
tidbit
Posts: 816
Joined: 29 Sep 2013, 17:15
Location: Minnesota, US

Re: Learn AHK basics! :D

22 Oct 2013, 09:45

I went through and made the changes a day or 2 ago.
* to do
+ done


1)+
section names visible to the user start at 1, but the urls start at 0.
1 - The basics ---- http://acorns.github.io/AHK_Tutorial/#s0

2)+
http://acorns.github.io/AHK_Tutorial/#s03 should have a link to http://acorns.github.io/AHK_Tutorial/#s4

3)+
http://acorns.github.io/AHK_Tutorial/#s11
http://acorns.github.io/AHK_Tutorial/#s12
the first example doesn't use the 'multi-line hotkey with return' I recommend to use in the previous section.

4)+
the second <hr> in http://acorns.github.io/AHK_Tutorial/#s12 should be below the example showing how hotkeys and SEND are not related. Perhaps that whole section should have a BG separate style?

"The next couple of paragraphs are talking about the table on send page." should also be below the example.

5)+
remove: "This page contains a list of all Commands that come with AHK." from: http://acorns.github.io/AHK_Tutorial/#s4

6)+
Make all headers/anchors clickable so you can get urls for that section easily.

7)*
Perhaps we could expand on AHK's biggest cause of noob confusion: "a. When to use percents" http://acorns.github.io/AHK_Tutorial/#s51

8)+
switch "If (Var1 <> Var2)" to "If (Var1 != Var2)" as that's what I prefer and use elsewhere.
http://acorns.github.io/AHK_Tutorial/#s51

9)*
Does the style suck? I'm not too sure. I do like contrast and slightly larger font as I have bad eyes.
Perhaps it could be a dark theme? But that wouldn't match the site or forum. Hmm...
One thing's for sure: keep the hidden owl!

I think #7 should still be addressed. We/I/someone should work on explaining one of the main issue with noobs, even if it's 12 paragraphs and 47 examples :P

edit Tue April 01, 2014
This tutorial is pretty good for expressions/variables. There should def. be a link to it on the tutorial, with permission ofcourse.
http://www.daviddeley.com/autohotkey/xp ... amples.htm
rawr. fear me.
*poke*
Is it December 21, 2012 yet?
vasili111
Posts: 696
Joined: 21 Jan 2014, 02:04
Location: Georgia

Re: Learn AHK basics! :D

12 Apr 2014, 11:57

Nice work tidbit! This is very good quickstart tutorial. You are right, AutoHotkey quickstart tutorial from official documentation is really outdated. I hope it will be soon replaced by this tutorial.
DRAKON-AutoHotkey: Visual programming for AutoHotkey.
User avatar
tidbit
Posts: 816
Joined: 29 Sep 2013, 17:15
Location: Minnesota, US

Re: Learn AHK basics! :D

27 Apr 2014, 16:05

Translated into Swedish by budRich, thanks!
https://dl.dropboxusercontent.com/u/388 ... NSK.html#0

Thanks vasili111 :)
rawr. fear me.
*poke*
Is it December 21, 2012 yet?
User avatar
dangerdogL2121
Posts: 173
Joined: 01 Oct 2013, 23:11

Re: Learn AHK basics! :D

05 Jun 2014, 23:41

@tidbit
Great tutorial! :D Possibly better than the official ahk tutorials.
Its really good at getting new people a jump start, taking them from knowing nothing to making pretty complex scripts.

Possible changes:
  • Possibly add more to it, going in to user-made functions and more advanced features.
  • Did it talk about labels? Thats definitely an important thing to go through.
  • Also where it talks about [], you might want to add that they are also used for arrays and objects, since you don't want to get the user thinking optional code is the only use of the brackets.
  • You might want to have the links to the ahk documentation to the new ahkscript docs at http://ahkscript.org/docs/commands/

Pros:
  • Walks the user through downloading ahk (it can be tricky)
  • Acts as if the user has no programming knowledge
  • Big, easy to read and understand
  • Many good things that I probably didn't see(I just took a quick look)

I wish that I been around and I had found it when I started out with ahk. I could've gotten started in half the time.
Congrats ;)
Last edited by dangerdogL2121 on 20 Apr 2015, 17:53, edited 1 time in total.
User avatar
tidbit
Posts: 816
Joined: 29 Sep 2013, 17:15
Location: Minnesota, US

Re: Learn AHK basics! :D

06 Jun 2014, 09:34

Thanks :oops:
Yes, there def. could/should be more added to it. Such as a link to: http://www.daviddeley.com/autohotkey/xp ... amples.htm
But I lost interest in it a while ago, thus why I put it on github (more so, asked for it to be on the more known AHKSCRIPT github). That way anyone can add and change stuff :)
My GIT skills are next to nothing. And I don't intend on learning it (I tried, but found it overly complex and annoying. Not something I would like to use). So thus I had AHKSCRIPT take it over since those people actually know how to use git. joining changes is like a 3 second task for them.
rawr. fear me.
*poke*
Is it December 21, 2012 yet?
vasili111
Posts: 696
Joined: 21 Jan 2014, 02:04
Location: Georgia

Re: Learn AHK basics! :D

07 Jun 2014, 03:12

tidbit wrote:My GIT skills are next to nothing. And I don't intend on learning it (I tried, but found it overly complex and annoying. Not something I would like to use). So thus I had AHKSCRIPT take it over since those people actually know how to use git. joining changes is like a 3 second task for them.

I use GitHub for Windows https://windows.github.com/ . It is GUI tool for Github. It is very easy to use, try it.
DRAKON-AutoHotkey: Visual programming for AutoHotkey.
User avatar
tidbit
Posts: 816
Joined: 29 Sep 2013, 17:15
Location: Minnesota, US

Re: Learn AHK basics! :D

07 Jun 2014, 09:21

Use it. have it. don't like it.
From what I hear, it's limited. and that has shown a few times for me. Like sometimes after I push/pull/merge/upload (whatever it's called) something, the next time I go to merge a change I get some error that says there are conflicts (even though I changed literally 1 character. I added a period) go use the CMD to fix the issue somehow. And when that happens I just use the web interface and click the Edit button and copy/paste the new stuff. That works. But that is /not/ how git should be used. And it's too much effort when I can simply use dropbox or FTP. 1 click uploads with no versioning stuff I don't need. No weird errors unless I enter in my ftp password wrong.
rawr. fear me.
*poke*
Is it December 21, 2012 yet?
lexikos
Posts: 5072
Joined: 30 Sep 2013, 04:07
GitHub: Lexikos

Re: Learn AHK basics! :D

16 Jan 2015, 23:20

I have integrated this tutorial into the documentation, replacing the old tutorial.
http://ahkscript.org/docs/Tutorial.htm

Most of the changes are in these commits:
d1c5e150
e7b91023

Thanks to tidbit for writing it.

Note: I have not revised the text, though I am aware there are some minor inaccuracies.
Coco
Posts: 769
Joined: 29 Sep 2013, 20:37
GitHub: cocobelgica

Re: Learn AHK basics! :D

16 Jan 2015, 23:49

Is it me or is the formatting messed up?
Image
GeekDude
Posts: 695
Joined: 02 Oct 2013, 22:13

Re: Learn AHK basics! :D

17 Jan 2015, 00:07

You're not the only one with a broken page. Also, feedback on the objects section I threw in there?
lexikos
Posts: 5072
Joined: 30 Sep 2013, 04:07
GitHub: Lexikos

Re: Learn AHK basics! :D

17 Jan 2015, 01:18

Is it only that page, or also other documentation pages? It looks like the UI script stopped halfway, but I see no reason for that to happen specifically on the Tutorial page. Try clearing your cache or using incognito/private browsing. It is working fine for me on Chrome 39 on two separate systems, and on Chrome 42. IE8, IE11 and Firefox 35 have some issues with my changes to the Index, but nothing like what your screenshot shows.

GeekDude: Did you write the objects section? In that case, thanks. I have no feedback to give about any of the tutorial content as yet.
Coco
Posts: 769
Joined: 29 Sep 2013, 20:37
GitHub: cocobelgica

Re: Learn AHK basics! :D

17 Jan 2015, 01:27

OK, cleared my cache and tried with incognito mode and FF and it works fine now.
vasili111
Posts: 696
Joined: 21 Jan 2014, 02:04
Location: Georgia

Re: Learn AHK basics! :D

17 Jan 2015, 02:54

lexikos wrote:I have integrated this tutorial into the documentation, replacing the old tutorial.
http://ahkscript.org/docs/Tutorial.htm

Good decision. That one is much better than old one.
DRAKON-AutoHotkey: Visual programming for AutoHotkey.
Guest

Re: Learn AHK basics! :D

17 Jan 2015, 03:33

Well done.

But I think section is 8 is missing from both the Tutorial http://ahkscript.org/docs/Tutorial.htm#s8 and the GH repo https://github.com/Lexikos/AutoHotkey_L ... torial.htm - OR section 8 should be removed from the Index at the top if it wasn't meant to be part of it.

Personally I would prefer some sections to have a more neutral tone - the jovial tone (which can be fun) might cause an additional learning curve for non-native English speakers (humor doesn't always translate well).

Return to “Tutorials”

Who is online

Users browsing this forum: No registered users and 6 guests