Sign in to follow this  
Followers 0
Roshith

AutoIt vs Python

13 posts in this topic

Hi,

I never scripted in Python, but pretty comfortable with AutoIt. But I understand that python works on any platform and AutoIt on Windows.

But in Windows platform, is Python any better than AutoIt?

in other words

Are there any things which can be done only by Python and not by AutoIt on Windows or Vice versa

Rgds

Roshith

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Python supports native threads, in AutoIt all threads have to be created in a dll or with inline-asm.

Apart from that you can do about anything Pothon supports in AutoIt and vice versa. Only the difficulty level for different tasks varies.

Edited by ProgAndy

*GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes

Share this post


Link to post
Share on other sites

Thanks for your quick reply..

Can you please explain me "in AutoIt all threads have to be created in a dll or with inline-asm"

When do we use this? Can we create and export dll in AutoIt?

Share this post


Link to post
Share on other sites

That means if you wanna do threads in autoit, you either have to write the code in another language or write raw machine code. Python is an object oriented language, while autoit is a procedural language. They are both interpreted languages, but python is compiled to bytecode before interpretation, that gives much greater speed, in some cases comparable to compiled languages.

Python has a huge library for nearly everything, while autoit is heavily aimed towards automation. Hence, that is easier in autoit, while more generic programming probably fits python better.


Ever wanted to call functions in another process? ProcessCall UDFConsole stuff: Console UDFC Preprocessor for AutoIt OMG

Share this post


Link to post
Share on other sites

Thanks Shaggi.. That is a good piece of knowledge

Share this post


Link to post
Share on other sites

They are both interpreted languages, but python is compiled to bytecode before interpretation, that gives much greater speed, in some cases comparable to compiled languages.

I'm not sure if this is true.

Autoit at time of compilation converts script to bytecode too. So what's the diference?

Share this post


Link to post
Share on other sites

Zedna,

Autoit at time of compilation converts script to bytecode too

I believe the actual script text, less comments and blank lines, is compressed (and so encrypted slightly) and then appended to the interpreter stub, which decompresses and reads the appended script line-by-line at runtime. So there is no bytecode conversion in the normally accepted sense of "compilation". :D

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites

As someone who uses both:

AutoIt is better for GUIs. It doesn't have to worry about cross-platform stuff so it's easier to use. Python is better at maths. The python language can be extended a lot easier than AutoIts... By that I mean you can overload operators with custom types.

There are automation frameworks for python. I never bothered as AutoIt does everything I need with automation.

Share this post


Link to post
Share on other sites

I'm not sure if this is true.

Autoit at time of compilation converts script to bytecode too. So what's the diference?

Nope, it doesn't. Bytecode in this context means that variables, names, expressions and statements etc. is reduced (reinterpreted and compiled) to an much easier language to interpret, with index and numbers as variable names and a set of instructions, for example. It looks something like assembly. This means, that compilation of a script takes a little longer, but might increase execution speed a hundred times.

Ever wanted to call functions in another process? ProcessCall UDFConsole stuff: Console UDFC Preprocessor for AutoIt OMG

Share this post


Link to post
Share on other sites

Nope, it doesn't. Bytecode in this context means that variables, names, expressions and statements etc. is reduced (reinterpreted and compiled) to an much easier language to interpret, with index and numbers as variable names and a set of instructions, for example. It looks something like assembly. This means, that compilation of a script takes a little longer, but might increase execution speed a hundred times.

Until Autoit 3.2.6 Aut2Exe just merged runtime bin + original script (with bundled includes and removed comments).

But Since 3.2.6 version Aut2Exe creates "bytecode" - binary preprocessed script.

As you can see from changelog Jon did subsequent speed improvements so this new bytecode compilated code runs 54% to 64% faster.

I'm not expert in this area so please no flame here I just point that Autoit has some kind of bytecode compilation too.

I didn't know that there are such diferent kinds of bytecode compilation.

3.2.6.0 (25th August, 2007) (Release)

- Changed: AutoIt .a3x and compiled script format. Exe2Aut will only decompile 3.2.5.1

and earlier files. No ExeAut utility is supplied for ongoing versions.

- Changed: General performance improvements (currently around 30-40% over 3.2.4.9)

3.2.8.0 (8th September, 2007) (Release)

- Changed: General speed improvements (currently up to 24% in some cases compared to 3.2.6.0).

Share this post


Link to post
Share on other sites

You did your maths wrong Zedna :D , that 24% is on top of the 30-40%, so it's actually 61.2 - 73.6% faster compared to 3.2.4.9.

Share this post


Link to post
Share on other sites

#12 ·  Posted (edited)

You did your maths wrong Zedna Posted Image , that 24% is on top of the 30-40%, so it's actually 61.2 - 73.6% faster compared to 3.2.4.9.

That's true. Also, Mat you did your grammar wrong. :D

Any way python is better for making small games (example of a game I've worked on and helped with) in my opinion and small scripts however, AutoIt is by far the best and fastest Automation for Windows AND Linux (I finally got AutoIt to pass calls to Linux via a heck of a lot of Jury-rigging with shell scripts. o/)

Edited by rcmaehl

My UDFs are generally for me. If they aren't updated for a while, it means I'm not using them myself. As soon as I start using them again, they'll get updated.

MY PROJECTS


Active: IRC UDF, WindowEx UDF
Discontinued: GithubBubbleSort UDF

Share this post


Link to post
Share on other sites

#13 ·  Posted (edited)

These days i'm starting learning Python, and the thing that (i think) really lakes in Python, is the ability to compile a script to an .exe with only one key!

In python, i tried to compil using py2exe and another tool (don't remeber it's name) and i didn't make it cause i used PyOpenGL.

So, i think the compilation is easier in AutoIt, and i really like this.

Edited by matwachich

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0