Page 2 of 2

Re: Classes in AHK, Basic tutorial.

Posted: 24 Jul 2018, 09:40
by Pall Parker
Thanks for the tutorial!!!

Re: Classes in AHK, Basic tutorial.

Posted: 30 Jul 2018, 15:34
by Galaxis
classes remind me of ARRAYS

Re: Classes in AHK, Basic tutorial.

Posted: 01 Jan 2019, 01:58
by Sabestian Caine
Great tutorial on Classes. :bravo: :bravo: :bravo:

But, still I am not getting how to use classes in simple stuffs?? :roll: :roll: :roll:

Re: Classes in AHK, Basic tutorial.

Posted: 27 Jan 2019, 03:44
by Albireo
Thank's!
I like the simplicity of the lesson of Class above.
I think even, that the description / comments is good when the complexity increases.

However, there are still parts that I do not understand. (eg. this.ID - is there more similar "variables" like this.?)
Searched in AHK help file but did not find anything.

Another thing that I didn't get to operate, as I desire, is the calculator. Wrong windows can be activated.
(for example, Explorer can become active instead of the Calculator - Maybe it is the programscript / Win 10 / Swedish version?)
How can I be sure that the right window is activated (Now it was so - most of time - but I just had luck?)
Perhaps the example had worked better if the instruction WinActivate had been supplemented with which window to be activated?.

Another problem that arose was when the Notepad were opened. Notepad were opened so quickly that it became a wrong header.
I solved this with the following code .:

Code: Select all

...
IfWinNotExist ahk_class Notepad
{	Run Notepad
	WinWait ahk_class Notepad
}
...
Finally, although the example does not handle problems, is it perhaps important?
If a code doesn't work as intended (for various reasons)
For example, if nothing happens, an error management can give tips on what went wrong?

I think the example shows that Class can add details that cannot be done otherwise (eg. __New)
Thanks again! :bravo: