Jump to content
aryan-eliza

Why AutoIt, and not another language like C# or Python?

Recommended Posts

Hi all, not looking to start a debate or stir the pot - just looking for honest answers from people who are more familiar than I. 

I recently started a new job position and I've been having to use AutoIt as part of the job responsibilities. I am just now hearing and learning about AutoIt, and while I have enjoyed what I have learned so far I would like to know why or what the advantages of using AutoIt are over other languages such as Python or C#? 

Share this post


Link to post
Share on other sites

Because when you distribute an AutoIt program, you clients/customers/users wont need to download some 100MB shitty redistributables...

And, knowing pretty well AutoIt and others languages (C and GoLang), I can tell you that AutoIt is strong enough to make pretty anything for Windows.

Share this post


Link to post
Share on other sites

1) From idea on the shitter --> proof of concept   is rarely measured in anything other than minutes.

2) The helpfile is gd amazing (which often facilitates #1).

3) people who have to maintain your uncommented code in the future get the luxury of 1 and 2.

 


,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-.
|(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/
(_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_)
| | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) (
| | | | |)| | \ / | | | | | |)| | `--. | |) \ | |
`-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_|
'-' '-' (__) (__) (_) (__)

Share this post


Link to post
Share on other sites

AutoIt is a pretty good all-rounder, generally being capable of doing most things, and far speedier to get up & running than other languages in that regard, though not speedier when it comes to process execution, which is one of its few downfalls, but which rarely matters normally. At the end of the day, you should use the right tool for the right job, but if your Toolbox only contains AutoIt, you are still looking damn good and cooking with fire in 95%+ instances.

Edited by TheSaint

Make sure brain is in gear before opening mouth!
Remember, what is not said, can be just as important as what is said.

Spoiler

What is the Secret Key? Life is like a Donut

If I put effort into communication, I expect you to read properly & fully, or just not comment.
Ignoring those who try to divert conversation with irrelevancies.
If I'm intent on insulting you or being rude, I will be obvious, not ambiguous about it.
I'm only big and bad, to those who have an over-active imagination.

I may have the Artistic Liesense ;) to disagree with you. TheSaint's Toolbox (be advised many downloads are not working due to ISP screwup with my storage)

userbar.png

Share this post


Link to post
Share on other sites

The one thing I liked about AutoIt, and most scripting languages, is that you don't have to compile it before you can run it. You just run the code, and if there's an error, it's easy to fix it and run it to test it again. There's no waiting for the compiler to run, no need for anything else to happen, they just run.

The second best thing I love about AutoIt is that it's case insensitive for variables and function names. I know a lot of people cringe when they see that, but too bad, I like it. :)

Also, no stupid line endings like in a C/C++ program, I mean seriously, what is the semi colon for? What semi-literate programmer ever uses a run on line of code, and why allow it in the first place?


If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Share this post


Link to post
Share on other sites

they allow it because some people DO that stuff... lol, it's just how the compilers work. I love C/C++/C# and Python. all golden languages that have high earnings potential if you can program well.

I do not prefer the VB like loosey goosey stuff, too much leeway for error, strict and strongly typed languages for the win.

I still like Autoit for it's simplicity when  I have simple tasks to do for automation purposes. it's a good and useful automation scripting language. if it's complicated or needs to be fast, it's one of the other languages I use. Like said here before, use the tool that fits the job. If you are an uber AutoIt guru, have at it.

for automating the installs of our products, autoit is golden and simplest to use. super reliable if written well. I have a template based on my UDF that handles most of the control waiting and clicking and logging. That way all my installer scripts work in the same unified way. This way I can fully test the installers GUI (and is done once silent install works perfectly) for full installer regression testing.

Edited by Earthshine

My resources are limited. You must ask the right questions

 

Share this post


Link to post
Share on other sites
1 minute ago, Earthshine said:

they allow it because some people DO that stuff

Uneducated people that never have to show their code perhaps.

2 minutes ago, Earthshine said:

I love C/C++/C# and Python. all golden languages that have high earnings potential if you can program well.

I don't program for a living, so that's a moot point. I program to fix a problem or to make my repetitive or PITA tasks easier.

I threw together a multi-tabbed GUI one day just so I wouldn't have to remember what the command line parameters are for Robocopy, took longer to align the checkboxes than it did to write the underlying code in AutoIt. Plus the resulting  exe was miniscule and portable to any computer that had robocopy on it.


If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Share this post


Link to post
Share on other sites

can i have a copy of that gui please? sounds usefull, i always have to look up the command.. lol, only when I need to add it to a batch or something though for automation purposes. your gui would be nice for that I think.

