Jump to content
Sign in to follow this  
TXTechie

AutoIt vs. PowerShell

Recommended Posts

TXTechie

Hello Everyone,

I know that this is an AutoIt forum and that everyone here loves AutoIt (as I do). But, I was hoping that some of you whom might have experience with PowerShell could provide me with a more objective comparison as to whether it makes more sense to use AutoIt or PowerShell as my primary "wrapper" for driving all of the software deployments within my company. Currently, I'm using VBScript for my "wrapper" template, but I'm seriously thinking about switching to either AutoIt or PowerShell.

Which one should I use and why?

Share this post


Link to post
Share on other sites
water

You could use both. Call PowerShell from AutoIt.

Why:

AutoIt is easy to learn. Moving from VBScript to AutoIt shouldn't be a problem.

Powershell is powerfull. Some things that can't be done with AutoIt can be done using PS.


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites
keldepulo

You could use both. Call PowerShell from AutoIt.

Why:

AutoIt is easy to learn. Moving from VBScript to AutoIt shouldn't be a problem.

Powershell is powerfull. Some things that can't be done with AutoIt can be done using PS.

 

with aut2exe you can create an encrypted executable script embedding everything you need, and than execute them everywhere (on every NT version ) without installing bloaded components ...

have you never tried to do this with vbscript or with powershell ?

Share this post


Link to post
Share on other sites
water

Here is the >link how to combine AutoIt and Powershell.


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites
TXTechie

Thanks, water! You make some great points - using AutoIt as my primary foundation or "wrapper" I have GUI functions AND I can use PowerShell from within AutoIt (even adding a GUI for PowerShell functionality)! The best of both worlds!

Does anyone else have any suggestions/input?

Share this post


Link to post
Share on other sites
water

Just an observation.

I run PS from Autoit by directly calling powershell.exe to create an Exchange mailbox. It runs forever (about 30 seconds) and uses a huge amount of storage (about 160 MB).

So I use PS only if I can't avoid it.


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites
JLogan3o13

I would agree with Water - I've used PowerShell in the past, but now only do so when I cannot accomplish something purely with AutoIt (which is rare).


√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites
scubar

I use AutoIt for the majority of my tasks.

I recently began using Powershell as its far easier/safer to accomplish Active Directory tasks in Powershell than in Autoit though.

Share this post


Link to post
Share on other sites
water

I recently began using Powershell as its far easier/safer to accomplish Active Directory tasks in Powershell than in Autoit though.

Did you have a look at my AD UDF? I'm sure it is faster and easier than PS.

What do you think makes PS safer than AutoIt regarding AD?


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites
scubar

No offence but I would just much rather use Powershell as it has been designed by Microsoft with an aim to make windows server based tasks easier.

The AD Cmdlets are so easy to work with it makes automating tasks a breeze

Share this post


Link to post
Share on other sites
JLogan3o13

It is a personal choice, to be sure, scubar. I see AutoIt the same way - it has been designed to work with the Windows API, and to make tasks easier (not only server tasks). And from my personal use of the AD Cmdlets, I have only found one task out of literally hundreds of scripts that I could not do more easily in AutoIt. It's all about your experiences with a language, I guess :)


√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites
water

No offence taken :)

If you feel better using PS to interact with AD, fine. The AD UDF was started when there was no Powershell available.

As JLogan3o13 said: It is a personal choice.


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites
water

icecola321,

is this post related to the subject? Don't understand what you try to tell us. Please use Google translate to create a meaningful english post.


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites
spudw2k

with aut2exe you can create an encrypted executable script embedding everything you need, and than execute them everywhere (on every NT version ) without installing bloaded components ...

Mostly true, except for the "encrypted" part; the security (integrity) of a complied script has been discussed time and time again on this forum.

I didn't want to leave that (as slight as it may seem) hanging out there.  It could be ill or un-informed info, but I don't want other un-informed users to adopt it.

The ultimate lesson here is, don't script something you aren't willing to risk being seen by prying eyes (such as sensitive names, sites and credentials).

Sorry for the rant.

Anyways, both PowerShell and AutoIt are great.  I mostly have AutoIt experience and it has worked well for me.

Share this post


Link to post
Share on other sites
TXTechie

I have also heard (and experienced some) of the slowness of PowerShell. Just another good reason to go with AutoIt.

I have decided to go ahead an migrate my template from VBScript to AutoIt.

I want to thank everyone for their input!

Share this post


Link to post
Share on other sites
spudw2k

Despite what new members may think--specifically one's who want something for nothing or clearly disregard the rules--this forum is a great resource/community for learning; so please don't hesitate to ask for help when needed.

  • Like 1

Share this post


Link to post
Share on other sites
TXTechie

Thank you, spudw2k. And, I agree with you - this community has already helped me and if I'm going to be using AutoIt even more than I have in the past, I fully expect to be here in the forums more often.  :rolleyes:

