Jump to content


Photo

AutoHotkey vs. AutoIt?


  • Please log in to reply
117 replies to this topic

#1 Ace_NoOne

Ace_NoOne
  • Members
  • 299 posts

Posted 26 January 2006 - 10:19 AM

Hey guys,

I just got a weird reply over at the PSPad forums:

If you use AutoHotKey you might want to have a look at AutoIt, which is the original scripting language in which AutoHotKey was based. It is much more powerful than AutoHotKey (you can even create GUI programs, which can be compiled, it can also create COM objects, has Regular Expression capabilities and more). It also has a nicer syntax!

Do some research and you'll find out that AutoHotKey actually "borrowed" most of its source code from an older version of AutoIt.

Check it at: www.autoitscript.com

You will not regret giving it a try!

Cheers,

Angel

That sounds a little hostile towards AHK!? I've never worked with AutoIt, but from what I'd read here and there, I somehow thought that AHK was more like AutoIt v2.0...
Could someone please clear this up for me?

#2 toralf

toralf
  • Fellows
  • 3948 posts

Posted 26 January 2006 - 11:17 AM

If you search this forum, you'll find several posts on this.

Yes it is true, Chris started off from the - at that time open source - code of AutoIt. It is mentioned several times in the documentation and in the source code of AHK. That's why he is maintaining the backward compatibility to AutoIt2 scripts.

AutoIt3 has some very nice features, but AHK has some as well. It is up to the user to decide which app he wants to use.

Some AutoIt users like to flame on AHK. Don't get annoyed, just choose the app you want to use.

And syntax preferences is very subjective. I like AHKs syntax. But I wouldn't bash on AutoIt. It's your personal choice.

#3 Ace_NoOne

Ace_NoOne
  • Members
  • 299 posts

Posted 26 January 2006 - 02:20 PM

I had tried the search function, but since it cannot be limited to searching the topic titles only (yet?), I got a huge list of results of mostly unrelated topics... :(

Frankly, I currently don't see any reason to use AutoIt - as far as I can tell, AHK offers everything I need (except maybe RegExp). This might me simple ignorance on my part, as I would probably find some helpful functions if I delved into it, but then I'd probably miss a number of AHK features... Plus I don't really have the capacities to learn yet another language atm.

I don't suppose there's a concise list for comparison of the two languages? For some projects, it might be better to use one over the other, and such a list could help your decision.

#4 PhiLho

PhiLho
  • Fellows
  • 6850 posts

Posted 26 January 2006 - 04:11 PM

as far as I can tell, AHK offers everything I need (except maybe RegExp)

There is a workaround... Topic is argumented elsewhere too.

Com/Ole: also discussed over and over. :-)

I saw people arguing that AHK has a superior handling of hotkeys.
I don't know if these tools can be compared feature for feature, anyway. One choice criterion could be taste in language (some like the simplicity of AutoHotkey, others prefer the familiar look of AutoIt3), another could be the frequency of updates (AHK wins...) or the need for the source code (idem). Helpfulness of the forum can be a plus too :-D

#5 JSLover

JSLover
  • Members
  • 920 posts

Posted 26 January 2006 - 06:19 PM

One choice criterion could be taste in language