as far as the other thing, it's like that because they wrote the compiler to use that as the key to end the programming statement. Kernahan and Ritchie, go ask them. For the record, I don't ever do that either. But even InstallScript uses it as the end of a statement. I guess it just stuck.

Edited by Earthshine

My resources are limited. You must ask the right questions

 

Share this post


Link to post
Share on other sites

In addition to my earlier comments, AutoIt is a very forgiving and quite flexible language, that doesn't need a lot of recall or understanding of a huge bunch of concepts. Sure, knowing that stuff can improve how your use of or understanding of AutoIt is, but for many uses you can get by just fine relying on the wonderful Help file and online help and examples. I've never regretted giving up on other languages for the most part, and just relying on AutoIt. But then, I am just a hobby programmer who wants better control and usage of his PC, and I answer to no-one .... except my wife & kids & mother. I don't have to be a perfectionist, though I am very organised with structure and method. I do usually put in extra effort though, because I regularly share my work, but my comments can often be sparse, and not as many error checks as could be.

Edited by TheSaint

Make sure brain is in gear before opening mouth!
Remember, what is not said, can be just as important as what is said.

Spoiler

What is the Secret Key? Life is like a Donut

If I put effort into communication, I expect you to read properly & fully, or just not comment.
Ignoring those who try to divert conversation with irrelevancies.
If I'm intent on insulting you or being rude, I will be obvious, not ambiguous about it.
I'm only big and bad, to those who have an over-active imagination.

I may have the Artistic Liesense ;) to disagree with you. TheSaint's Toolbox (be advised many downloads are not working due to ISP screwup with my storage)

userbar.png

Share this post


Link to post
Share on other sites
On 9/6/2019 at 8:46 PM, BrewManNH said:

Also, no stupid line endings like in a C/C++ program, I mean seriously, what is the semi colon for? What semi-literate programmer ever uses a run on line of code, and why allow it in the first place? 

C and all other C-like languages do not use whitespace for terminating statements, so you have to use the semi-colon to indicate the end of a statement. While I do see the benefits of having a simple syntax where each line is a command, there are several neat things you can do without taking up a bunch of lines where whitespace doesn't matter... Like a single line for loop :)

It all comes down to preference obviously, those are more well versed with C-like programming and have good enough experience may prefer to have a more flexible syntax over a simple but restrictive one.

Anyone using JavaScript is already probably taking advantage of the "whitespace-agnostic" syntax unknowingly... whitespace based statement structure in these languages is also not really pretty in some cases, so if you can't make it pretty, make it short (while keeping it readable).

Edited by TheDcoder

A cross-platform implementation of the AutoIt language

My contributions to the AutoIt Community ##AutoIt at freenode, real-time chat

3fHNZJ.gif

Spoiler

If I have hurt or offended you in anyway, Please accept my apologies, I never (regardless of the situation) intend to do that to anybody.

Share this post


Link to post
Share on other sites

I mostly like AutoIt for its ease of teaching. I personally believe a lot of beginner coders (especially older beginners) give up learning early due to a lack of *usable* results in a given time-frame. Telling someone to spend weeks learning about xyz to only come out with a knowledge of variables, operators, keywords etc. doesn't build confidence but oh wait... you can create a banana class and use that... where? (Is it showing that I'm not a proponent of OOPLs?)

Inherently, the whole ethic of AutoIt means that within the first week of learning coding from knowing zero, your student has already created a GUI! This is huge IMO. It empowers the beginner and they *know* they can use that GUI for something.

I've been using AutoIt solely for some time now, and have a bunch of applications installed on many computers at work. 100+ users per day; Admin dashboards for each app; logging, automated emails, web API calls, FTP usage, Excel and Word manipulation, Android adb interaction, etc etc etc... Not as much as other members here have made, but a complete ground-up re-write of an app that's fit for a corporate environment can take less than a day, including a smidgin of testing!

And when you want to delete a project folder, you don't have to be patient with Windows while it hangs on "Calculating time required to delete files...". Code re-usability that doesn't come with the cost of a million dependencies, I could go on all day about why I love AutoIt but I think I'm just preaching to the choir by now 😛

Share this post


Link to post
Share on other sites
  • Its an easy language to learn
  • Its capable of controlling other applications: Click buttons, set textvalues, read values
  • Easy to install from a zip or usb stick
  • Small and quick IDE compared to the bigger ones for Java, C# just use Scite and you are up and running
  • Small exe when compiled
  • Examples in the help files are excellent

Nowadays I would partly say that Powershell can also do a lot of stuff where I used AutoIt for in the past.

  • Create simple and quick a GUI frontend
  • No install (ISE is available on all Windows machines)
  • AutoIt syntax I favor over PowerShell although both decided to have a $ in front of variable names

 

Share this post


