Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

What programming language does AutoHotKey use?


  • Please log in to reply
12 replies to this topic
scriptmonkey
  • Members
  • 176 posts
  • Last active: Jan 08 2015 07:42 PM
  • Joined: 19 May 2006
What programming language does AutoHotKey use?

polyethene
  • Members
  • 5519 posts
  • Last active: May 17 2015 06:39 AM
  • Joined: 26 Oct 2012
AutoHotkey is programmed in C++. The source code is open source and available to download.

autohotkey.com/net Site Manager

 

Contact me by email (polyethene at autohotkey.net) or message tidbit


scriptmonkey
  • Members
  • 176 posts
  • Last active: Jan 08 2015 07:42 PM
  • Joined: 19 May 2006

AutoHotkey is programmed in C++. The source code is open source and available to download.


Is the coding language used when creating scripts also C++ ? If not, what is it?

polyethene
  • Members
  • 5519 posts
  • Last active: May 17 2015 06:39 AM
  • Joined: 26 Oct 2012
No, AutoHotkey has its own completely unique language for its scripts. This language is dead easy to learn, see the quick-start tutorial.

autohotkey.com/net Site Manager

 

Contact me by email (polyethene at autohotkey.net) or message tidbit


scriptmonkey
  • Members
  • 176 posts
  • Last active: Jan 08 2015 07:42 PM
  • Joined: 19 May 2006

No, AutoHotkey has its own completely unique language for its scripts. This language is dead easy to learn, see the quick-start tutorial.


Yes, I agree, its pretty easy to learn.

I was curious if its a extension of another type of programming language, or if its close to any others.

If someone ask me what programming language a script I made is, I could say.

PhiLho
  • Moderators
  • 6850 posts
  • Last active: Jan 02 2012 10:09 PM
  • Joined: 27 Dec 2005
Small history of AutoHotkey (if I miss something or I am wrong, please correct me!):
The base of AHK is AutoIt v. 2. The AutoIt team released the source code as GPL (then made it private again) and started to rewrite it to use a Basic-like syntax. Chris preferred the old syntax, so he used this code to revive the project and extend it. He added nice features, like expression evaluation. In AutoIt 2 times, you had to use EnvAdd commands or external programs like my MPCalc.
AutoIt 2 itself took some inspiration from an old Microsoft batch language whose name escape me right now. Using %var% syntax and %1% as command line argument come directly from batch too.
But overall, this language is unlike most that I know... :-)
Posted Image vPhiLho := RegExReplace("Philippe Lhoste", "^(\w{3})\w*\s+\b(\w{3})\w*$", "$1$2")

scriptmonkey
  • Members
  • 176 posts
  • Last active: Jan 08 2015 07:42 PM
  • Joined: 19 May 2006

But overall, this language is unlike most that I know... :-)



Thanks for the history lesson :)

I started to learn VB about a year or so ago. I havent mastered it yet, and usually just modify code that I find from other programs, mainly to use with a 3D modeling program I use.

Autohotkey seems pretty easy to learn, and the documentation is great. When compiling an AutoHotkey script, how does the resulting file compare to the same type of program written in VB? Most people at my work use VB, and im wondering if I should spend more time learning that. AutoHotKey seems easier to use though :)

Chris
  • Administrators
  • 10727 posts
  • Last active:
  • Joined: 02 Mar 2004

The base of AHK is AutoIt v. 2.
...
AutoIt 2 itself took some inspiration from an old Microsoft batch language whose name escape me right now.

AutoIt v2's syntax is based on that of Microsoft's ScriptIt.

The AutoIt team released the source code as GPL (then made it private again)

No, as far as I know AutoIt v2 was never open-source. However, AutoHotkey uses AutoIt v3 code to implement about 40 commands, the complete list of which is at http://www.autohotke... ... 9710#19710

Chris preferred the old syntax, so he used this code to revive the project and extend it.

That was one of the reasons. The other main reason was my desire for better hotkey support. For more history, see http://www.autohotke... ... 0176#20176

scriptmonkey
  • Members
  • 176 posts
  • Last active: Jan 08 2015 07:42 PM
  • Joined: 19 May 2006
Someone asked me again today what language an app that I created was written in. Im still not sure what to tell people. Should I just say its based on an old MS program called ScriptIt?

corrupt
  • Members
  • 2558 posts
  • Last active: Nov 01 2014 03:23 PM
  • Joined: 29 Dec 2004

Someone asked me again today what language an app that I created was written in. Im still not sure what to tell people. Should I just say its based on an old MS program called ScriptIt?

No. The answer is that it was written in AutoHotkey. AutoHotkey is a language of its own.

Autohotkey seems pretty easy to learn, and the documentation is great. When compiling an AutoHotkey script, how does the resulting file compare to the same type of program written in VB? Most people at my work use VB, and im wondering if I should spend more time learning that. AutoHotKey seems easier to use though :)

It depends on what you need to do. If you will need to write and/or modify programs that others have written in VB then you will need to learn VB first.

I'm not sure what you mean when you ask if a resulting VB program compares to AutoHotkey. They both execute code... Neither of them are truly compiled. A compiled AutoHotkey script does not rely on additional files though. A VB program requires that the appropriate VB runtime package is installed on the system for the program to run.

The two programming languages are very different...

scriptmonkey
  • Members
  • 176 posts
  • Last active: Jan 08 2015 07:42 PM
  • Joined: 19 May 2006

I'm not sure what you mean when you ask if a resulting VB program compares to AutoHotkey. They both execute code... Neither of them are truly compiled. A compiled AutoHotkey script does not rely on additional files though. A VB program requires that the appropriate VB runtime package is installed on the system for the program to run.

The two programming languages are very different...


Thanks for the explanation. If somone ask me again ill just say AutoHotKey, an open-source language. Ill also tell them to checkout the site.

As for my question about how a VB vs AutoHotKey program compares, say you create simple program that performs the same function in both programs. (and the program is written well) Since VB has references, is the resulting .EXE smaller than a AutoHotKey program?

PhiLho
  • Moderators
  • 6850 posts
  • Last active: Jan 02 2012 10:09 PM
  • Joined: 27 Dec 2005

Since VB has references, is the resulting .EXE smaller than a AutoHotKey program?

Yes, a VB program can be less than 50KB. But it needs a multimegabyte DLL to run... Which may need to be installed, if not already on the system.

Neither of them are truly compiled.

I believe recent VB versions (since VB5?) are fully compiled. They still need DLLs, but so are MFC applications...
Posted Image vPhiLho := RegExReplace("Philippe Lhoste", "^(\w{3})\w*\s+\b(\w{3})\w*$", "$1$2")

corrupt
  • Members
  • 2558 posts
  • Last active: Nov 01 2014 03:23 PM
  • Joined: 29 Dec 2004

As for my question about how a VB vs AutoHotKey program compares, say you create simple program that performs the same function in both programs. (and the program is written well) Since VB has references, is the resulting .EXE smaller than a AutoHotKey program?

Well, yes and no. If you compare the size of a compiled AutoHotkey app and a VB app the VB app will likely be smaller in size. This is a bit deceptive though. The reason is because the VB code is using the runtimes that are installed on the system to execute the code. The compiled AutoHotkey app has the code for AutoHotkey compiled into it and doesn't rely on external runtimes. If you choose not to compile the AutoHotkey code and run as a script then the AutoHotkey app will likely be smaller in size. The disadvantage to this is that your code will be plain text and readable by others though (if that is an issue).