ktoya Posted August 22, 2013 Share Posted August 22, 2013 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") Link to comment Share on other sites More sharing options...
0xdefea7 Posted August 22, 2013 Share Posted August 22, 2013 Yes, AutoIt is capable of doing these things As far as putting the "exe in the autoIt shell", I think you mean adding another program as a resource and yes. FileInstall() function will help you. Link to comment Share on other sites More sharing options...
ktoya Posted August 23, 2013 Author Share Posted August 23, 2013 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 More sharing options...
0xdefea7 Posted August 23, 2013 Share Posted August 23, 2013 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now