Jump to content

automation in an exe


ktoya
 Share

Recommended Posts

I need to do some automation in an exe file,

for example in attached screenshot

if today is tuesday click button 1

else click button 2

can Autoit do it? the real case is more complicate than this example, is it possible to put the exe in the "autoit shell", something like load a flash by using below code:

$oFlash = ObjCreate("ShockwaveFlash.ShockwaveFlash.1")

post-79139-0-39261400-1377184689_thumb.j

Link to comment
Share on other sites

Hi again, I have read the help file about FileInstall() function and still don't understand how to "adding another program as a resource", it is just copy the file from one location to another to me.

Is there some example code for my case?

Link to comment
Share on other sites

Using FileInstall() allows you to take a file that exists on disk, and use it in your exe later (even on another PC). You use it like this:

$sFile = "C:\Test\calc.exe"
If Not FileExists($sFile) Then FileInstall("C:\calc.exe", $sFile)
Run($sFile)

The function above will check to see if a file exists ($sFile) and then place the file on the disk if it does not, then run the file.

To make it work, you need to copy "calc.exe" and place in your C: drive. Compile the script, then run it on your PC, and another PC. If it works correctly, it should open the Windows calculator from "C:Testcalc.exe"

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...