Recorded some videos yesterday and today about getting started with AHK; the stuff I wish I had known from the start.
Little worried I might be going too fast but I want to get building real tools as quickly as possible because that is where I started to appreciate AHK most. Hope someone will find them useful.
Play all (playlist)
==Lesson One==
https://youtu.be/TLfY3mCxWd8
Setup, vars, =, :=, running scripts, msgbox
==Lesson Two==
https://youtu.be/yUcZOvzxDEc
Subroutines, Functions, Return, Scope, If, Else
==Lesson Three==
https://youtu.be/oO2bGT7FkWQ
#include, lib, Arrays/Objects, Imagesearch, Pixelsearch, Mousemove
==Lesson Four==
https://youtu.be/Ot2fnaWbDTA
FileRead, StrSplit, FileAppend
==Lesson Five==
https://youtu.be/E_sL2ntVnPo
RegEx, ||, &&, Continue, Break
==Lesson Six==
https://youtu.be/1PtHCsjd-Mw
GUIs, Timers
==Lesson Seven==
https://youtu.be/Uvjg3idUEUk
Run, RunWait, While
AHK Howto - Wish I had known from the start
AHK Howto - Wish I had known from the start
Last edited by Chunjee on 12 Jun 2015, 14:49, edited 3 times in total.
- Joe Glines
- Posts: 770
- Joined: 30 Sep 2013, 20:49
- Location: Dallas
- Contact:
Re: AHK Howto - Wish I had known from the start
Good job breaking them down into nice sizable bits. I think this will help a lot of people new to programming and AutoHotKey.
Sign-up for the HK Newsletter
AHK Tutorials:Web Scraping | | Webservice APIs | AHK and Excel | Chrome | RegEx | Functions
Training: AHK Webinars Courses on AutoHotkey
YouTube
Quick Access Popup, the powerful Windows folders, apps and documents launcher!
AHK Tutorials:Web Scraping | | Webservice APIs | AHK and Excel | Chrome | RegEx | Functions
Training: AHK Webinars Courses on AutoHotkey
YouTube
Quick Access Popup, the powerful Windows folders, apps and documents launcher!
Re: AHK Howto - Wish I had known from the start
Videos are always nice, but code is often hard to read. Perhaps some tips for future videos, during the recording process:
- use white background + black text (better contrast)
- use a bigger font 16 or 20+ so people can actually read the code in the video
- use white background + black text (better contrast)
- use a bigger font 16 or 20+ so people can actually read the code in the video
- Joe Glines
- Posts: 770
- Joined: 30 Sep 2013, 20:49
- Location: Dallas
- Contact:
Re: AHK Howto - Wish I had known from the start
When I record them I shrink my resolution which, in turn, bumps everything up. It looks ridiculously large to me when I'm recording the video but the clarity of text when viewing them is worth it.
Sign-up for the HK Newsletter
AHK Tutorials:Web Scraping | | Webservice APIs | AHK and Excel | Chrome | RegEx | Functions
Training: AHK Webinars Courses on AutoHotkey
YouTube
Quick Access Popup, the powerful Windows folders, apps and documents launcher!
AHK Tutorials:Web Scraping | | Webservice APIs | AHK and Excel | Chrome | RegEx | Functions
Training: AHK Webinars Courses on AutoHotkey
YouTube
Quick Access Popup, the powerful Windows folders, apps and documents launcher!
Re: AHK Howto - Wish I had known from the start
Cool!
Windows 10 x64 Professional, Intel i5-8500, NVIDIA GTX 1060 6GB, 2x16GB Kingston FURY Beast - DDR4 3200 MHz | [About Me] | [About the AHK Foundation] | [Courses on AutoHotkey]
[ASPDM - StdLib Distribution] | [Qonsole - Quake-like console emulator] | [LibCon - Autohotkey Console Library]
Re: AHK Howto - Wish I had known from the start
Added Lesson Seven
Run, RunWait, While
Run, RunWait, While
Re: AHK Howto - Wish I had known from the start
Hello there
The tutorials are getting quite nice.
Congratulations and please keep up the videos. This will certainly help a lot of people.
The tutorials are getting quite nice.
Congratulations and please keep up the videos. This will certainly help a lot of people.
"What is suitable automation? Whatever saves your day for the greater matters."
Barcoder - Create QR Codes and other Barcodes using only Autohotkey !!
Archmage Gray - A fantasy shooter game fully coded in AutoHotkey
Barcoder - Create QR Codes and other Barcodes using only Autohotkey !!
Archmage Gray - A fantasy shooter game fully coded in AutoHotkey
Re: AHK Howto - Wish I had known from the start
Hi, I've started following these tutorials and I find them well presented and interesting. I hope you keep going with them!
By the way http://downloadmob.com/Learn_AHK doesn't seem to be working.
By the way http://downloadmob.com/Learn_AHK doesn't seem to be working.
Re: AHK Howto - Wish I had known from the start
Code: Select all
I could use that for debugging my attempts to learn Script Files.
See my first post I made 5 minutes ago...
Thanks!
Re: AHK Howto - Wish I had known from the start
AHK Studio by maestrithPADRAK wrote:So where exactly can I download the AutoHotkey module program that you use in your How To Videos?
http://autohotkey.com/board/topic/85996-ahk-studio/
https://www.google.com/?q=site:autohotk ... AHK+Studio
- HinkerLoden
- Posts: 93
- Joined: 23 Mar 2016, 07:50
- Contact:
Re: AHK Howto - Wish I had known from the start
Nice . Prevents some silly questions inside the forum. But there are some things you should change.
1.) add the content into the Description - so its possible to find per search or even the google search will do it
2.) Reduce the lenght of Videos around 20 min or less . I think nr 5 is 40min - this is to long - just split it up.
For the first things its pretty good. Voice is clear. But try to take it all into an Example. Maybe give a kind of Homework at end of the HowTo. If you wanna get some more followers you need to animate your viewers to interact.
1.) add the content into the Description - so its possible to find per search or even the google search will do it
2.) Reduce the lenght of Videos around 20 min or less . I think nr 5 is 40min - this is to long - just split it up.
For the first things its pretty good. Voice is clear. But try to take it all into an Example. Maybe give a kind of Homework at end of the HowTo. If you wanna get some more followers you need to animate your viewers to interact.
Re: AHK Howto - Wish I had known from the start
Thanks for your ideas. I would like to pick this up again soon and get into some real projects.
- HinkerLoden
- Posts: 93
- Joined: 23 Mar 2016, 07:50
- Contact:
Re: AHK Howto - Wish I had known from the start
If you want we can do it together. I am now on in the progress to write a beginner HowTo. The critical point is where to begin and how to structure it . Getting good practical exercises. I thought about to have to each Category of the HowTo one Script where you exlplain the stuff. And another Project what get completed per each session as a kind of Homework and motivation for the people who want really learn it.
-
- Posts: 14
- Joined: 02 Apr 2016, 05:00
Re: AHK Howto - Wish I had known from the start
Hey man, I started watching your tutorial and after the second vid I tried the function myself with different parameters and function names to remember the usage better but it keeps giving me the "Black" message and after that also gives the Else message and after that gives me a blank messagebox with nothing in it. I scanned the code again and again and I don't think I'm missing anything when I compare it to your code shown in video. Can you spot what's wrong? I'm stumped.
Code: Select all
#SingleInstance force
#NoEnv
Range = 75
MsgBox, % Fn_Convertlvl(Range)
ExitApp
Fn_Convertlvl(para_Range)
{
If (para_Range = 75) {
MsgBox, Black
;Gives me this MsgBox as expected when range is 75
}
If (para_Range = 60) {
Return 10
}
Else {
MsgBox, 404
;Gives me this MsgBox after first one even though it shouldn't
; After 404 MsgBox it gives me a completely Blank MsgBox which is weird and I don't know what's wrong.
}
}
Re: AHK Howto - Wish I had known from the start
Try using if else if then else, instead of if if then else.
The blank message box you are seeing is because the function doesn't return anything so MsgBox, % Fn_Convertlvl(Range) shows blank. Try adding return, "example text" at the end of the function or in one of the if/else if/ else blocks.
The blank message box you are seeing is because the function doesn't return anything so MsgBox, % Fn_Convertlvl(Range) shows blank. Try adding return, "example text" at the end of the function or in one of the if/else if/ else blocks.
Re: AHK Howto - Wish I had known from the start
replace all the msgbox's inside the function with RETURN.
first it's checking if it's 75, if yes, show black. THEN since you didn't return (stop) the function, it goes to the next IF. since 75 isn't 60, it does the ELSE, shows 404.
but since you didn't return here either, it's not going to return any value to the msgbox outside the function, thus why you get a blank msgbox.
return command does a few things:
1) stops hotkeys/labels/other from going beyond that point (like a stop sign)
2) ends a function
3) gets a value out of a function (and ending the function)
first it's checking if it's 75, if yes, show black. THEN since you didn't return (stop) the function, it goes to the next IF. since 75 isn't 60, it does the ELSE, shows 404.
but since you didn't return here either, it's not going to return any value to the msgbox outside the function, thus why you get a blank msgbox.
return command does a few things:
1) stops hotkeys/labels/other from going beyond that point (like a stop sign)
2) ends a function
3) gets a value out of a function (and ending the function)
rawr. fear me.
*poke*
Is it December 21, 2012 yet?
*poke*
Is it December 21, 2012 yet?
-
- Posts: 14
- Joined: 02 Apr 2016, 05:00
Re: AHK Howto - Wish I had known from the start
Okay, thanks for the info. I did as I understood and suggested and this is what I came up with.
It still gives me the blank box after the "Black" message box but only if the Range is 75. If I change it to 60 or any other number it gives the messagebox of 10 and 404 respectively without the blank box following it.
It still gives me the blank box after the "Black" message box but only if the Range is 75. If I change it to 60 or any other number it gives the messagebox of 10 and 404 respectively without the blank box following it.
Spoiler
Re: AHK Howto - Wish I had known from the start
you only need one return for each of those things, as for why you get a blank, it's now stopping because of the return in he " If (para_Range = 75) " section. and you never give it a value to return.
Code: Select all
#SingleInstance force
#NoEnv
Range = 75
MsgBox, % Fn_Convertlvl(Range)
ExitApp
Fn_Convertlvl(para_Range)
{
If (para_Range = 75) {
Return "Black" ; Text needs To be In quotes.
;Gives a blank MsgBox after showing Black.
;If I change MsgBox into Return, it just shows the blank MsgBox.
}
Else If (para_Range = 60) {
Return 10
;Works as intended with Range value being 60.
}
Else {
Return, 404
;Works as intended when Range value is anything but 60 or 75.
}
}
rawr. fear me.
*poke*
Is it December 21, 2012 yet?
*poke*
Is it December 21, 2012 yet?
-
- Posts: 14
- Joined: 02 Apr 2016, 05:00
Re: AHK Howto - Wish I had known from the start
Alright, it works now. Thanks so much for explaining
One question though, how does it recognize Range value when the IF statement looks for para_Range value ?
One question though, how does it recognize Range value when the IF statement looks for para_Range value ?
Re: AHK Howto - Wish I had known from the start
para_Range is the parameters name/variable.
you assign that var to the value of Range.
Range has the value of 75.
para_Range has the value of 75.
you assign that var to the value of Range.
Range has the value of 75.
para_Range has the value of 75.
rawr. fear me.
*poke*
Is it December 21, 2012 yet?
*poke*
Is it December 21, 2012 yet?
Who is online
Users browsing this forum: No registered users and 14 guests