N0dar Posted July 16, 2012 Posted July 16, 2012 (edited) Hello guys!I created a GUI in C++ and when I click on a button it executes a AutoIt Script.The Script runs and the tray icon appears, but nothing happens. When I manually execute the script per double-click it just works fine.Here's the code:RunWait("winrar-x64-420d.exe")[/font][/color] [color=#282828][font=helvetica, arial, sans-serif]WinWait("WinRAR 4.20 - Deutsche Version") ControlClick("WinRAR 4.20 - Deutsche Version", "&Installieren", "Button2")[/font][/color] [color=#282828][font=helvetica, arial, sans-serif]Winwait("WinRAR-Setup") Sleep(3000) ControlClick("WinRAR-Setup", "&OK", "Button27")[/font][/color] [color=#282828][font=helvetica, arial, sans-serif]WinWait("WinRAR Setup") Sleep(3000) ControlClick("WinRAR Setup", "&Fertig", "Button1")[/font][/color] [color=#282828][font=helvetica, arial, sans-serif]WinWait("WinRAR") Sleep(3000) ControlClick("WinRAR", "&OK", "Button1")[/font][/color] [color=#282828][font=helvetica, arial, sans-serif]ExitWhat am I missing? Edited July 16, 2012 by N0dar
Crayfish Posted July 16, 2012 Posted July 16, 2012 (edited) Done no hasstle. Run("winrar-x64-420d.exe /S") Edited July 16, 2012 by Crayfish
N0dar Posted July 16, 2012 Author Posted July 16, 2012 Okay now it runs faster, but same problem when executed through the C++ GUI, or cmd.
Crayfish Posted July 16, 2012 Posted July 16, 2012 This script is actually installing Winrar NOT launching or run Winrar. Big difference!I just make it silent. If you want to install Winrar. It did exactly what it suppose to. There will be no taskbar or tray icon.Are you trying to run WinRAR or install?I don't understand why you run C++ to run an autoit script.
N0dar Posted July 16, 2012 Author Posted July 16, 2012 Yes, it should install it, and it does. But it doesn't when I try to run the script per cmd or GUI Buttons. When I try nothing happens except a tray icon appears and it says that the script is paused when I click on it.
Crayfish Posted July 16, 2012 Posted July 16, 2012 (edited) Cmd would need full path to where the .exe located. Did you define the a full path to the file? Same thing for GUI button. It doesn't know where the .exe is Edited July 16, 2012 by Crayfish
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