...I hate that AU3 is too much like Basic...While...Wend's piss me off...they don't even have a Loop { } command (I don't think they have blocks { } either) (their Break, isn't even Break, it's some other dumb thing about not LETTING the USER close the script {fishy!})...you gotta pick For...Next (which is ok in JavaScript {& only called a for loop}, but horrid in Basic/AU3), Do...Until (um? Loop/if/break anyone?) or While...Wend (ick!)...& then there's the fact they WERE open source...& then closed the door? fishy! fishy! From what I've heard...the forums aren't friendly & they (forum users/AU3 devs or both {not sure}) treat Chris as if he STOLE the code & made AHK...open source means he can "STEAL" it...(it's not stealing). I wasn't able to find any mention of it having been open source (on their site)...or the code to the old version...?

#6 Chris

Chris
  • Administrators
  • 10727 posts

Posted 27 January 2006 - 12:56 AM

Chris started off from the - at that time open source - code of AutoIt.

To clarify, the core framework of AutoHotkey.exe (syntax, parsing, variables, etc.) was written from scratch without the use of source code from other projects. However, it does use AutoIt v3 code to implement about 40 commands, the complete list of which is at http://www.autohotke... ... 9710#19710

By contrast, the following external utilities distributed with AutoHotkey are 99% the work of the AutoIt authors Jon and Larry: ahk2exe, AutoScriptWriter, and Window Spy.

#7 jagpanzer

jagpanzer
  • Members
  • 10 posts

Posted 27 January 2006 - 05:54 AM

I'm a complete newb here, but my vote goes to AHK... for whatever little that is worth. I was telling my roommate earlier, I have NEVER seen a forum where there is as much combined effort or as many people working to help each other out. I've been nothing but impressed and pleased.

#8 Ace_NoOne

Ace_NoOne
  • Members
  • 299 posts

Posted 27 January 2006 - 06:54 AM

Yes, these forums are a definite plus. Without you guys here, I would probably have dropped the idea of learning AHK early on.

What confuses me though: How could they go from the GPL license to closed-source? They would've had to re-write all the code then, no? And was there any special reason for this step, because that really strikes me as strange...

#9 PhiLho

PhiLho
  • Fellows
  • 6850 posts

Posted 27 January 2006 - 09:25 AM

What confuses me though: How could they go from the GPL license to closed-source? They would've had to re-write all the code then, no? And was there any special reason for this step, because that really strikes me as strange...

I thought about that too, but I believe the original author of a software, as long as he owns all the code (ie. eg. he didn't used GPL software himself), as full control on his choice of licence. For example, a common case is to make a software GPL for open sources projects, but with a commercial licence if an entreprise wish to use it in a close source project.

And I suppose he also has the right to change licence as he wish. The most common cases being going from GPL to LPGL (to ease its free use in commercial/closed projects) or even to a more liberal BSD-like licence.

#10 BoBo

BoBo
  • Guests

Posted 27 January 2006 - 09:51 AM

And was there any special reason for this step

some people weren't happy about the success of AHK. And if AU3 would still be open source AHK could have been seen as AU3++ (as if its included Hotkey support).
IMHO it's fair to orientate any further development of AHK on function(alitie)s of other successfull scripting languages (like AU3) as reinventing the wheel wouldn't make any sense to me. Anyway ... Have fun (even if you're a AU3 coder :wink:)

How could they go from the GPL license to closed-source

Interesting question!

#11 AGU

AGU
  • Guests

Posted 27 January 2006 - 12:11 PM

btw. there is already a very large thread concerning this subject:
http://www.autohotke...opic.php?t=4363

Cheers
AGU

#12 macscript

macscript
  • Guests

Posted 05 February 2006 - 06:49 PM

I just install both, I think Autohotkey is Better for GUI, an Autoit is better for doing other things.

#13 polyethene

polyethene

    Administrator

  • Administrators
  • 5473 posts

Posted 05 February 2006 - 08:55 PM

You might aswell learn (Visual)Basic if you think about AutoIt. Reason being is that they're similar in terms of difficulty and Basic is superior (and comes with IDE apps). Having used both AutoIt and AutoHotkey I can say that AutoIt's syntax is better programatically but AutoHotkey is far more simple which means you can do what you want faster and easier.

In my opionion, AutoHotkey is the real deal for quick automation or for making your own utils. Use AutoIt for making more bigger apps unless you can afford something better (like VB/C#/Java?).

#14 PhiLho

PhiLho
  • Fellows
  • 6850 posts

Posted 06 February 2006 - 07:15 AM

Titan: your advices are good, but:

1) VB is compiled and need a large runtime (last time I checked, at least);
At least, AutoIt and AutoHotkey scripts run as fast as you save your file... :-) and the runtime is small.

2) VB isn't able to do automation like the two above, although you can use AutoIt's ActiveX version with VB.

3) Java is useful, but is certainly not in the field of Windows automation. Perfect for big applications, as you write, though.

Note that Microsoft released a free version of Visual Basic. And some Basic(-like) languages are free as well, like Euphoria, etc.
There was even a free release of RealBasic, which wanted to gain legacy Visual Basic (unhappy with the .Net turn) and boasted complete compatibility.

#15 polyethene

polyethene

    Administrator

  • Administrators
  • 5473 posts

Posted 06 February 2006 - 04:48 PM

VB apps are compiled specially for a smaller file size and better performance (in the later IL-type versions anyway). AutoIt and AutoHotkey contain the whole library of commands in compiled scripts when only about a tenth of them are used in a typical script. You could say the speed vs. performance issue between AutoIt and VB is balanced.

Regarding VB and automation, I've used quite a few VB macros and game automation programs so I was speaking from experience. But since I don't have much experience in the VB language I won't contest your point.

Also thanks for the heads-up on the free VB scripting programs. I don't use VB much though but it's useful to know there's stuff out there..