Jump to content

Attaching External Exe to AutoIt GUI


amin84
 Share

Recommended Posts

Hello, I have a main GUI written in AutoIt. The help file for the program is a Flash transparent Exe that will overlay the main gui. I made the main gui to move with the Flash executable perfectly. And I made it that the flash help will stay on top when it's activated.

There is just one problem. When another window is selected while the help is running(let's say Explorer) then we select the help to move both windows around and move them over the Explorer, the main GUI will follow but it will go behind the Explorer window.

I know why it's doing that but I don't know how to fix it. We have to somehow tell the main GUI to monitor the Flash help. If it's activated, bring the main GUI on top (not most top) just once.

Here is the code for following the Flash help:

Run('data\qbHelp.exe')
While Not WinExists("LeoMoon QuickBackup Help")
    Sleep(20)
WEnd
$getPos = WinGetPos($MainForm)
WinMove("LeoMoon QuickBackup Help", "", $getPos[0]-300+153, $getPos[1]+30-167)
While WinExists("LeoMoon QuickBackup Help")
    GUISetState(@SW_DISABLE, $MainForm)
    $helpActive = WinGetState('LeoMoon QuickBackup Help')
    If BitAnd($helpActive, 8) Then
        WinSetOnTop("LeoMoon QuickBackup Help", "", 1)
    Else
        WinSetOnTop("LeoMoon QuickBackup Help", "", 0)
    EndIf
    $getPos = WinGetPos('LeoMoon QuickBackup Help')
    If IsArray($getPos) Then
        WinMove($mainForm, "", $getPos[0]+300-153, $getPos[1]-30+167)
    EndIf
    Sleep(5)
WEnd
GUISetState(@SW_ENABLE, $MainForm)

Anyone has a better solution?

Tnx.

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