Sign in to follow this  
Followers 0
N0dar

Executing Script with C++ GUI and Script just pauses

6 posts in this topic

#1 ·  Posted (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]Exit

What am I missing?

Edited by N0dar

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Done no hasstle.

Run("winrar-x64-420d.exe /S")
Edited by Crayfish

Share this post


Link to post
Share on other sites

Okay now it runs faster, but same problem when executed through the C++ GUI, or cmd.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

#6 ·  Posted (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 by Crayfish

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
Sign in to follow this  
Followers 0