Link to post
Share on other sites
On 9/7/2019 at 3:16 AM, BrewManNH said:

Also, no stupid line endings like in a C/C++ program, I mean seriously, what is the semi colon for? What semi-literate programmer ever uses a run on line of code, and why allow it in the first place?

And curly brackets.  WTF man...

Share this post


Link to post
Share on other sites
7 hours ago, davetapson said:

And curly brackets.  WTF man...

Great first post!

Jos


SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
On 9/6/2019 at 11:29 AM, BrewManNH said:

Uneducated people that never have to show their code perhaps.

I don't program for a living, so that's a moot point. I program to fix a problem or to make my repetitive or PITA tasks easier.

I threw together a multi-tabbed GUI one day just so I wouldn't have to remember what the command line parameters are for Robocopy, took longer to align the checkboxes than it did to write the underlying code in AutoIt. Plus the resulting  exe was miniscule and portable to any computer that had robocopy on it.

Sounds like you’re just complaining for no reason and just because you can’t understand something  doesn’t mean there’s not a good reason for it. 


My resources are limited. You must ask the right questions

 

Share this post


Link to post
Share on other sites
On 9/4/2019 at 10:11 PM, aryan-eliza said:

Hi all, not looking to start a debate or stir the pot - just looking for honest answers from people who are more familiar than I. 

I recently started a new job position and I've been having to use AutoIt as part of the job responsibilities. I am just now hearing and learning about AutoIt, and while I have enjoyed what I have learned so far I would like to know why or what the advantages of using AutoIt are over other languages such as Python or C#? 

AutoIt is a really decent all-rounder, by and large being able to do, and far speedier to find a good pace than different dialects in such manner, however not speedier with regards to process execution, which is one of its couple of destructions, yet which once in a while matters ordinarily. Toward the day's end, you should utilize the correct instrument for the correct activity, yet on the off chance that your Toolbox just contains AutoIt, you are as yet looking damn great and cooking with fire in 95%+ occasions.

Share this post


Link to post
Share on other sites

Okay so my background is mainly with Java, Python and Autoit and here is my view. Depending on the task you are trying to accomplish is where the answer to this question lies. For more simple (smaller) standalone programs where you are not interacting with anything outside of what you are working on, maybe like a Gui or something that does one or two tasks, then I'd say AutoIt would be a good bet. It has all the building blocks one would need to get the logic down and look somewhat presentable. However if that Gui is to grow into an entire application, then I'd lean more towards something like Python that is an OOP language. The separation of concern that OOP languages offer, imo, will lead to a much more maintainable and supportable code that won't be such a pain to scale into something bigger. 

Although I think the biggest reason to use Python or Java (or OOP) over Autoit is simply the frameworks and libraries available to you with these other languages. While AutoIt is a great language, its not as widespread as some other ones are and hence sometimes does not offer exactly what you are looking for. For example one of the use cases I've used AutoIt and Python for is Web-scraping. Let's say I was trying to make a bot to scrape a list of websites as quickly as possible. While I could use the IE library, I would need to wait for the creation of the IE object, then navigate thru their site by clicks or something of the like until I was able to visit every page on the site and do a _IEBodyReadHtml or pull all the Dom objects I was after.

Without a doubt this will work. But say I was doing this for 5,000 websites.. this would take a long time. I could optimize the time by simply making HTTP requests to get the data instead and not wait for all that IE stuff. But with AutoIt, I would then need to parse the HTML or JSON myself using regular expressions or something else I would need to write. This would be a lot of work to either generalize this task into my own UDF to use or to make 5000 different sets of parsing code, one for each website. HOWEVER If I was aware that python has two very known and very used modules called the Requests library and the BeautifulSoup library, then all of that work is already done for me. I do not have to reinvent the wheel by creating all this parsing logic and with the use of these libraries can reduce the amount of work I'd have to do tenfold. 

So smaller stuff, AutoIt but if you want something scalable, an OOP Language. But that just my opinion... 

Share this post


Link to post
Share on other sites

For me its the small exe's it generates and the fact that the setup required is trivial compared with the unending downloads/path tweaks/etc you have to perform just to get Selenium/Java up and running.  So much setup and so many dependencies.  I like to develop solutions, not spend all day "hoping" that I have every little tiny thing setup right just to get going.  I realize that AUTOIT is not the best tool for everything but for any of us its perfect. 

Share this post


Link to post
Share on other sites

AutoIt is a very simple procedural language, a GUI can be made in less than 10 minutes, the Hungarian connotation is not necessary to declare variables or special things, it can be executed on any Windows PC, it is loved by an intel engineer who He uses it to make measurements even someone who wants to automate a task, it is undoubtedly a very simple procedural language.

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

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...