Belini Posted May 6, 2023 Share Posted May 6, 2023 (edited) I'm having problems with the windows welcome screen because I put a program in the start menu that has an opening and it is entering before the welcome screen disappears, there is only sound without image because the welcome screen covers the opening screen , I need to know when the welcome screen has completely disappeared to let my program open. EDITED: I couldn't get window name nor process name that may exist while the welcome screen is visible Edited May 6, 2023 by Belini My Codes: Virtual Key Code UDF: http://www.autoitscript.com/forum/topic/138246-virtual-key-code-udf/ GuiSplashTextOn.au3: http://www.autoitscript.com/forum/topic/143542-guisplashtexton-udf/ Menu versions of Autoit: http://www.autoitscript.com/forum/topic/137435-menu-versions-of-autoit/#entry962011 Selects first folder of letters: ]http://www.autoitscript.com/forum/topic/144780-select-folders-by-letter/#entry1021708/spoiler] List files and folders with long addresses.: http://www.autoitscript.com/forum/topic/144910-list-files-and-folders-with-long-addresses/#entry102 2926 Program JUKEBOX made in Autoit:some functions:http://www.youtube.com/watch?v=WJ2tC2fD5Qs Navigation to search:http://www.youtube.com/watch?v=lblwOFIbgtQ Link to comment Share on other sites More sharing options...
mutleey Posted May 7, 2023 Share Posted May 7, 2023 Wouldn't it be easier to disable the welcome screen? Link to comment Share on other sites More sharing options...
Belini Posted May 7, 2023 Author Share Posted May 7, 2023 (edited) do you know which commands turn off the welcome screen in autoit? Edited May 7, 2023 by Belini My Codes: Virtual Key Code UDF: http://www.autoitscript.com/forum/topic/138246-virtual-key-code-udf/ GuiSplashTextOn.au3: http://www.autoitscript.com/forum/topic/143542-guisplashtexton-udf/ Menu versions of Autoit: http://www.autoitscript.com/forum/topic/137435-menu-versions-of-autoit/#entry962011 Selects first folder of letters: ]http://www.autoitscript.com/forum/topic/144780-select-folders-by-letter/#entry1021708/spoiler] List files and folders with long addresses.: http://www.autoitscript.com/forum/topic/144910-list-files-and-folders-with-long-addresses/#entry102 2926 Program JUKEBOX made in Autoit:some functions:http://www.youtube.com/watch?v=WJ2tC2fD5Qs Navigation to search:http://www.youtube.com/watch?v=lblwOFIbgtQ Link to comment Share on other sites More sharing options...
mutleey Posted May 7, 2023 Share Posted May 7, 2023 https://www.computerhope.com/issues/ch000537.htm You can also use the noguiboot option. Link to comment Share on other sites More sharing options...
Belini Posted May 7, 2023 Author Share Posted May 7, 2023 Manually I already know how to do it but I wanted to do it by commands and it would be for windows 7 and higher. My Codes: Virtual Key Code UDF: http://www.autoitscript.com/forum/topic/138246-virtual-key-code-udf/ GuiSplashTextOn.au3: http://www.autoitscript.com/forum/topic/143542-guisplashtexton-udf/ Menu versions of Autoit: http://www.autoitscript.com/forum/topic/137435-menu-versions-of-autoit/#entry962011 Selects first folder of letters: ]http://www.autoitscript.com/forum/topic/144780-select-folders-by-letter/#entry1021708/spoiler] List files and folders with long addresses.: http://www.autoitscript.com/forum/topic/144910-list-files-and-folders-with-long-addresses/#entry102 2926 Program JUKEBOX made in Autoit:some functions:http://www.youtube.com/watch?v=WJ2tC2fD5Qs Navigation to search:http://www.youtube.com/watch?v=lblwOFIbgtQ Link to comment Share on other sites More sharing options...
Werty Posted May 7, 2023 Share Posted May 7, 2023 You could do a pixelsearch, so if the welcome screen is still active it wont start playing until it's gone. Your program opens, but before it starts playing anything it checks if it is visible by using PixelGetColor(), looking for itself, loop until the pixel is found, then when the welcome screen disappears your program is visible and you can start playing the video. If your program is fullscreen with no borders, then just look for pixels that are no longer the color of the welcome screen. Some guy's script + some other guy's script = my script! Link to comment Share on other sites More sharing options...
mistersquirrle Posted May 7, 2023 Share Posted May 7, 2023 I just put together a test to log the currently active window and handle, and that could be useful. I started from SciTE, locked the computer, unlocked it, and ended back at ScITE: 2023-05-07 16.15.16.786: Current window: C:\Users\Raven\Documents\AutoIt\IsComputerLocked.au3 - SciTE [20 of 20] - 0x00000000000B1D98 2023-05-07 16.15.19.367: Current window: - 0x0000000000000000 2023-05-07 16.15.20.255: Current window: Windows Default Lock Screen - 0x00000000000300CE 2023-05-07 16.15.22.714: Current window: - 0x0000000000000000 2023-05-07 16.15.26.396: Current window: UnlockingWindow - 0x00000000008E2586 2023-05-07 16.15.26.881: Current window: C:\Users\Raven\Documents\AutoIt\IsComputerLocked.au3 - SciTE [20 of 20] - 0x00000000000B1D98 Everything besides SciTE there is interesting for your use-case, I think. The empty window handle should only exists (I imagine) when on the lock screen or some other high level Windows screen, then the 'Default Lock Screen' and 'UnlockingWindow' would only exist while the user is signing in. Here's the test: Global $hWnd While 1 $hWnd = WinGetHandle('[ACTIVE]') ConsoleWrite(WinGetTitle($hWnd) & ' - ' & String($hWnd) & @CRLF) Sleep(100) WEnd I would recommend that you use something like this to test for your use-case and see what results you get. I don't really have a "welcome screen" myself, just the lock screen, and I don't normally restart my computer very often so I'm not going to test that for you, especially since I don't think that my setup would work for what you're looking for. We ought not to misbehave, but we should look as though we could. Link to comment Share on other sites More sharing options...
Belini Posted May 8, 2023 Author Share Posted May 8, 2023 @werty and @mistersquirrle I'll try both options, thanks for the tips. My Codes: Virtual Key Code UDF: http://www.autoitscript.com/forum/topic/138246-virtual-key-code-udf/ GuiSplashTextOn.au3: http://www.autoitscript.com/forum/topic/143542-guisplashtexton-udf/ Menu versions of Autoit: http://www.autoitscript.com/forum/topic/137435-menu-versions-of-autoit/#entry962011 Selects first folder of letters: ]http://www.autoitscript.com/forum/topic/144780-select-folders-by-letter/#entry1021708/spoiler] List files and folders with long addresses.: http://www.autoitscript.com/forum/topic/144910-list-files-and-folders-with-long-addresses/#entry102 2926 Program JUKEBOX made in Autoit:some functions:http://www.youtube.com/watch?v=WJ2tC2fD5Qs Navigation to search:http://www.youtube.com/watch?v=lblwOFIbgtQ Link to comment Share on other sites More sharing options...
ioa747 Posted May 8, 2023 Share Posted May 8, 2023 I enriched the above script - nice catch @mistersquirrle #include <WinAPIProc.au3> Global $hWnd, $PID HotKeySet("{END}", "_Sleep") Sleep(1000) While 1 ConsoleWrite("--------------------------------------------------------------------------------" & @CRLF) $hWnd = WinGetHandle('[ACTIVE]') ConsoleWrite("$hWnd:" & String($hWnd) & @CRLF) ConsoleWrite("WinTitle:" & WinGetTitle($hWnd) & @CRLF) $PID = WinGetProcess($hWnd) ConsoleWrite("PID:" & $PID & @CRLF) ConsoleWrite("PID FileName:" & _WinAPI_GetProcessFileName($PID) & @CRLF) Sleep(1000) WEnd Func _Sleep() Send("#1") EndFunc -------------------------------------------------------------------------------- $hWnd:0x00010280 WinTitle:Windows Default Lock Screen PID:9200 PID FileName:C:\Windows\SystemApps\Microsoft.LockApp_cw5n1h2txyewy\LockApp.exe -------------------------------------------------------------------------------- argumentum 1 I know that I know nothing Link to comment Share on other sites More sharing options...
mistersquirrle Posted May 8, 2023 Share Posted May 8, 2023 (edited) Nice, @ioa747. There's another enhancement that could be done, but I didn't include it as when I tested it didn't give me any other results that I saw to be useful. It would be something like this: expandcollapse popup#include <WinAPIProc.au3> Global $hWnd, $PID, $hPrevWnd = -1 Global $aWindows Global $sMsg = '' Global $iPidTemp ; I'm not sure what the purpose of this is ;~ HotKeySet("{END}", "_Sleep") Sleep(1000) While 1 Sleep(250) $hWnd = WinGetHandle('[ACTIVE]') If $hPrevWnd = $hWnd Then ContinueLoop $hPrevWnd = $hWnd ConsoleWrite("--------------------------------------------------------------------------------" & @CRLF) ConsoleWrite("$hWnd:" & String($hWnd) & @CRLF) ConsoleWrite("WinTitle:" & WinGetTitle($hWnd) & @CRLF) $PID = WinGetProcess($hWnd) ConsoleWrite("PID:" & $PID & @CRLF) ConsoleWrite("PID FileName:" & _WinAPI_GetProcessFileName($PID) & @CRLF) $aWindows = WinList() $sMsg = '' For $iWindow = 1 To $aWindows[0][0] ; If $aWindows[$iWindow][0] = 'Default IME' Then ContinueLoop ; I think that these can be safely skipped $iPidTemp = WinGetProcess($aWindows[$iWindow][1]) If $iPidTemp = $PID And $aWindows[$iWindow][1] <> $hWnd Then $sMsg &= @TAB & "$hWnd:" & String($aWindows[$iWindow][1]) & @CRLF $sMsg &= @TAB & "WinTitle:" & String($aWindows[$iWindow][0]) & @CRLF EndIf Next If $sMsg <> '' Then ConsoleWrite('Additional windows: ' & @CRLF & $sMsg) EndIf WEnd ;~ Func _Sleep() ;~ Send("#1") ;~ EndFunc It didn't add anything for the blank handles or for "Windows Default Lock Screen", and for "UnlockingWindow" it's related to explorer.exe so it also listed all or most other open windows on the system. Edited May 8, 2023 by mistersquirrle ioa747 1 We ought not to misbehave, but we should look as though we could. Link to comment Share on other sites More sharing options...
Belini Posted May 9, 2023 Author Share Posted May 9, 2023 I couldn't define which window is the welcome screen and I ended up making an interface to open in black and my program is in a loop monitoring to see when it is visible, that is, while the welcome screen is on top my program is in a loop and when the black screen I created appears, it exits the loop and continues with its script, thanks to everyone who helped and gave tips as these alternatives may be useful in other cases. My Codes: Virtual Key Code UDF: http://www.autoitscript.com/forum/topic/138246-virtual-key-code-udf/ GuiSplashTextOn.au3: http://www.autoitscript.com/forum/topic/143542-guisplashtexton-udf/ Menu versions of Autoit: http://www.autoitscript.com/forum/topic/137435-menu-versions-of-autoit/#entry962011 Selects first folder of letters: ]http://www.autoitscript.com/forum/topic/144780-select-folders-by-letter/#entry1021708/spoiler] List files and folders with long addresses.: http://www.autoitscript.com/forum/topic/144910-list-files-and-folders-with-long-addresses/#entry102 2926 Program JUKEBOX made in Autoit:some functions:http://www.youtube.com/watch?v=WJ2tC2fD5Qs Navigation to search:http://www.youtube.com/watch?v=lblwOFIbgtQ Link to comment Share on other sites More sharing options...
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