Jump to content

How to code it using AutoIT?


Recommended Posts

Referring to following coding, I would like to know on executing powershell or batchfile within AutoIT as shown below

Does anyone have any suggestions on how to implement under AutoIT environment?
Thanks in advance for any suggestions

 

#include <IE.au3>
While ProcessExists("iexplore.exe")
    ProcessClose("iexplore.exe")
WEnd
Global $oIE = _IECreate("https://www.cnn.com")
Sleep(3000)
_IEQuit($oIE)

Powershell -ExecutionPolicy Unrestricted -File D:\test.ps1 
OR
D:\test.bat

 

 

Edited by oemript
Link to comment
Share on other sites

  • Moderators

I'm not understanding what you want to do. If you just want to run a PowerShell command in AutoIt, you would do something like this:

Run("powershell.exe <commands>")

But why mix languages in your script? If you would explain what you're actually trying to do, it might help others help you.

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...