Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate

what a waste of time!


  • Please log in to reply
15 replies to this topic
  • Guests
  • Last active:
  • Joined: --
Guess how long it took me to isolate it down to this piece of code
boo = 1000
MsgBox Boo is %boo%
oldboo = boo
boo = boo * 0.75
MsgBox oldboo = %oldboo% while boo is now %boo%

omg. DOES ANYONE HAVE A TUTORIAL FOR PEOPLE WHO HAVE A BACKGROUND IN...PROGRAMMING?

SKAN
  • Administrators
  • 9105 posts
  • Last active:
  • Joined: 26 Dec 2005
boo = 1000

MsgBox Boo is %boo%

oldboo [color=red]:=[/color] boo

boo [color=red]:=[/color] boo * 0.75

MsgBox oldboo = %oldboo% while boo is now %boo%


  • Guests
  • Last active:
  • Joined: --
I've never coded in Pascal (only real program languages: C, C++, Perl then Python) but it seems that convention is from it. Is AHK based on Pascal syntax?

polyethene
  • Administrators
  • 5517 posts
  • Last active: Jun 02 2014 02:21 AM
  • Joined: 26 Oct 2012

Is AHK based on Pascal syntax?

Oh hell no, just the := operator.

Also, real programmers RTFM.

guesty guest
  • Guests
  • Last active:
  • Joined: --
oldboo := boo 
boo := boo * 0.75

FYI, the := operator is not the only way to do this (as you could find out by reading the manual)

oldboo = %boo%
boo *= 0.75


  • Guests
  • Last active:
  • Joined: --

Is AHK based on Pascal syntax?

Oh hell no, just the := operator.


What is the rest of the language "inspired" by, Visual Basic or what? Specifically I'm asking about things like not using "quotes" around string literals in many places, which confuses the HELL out of me -- I assume it will use the value of a variable, but instead it uses the NAME of the variable. Other things I find confusing are the way bracing works, where some examples will use a newline, others use a brace, sometimes like loop { doesn't work but if I put the brace onto a newline it works, etc etc etc. I'm having trouble understanding how whitespace works, how quotation marks versus bare literal text work; how parenthesis and braces work, and boolean comparisons and things like that. Basically if there were a tutorial given a compare/contrast with C++ (or with Perl or Java or Python or anything) it would be really helpful! Any hope of something like that?

Slanter
  • Members
  • 739 posts
  • Last active: Jul 08 2011 05:26 AM
  • Joined: 28 May 2008
As people have said... RTFM here's a couple things to get you started.
Syntax FAQ
{...} (Block)
Expressions

SKAN
  • Administrators
  • 9105 posts
  • Last active:
  • Joined: 26 Dec 2005
The guest has a point. There should be a seperate Getting Started for programmers.

  • Guests
  • Last active:
  • Joined: --

The guest has a point. There should be a seperate Getting Started for programmers.

could you tell me the most important DIFFERENCES or GOTCHAS between AHK and other languages with the same basic components (braces, parentheses, the keywor if, etc)

tinku99
  • Members
  • 560 posts
  • Last active: Nov 18 2013 02:43 AM
  • Joined: 03 Aug 2007
If you look at the activity of python-forum.org and autohotkey.com/forum
there are 4 times as many posts on ahk.

Are the python mailing lists making up the difference?

I have not explored the difference in quality of posts.

animeaime
  • Members
  • 1045 posts
  • Last active: Jun 18 2011 04:44 AM
  • Joined: 04 Nov 2008
One "gotcha" for me was this

if (SomeVal = 5)
{
    ;Do Something
}

check out If and also If (expression)

This seems to be a topic of MUCH confusion.

For example, the above code (in a language like C++ or Java) would set SomeVal to five and return a "5" (true), so it would "do something". However, in AHK this is how one compares values (use, SomeValue := 5, to store the value and have it behave like equals in a language like C++ or Java)

Check out the docs. It's setup for both programs like us, and for those that want to use the power of AHK to do their scripting needs. AHK has a TON of functionality, it will take a while to learn it all. But, if you need specific help, the forum is always active and helpful.

  • Guests
  • Last active:
  • Joined: --

If you look at the activity of python-forum.org and autohotkey.com/forum
there are 4 times as many posts on ahk.

Are the python mailing lists making up the difference?

I have not explored the difference in quality of posts.


for me, I've never had to make a python post! It also doesn't require the FANTASTIC manual that AHK has. Why? Well, because there aren't any gotchas! What you see is what you get.

There is exactly one Python gotcha. ONE. I have never encountered another one. By comparison I've made DOZENS of posts in the few hours I used AHK, for simple stuff that I just couldn't get. I mean simple syntax.

tank
  • Moderators
  • 4240 posts
  • Last active: Aug 09 2014 07:42 PM
  • Joined: 21 Dec 2007

Is AHK based on Pascal syntax?

Oh hell no, just the := operator.

Also, real programmers RTFM.

I normally find Titan is even more harsh than i but for once i agree. First of all AHK is procedural not OOP
you should be reading the manual througroughly
Procedural languages are very different and are in many ways like relearning to walk comming from OOP. There is no substitute for just slowing down and going thru the command list.
I understand and aggree with Skan tho as well there should be a separate tutorial for Programmers.(how would we stop newb programmer fakers (like me) from going to it instead and ignoring the simplified walk thru's) Altho i would also menthion in Chris's own words AHK isnt a programming language
<!-- m -->http://www.autohotke... ... 8686#78686<!-- m -->

...

Here's the thing: I'd never intended AutoHotkey to become yet another programming language. Because of this, I want it to excel at automation, hotkeys, and GUI -- but give a lower priority to concepts only programmers would tend to use, such as classes, structures, namespaces, preprocessing, etc.

Nor is there intended any effort to a more standardized language structure
another quote from the author
<!-- m -->http://www.autohotke... ... 2511#42511<!-- m -->
<!-- m -->http://www.autohotke... ... 2499#42499<!-- m -->

There is exactly one Python gotcha. ONE. I have never encountered another one. By comparison I've made DOZENS of posts in the few hours I used AHK, for simple stuff that I just couldn't get. I mean simple syntax.

but here again even all the above said simply RTFM would have saved you

tank
  • Moderators
  • 4240 posts
  • Last active: Aug 09 2014 07:42 PM
  • Joined: 21 Dec 2007

omg. DOES ANYONE HAVE A TUTORIAL FOR PEOPLE WHO HAVE A BACKGROUND IN...PROGRAMMING?

U could just use CLR.AHK <!-- m -->http://www.autohotke... ... 6b95d60d13<!-- m -->

evan
  • Guests
  • Last active:
  • Joined: --
yawn*
what do u expect from him when he cant even figure out the simple expressions or willing to read the help file