Jump to content
oemript

How to code it using AutoIT?

Recommended Posts

oemript
Posted (edited)

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

Share this post


Link to post
Share on other sites
MrKris1224

_RunDos()

Share this post


Link to post
Share on other sites
oemript

The following coding fail to run and get Error

_RunDos("D:\Temp\ABC.bat")

Do you have any suggestions on what wrong it is?
Thank you very much for any suggestions (^v^)

 

Share this post


Link to post
Share on other sites
JLogan3o13

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.

  • Thanks 1

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

How to get your question answered on this forum!

Share this post


Link to post
Share on other sites
oemript
Posted (edited)

Thanks, to everyone very much for suggestions (^v^)

Edited by oemript

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

×