Jump to content

Executing Script with C++ GUI and Script just pauses


Recommended Posts

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
Link to comment
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.

Link to comment
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.

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