Share this post


Link to post
Share on other sites
Starstar

I do not know about powershell. But i must say one thing "autoit is an easiest tool in programming". 


Life is like a coin. You can spend it Anyway as you wish and for your kind information. "you can spend it only once."

Share this post


Link to post
Share on other sites
water

Adnan,

do you really think this helps the OP? Would be better posted in the Chat section.


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites
JLogan3o13

I do not know about powershell. But i must say one thing "autoit is an easiest tool in programming". 

 

Adnan, every time you start spamming threads with these irrelevant posts you get warned by a Mod. How long before you actually learn?

Back on topic - the other big difference in my mind is GUI goodness in AutoIt. I much prefer building a GUI in AutoIt (despite the limitation in the look and feel of windows) rather than a wpf app in PowerShell.


√-1 2^3 ∑ π, and it was delicious!

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  

  • Similar Content

    • DynamicRookie
      By DynamicRookie
      Hey there!
       
      Is there a way to detect movement only for 1 specific window?

      HWnd is not really working, it still detects movement in all the windows within the region

      This is my script:
       
      ;Checksum actual HotKeySet("{f2}", 'exit_') MsgBox(0, '', '0') Beep(500, 2000) $Hwnd = WinActive('') while 1 $Checksum = PixelChecksum(211, 650, 1094, 914, 1, $Hwnd) If PixelChecksum(211, 650, 1094, 914, 1, $Hwnd) <> $Checksum Then For $i = 1 To 100 Beep(1000, 50) Next MsgBox(0, '', 'New message!', 1) EndIf WEnd Func exit_() Beep(500, 1000) Exit 0 EndFunc I just want to check whenever a message comes because the app i use doesn't give notifications properly.

      Any help is really appreciated!
    • PramodR
      By PramodR
      Can you please see whats wrong im doing in the below code? i can read few registry entry but not all for eg, i am able to get value of "Shell" Key from the registry path  but not AutoAdminLogon which has the value of "1", is there any change i have to do to read numeric values?
       Global  $shello = RegRead ("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon","Shell" )
       ConsoleWrite("This is Hello"& $shello)
      above command returns proper value , but same command with AutoAdminLogon returns null as shown in below ? infact registry has the value of 1.
       Global  $shello = RegRead ("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon","AutoAdminLogon" )
       ConsoleWrite("This is Hello"& $shello)
    • Eminence
      By Eminence
      Hello,
      I've been searching on how to select the first row in my database which includes a time column based on the latest start_time date for today's date.
      This is my current code:
      Local $iCurrentDate = _Now() Local $sqlHandle = _dbOpen($sDbPath) Local $aResult, $iRows, $iCols _SQLite_GetTable2d($sqlHandle, "SELECT start_time FROM " & $srawDb & " ORDER BY datetime(start_time) DESC LIMIT 1", $aResult, $iRows, $iCols) _ArrayDisplay($aResult) _dbClose($sDbpath) What it does is it gets the first row entry in the database however it does not select the latest start_time entry in the database, it always select the first row. I've tried changing DESC to ASC to see if that will do it but the issue still remains. Any thoughts on this? Thanks in advance.
       
      *EDIT
      The date format in the database is by MM/DD/YYYY HH:MM:SS.
    • Trisha
      By Trisha
      Hello,
      I Have clicked on save as option to save a file, while doing that I need to rename a file appending with sysdate. I have searched in google find the below one line of code:
      FileMove("C:\somefile.txt", "C:\somefile1.txt"), When I am trying to append with sysdate. It is not happening. Please help me out  with the small issue.
    • TrashBoat
      By TrashBoat
      hey i would like to know if its possible to take a string like this
      $string = "onethousandninehundredeightyfive" and convert it into:
      $string = "one thousand nine hundred eighty five" i have something going on here but its no use
      $string = "onethousandninehundredeightyfive" Global $array[9] = ['one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine'] Global $array1[19] = ['onethousand', 'twothousand', 'threethousand', 'fourthousand', 'fivethousand', 'sixthousand', 'seventhousand', 'eightthousand', 'ninethousand','tenthousand','hundred', 'twohundred', 'threehundred', 'fourhundred', 'fivehundred', 'sixhundred', 'sevenhundred', 'eighthundred', 'ninehundred'] MsgBox(0, 0, AddSpaces($string)) Func AddSpaces($string) Local $finalStr $length = StringLen($string) For $x = 0 To $length Local $trim = StringTrimRight($string, $x) For $h = 0 To 18 If $trim = $array1[$h] Then $finalStr = $finalStr & " " & $trim $string = StringTrimLeft($string, $h) $length = StringLen($string) EndIf Next For $z = 0 To 8 If $trim = $array[$z] Then $finalStr = $finalStr & " " & $trim $string = StringTrimLeft($string, $z) $length = StringLen($string) EndIf Next Next Return $finalStr EndFunc ;==>AddSpaces  
×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.