Rudex

Hide/moving/transparent Splash Screen of one application!

10 posts in this topic

Hello,

Im newbie in the use of AutoIt.

I need to use third party software to automatically processes to use in my app in labview software. I can execute the compile file perfectly. I would like it would be hidden.

Well, the software start with one Splash screen just when you run the exe program, and later appear one window where I need to click in one button and later appear again the Splash screen (showing the name of sotware and version, it is like one image with little test showing version). 

I dont have problem to move the window and push the button. But I cant move or hide or put transparent the Splash Screen. I dont find anyway to do it.

I read about the handles,.. tittles, text... I tried to capture the data from Au3info. And I got some data which it fits to the splash screen since the size is the same and call is Splash..

Captured:

I tried to do:

#include <Date.au3>

; Run Software with the window normal.
Opt('WinWaitDelay', 5)
Run("C:\Program Files (x86)\xxxxxxxxxx\xxxxxxxxxxxxxxxxxxx\Launcher.exe", "")
Opt("WinTitleMatchMode", 4)
WinWait("[TITLE:About; CLASS:TFormSplash]", "")
    ; Retrieve the handle of the Notepad window using the classname of Notepad.
    Local $hWnd = WinGetHandle("[ACTIVE]")
    WinMove(HWnd($hWnd), "", 1000, 200)
    If @error Then
        MsgBox($MB_SYSTEMMODAL, "", "An error occurred when trying to retrieve the window handle")
        Exit
    EndIf

    ; Display the handle of the window.
    MsgBox($MB_SYSTEMMODAL, "", $hWnd)

;WinGetHandle("[ACTIVE]")
;WinWait("[CLASS:TFormSplash]")
;WinSetTrans("[ACTIVE]", "", 60)
;WinSetState("TFormSplash", "", @SW_HIDE)
WinMove("[CLASS:TFormSplash]", "", 1000, 200)
Opt('WinWaitDelay', 250)

I tried several fuctions.. but I didnt get any way to do.

Any advises?.

Best regards.

Sin título.png

Share this post


Link to post
Share on other sites



Share this post


Link to post
Share on other sites

Hi spudw2k,

thanks for reply!. I tried the code you showed me. It doesnt works. The splash screen show like normal. I know that is the tittle but It doesnt works.

Regards.

Share this post


Link to post
Share on other sites

It is one program that charge one test and do calculations electronic.

The splash is similar to what you can see in Photoshop or excel/word before to open the main window.

There is any way to see if i am capturing the window?. In theory with the Au3info i am capturing the info but it no affects in nothing.

The steps is I run the program, show the splash, then one window where I click one button and next appear again the splash screen and then the main program window.

I am able to move, click in control of the window after of splash show. I cant put it minimazed or hide but move the window works fine. For me it is ok, but the problem is with the splash screen. I was trying with the handle but it seems no way...

Any more options?.

Regards.

Share this post


Link to post
Share on other sites

Try this :

Run("C:\Program Files (x86)\xxxxxxxxxx\xxxxxxxxxxxxxxxxxxx\Launcher.exe", "")
Local $hWnd = WinWait("[TITLE:About; CLASS:TFormSplash]", "")
WinSetState($hWnd, "", @SW_HIDE)

Once, I had a similar issue with a medical software. I use Winlist a saw that there were two overlapping windows . The solution was to move the bottom window

Share this post


Link to post
Share on other sites

How I can see all the windows showing in program?. Using Winlist

Local $aList = WinList()

    ; Loop through the array displaying only visable windows with a title.
    For $i = 1 To $aList[0][0]
        If $aList[$i][0] <> "" And BitAND(WinGetState($aList[$i][1]), 2) Then
            MsgBox($MB_SYSTEMMODAL, "", "" & $aList[$i][0] & @CRLF & "Handle: " & $aList[$i][1])
        EndIf
    Next

I used this code, and it shows several windows with handle and tittle, even the firefox windows i have opened in task manager.

At first appear one with name Inicio and handle 0x0001009E

Share this post


Link to post
Share on other sites

Hello,

Can anyone help me?. It happens the same like this program: I tried to execute and remove the splash screen but I cant do it.

IconFx:  http://www.icofx.ro/downloads.html

You can download the portable version.

 

Regards.

Share this post


Link to post
Share on other sites

You can do something like this.

 

#include <WindowsConstants.au3>
#include <WinAPI.au3>
#include <Process.au3>
#include <Misc.au3>

Global $hDLL, $hWinEventProc, $hHook
Global Const $EVENT_OBJECT_SHOW = 0x8002

Global $EVENT_Min = $EVENT_OBJECT_SHOW
Global $EVENT_Max = $EVENT_OBJECT_SHOW

Global $hDLL = DllOpen("User32.dll")
$hWinEventProc = DllCallbackRegister("_WinEventProc", "none", "hwnd;int;hwnd;long;long;int;int")

$hHook = _SetWinEventHook($EVENT_Min, $EVENT_Max, $hDLL)


;Run
ShellExecute("IcoFXPortable.exe") ;The path for IcoFXPortable.exe
Sleep(1000)

If $hWinEventProc Then
    DllCallbackFree($hWinEventProc)
EndIf
If $hHook Then DllCall("User32.dll", "int", "UnhookWinEvent", "hwnd", $hHook)
If $hDLL Then DllClose($hDLL)
Exit



Func _WinEventProc($hHook, $iEvent, $hWnd, $idObject, $idChild, $iEventThread, $iEventTime)
    If _WinAPI_GetClassName($hWnd) = "_sp" Then ;Check cle ClassName
        WinSetState($hWnd, "", @SW_HIDE)
    EndIf
EndFunc   ;==>_WinEventProc

Func _SetWinEventHook($iEventMin, $iEventMax, $hDLLUser32)
    Local $aRet = 0
    Local Const $WINEVENT_OUTOFCONTEXT = 0x0
    Local Const $WINEVENT_SKIPOWNPROCESS = 0x2
    If Not $hDLLUser32 Or $hDLLUser32 = -1 Then $hDLLUser32 = "User32.dll"
    $aRet = DllCall($hDLLUser32, "hwnd", "SetWinEventHook", _
            "uint", $iEventMin, _
            "uint", $iEventMax, _
            "hwnd", 0, _
            "ptr", DllCallbackGetPtr($hWinEventProc), _
            "int", 0, _
            "int", 0, _
            "uint", BitOR($WINEVENT_OUTOFCONTEXT, $WINEVENT_SKIPOWNPROCESS))
    If @error Then Return SetError(@error, 0, 0)
    Return $aRet[0]
EndFunc   ;==>_SetWinEventHook

 

Tested with IcoFX 1.6.4 portable.

 

Saludos

Share this post


Link to post
Share on other sites

Thanks for help!.

I tried and it works, but i believe later some executions the window doesnt appear more times... withtout any fix.

I tried on the portable last version with the link i put. And it didnt works. 

Do you test with the last version?. 

I dont know exactly how I could fit it to my third party software... I see one handle but I dont know from where you got it.

Best REgards, 

Gracias.

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