topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Monday December 9, 2024, 8:21 am
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: REQ: HTPC Util - Hide Desktop for x seconds while program is being executed.  (Read 20480 times)

famewolf

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 31
    • View Profile
    • Donate to Member
There may be something that does this already but I've been unable to locate it.  In a nutshell I use Media center to record tv and Mediaportal to play shows....I have a "shortcut" in the menu of mediaportal that runs MCE but for a brief period while it's running the executable the user can see the desktop...I'm looking for a utility that will either blank the screen for x seconds or display a fake progress bar while blanking the screen until mce is fully loaded and running.  The same would be true briefly when exiting MCE and returning to mediaportal (the shortcut I use doesn't actually close mediaportal..it's just minimized so it comes back up fairly quickly compared to the load of MCE which I guess averages around 8-10 seconds.  The program could either call mce directly or just run and blank the screen while my "multishortcut" plugin runs.....the multishortcut plugin can run up to 3 programs at the same time when clicking the menu item so I could run the MCE program AND a small util to blank screen/provide status bar....or I could call the util directly and let IT call MCE.....I would however be using the same program to also call the Kylo web browser from mediaportal.   I'm trying to make the execution more "wife friendly" so to speak.

Has anyone heard of anything similar or can toss something quickly together in autohotkey that does the minimum of blanking the screen for x seconds while mce loads?  The rest is just pie in the sky hopes.  Thanks for taking the time to listen to my rambling.

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,913
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
I'm looking for a utility that will either blank the screen for x seconds or display a fake progress bar while blanking the screen until mce is fully loaded and running.

kind of a cute idea for a little app..

dr_andus

  • Supporting Member
  • Joined in 2012
  • **
  • Posts: 851
    • View Profile
    • Dr Andus's toolbox
    • Donate to Member
For hiding the desktop, Fences comes to mind, though it would require that you set a neutral (solid) desktop colour (unless you don't mind seeing the wall paper):

Double-click any blank space on your desktop and your icons will fade out. Double-click again and they will return. You can even pick icons and individual fences to exclude.

Maybe a macro could do the double-clicking for you? Just guessing, not my area of expertise...

Stoic Joker

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 6,649
    • View Profile
    • Donate to Member
Instead of trying to workout complex timings and shortcuts, why not just have a full screen borderless black/blank window running all the time to hide the desktop. A single plain window wouldn't take much of anything to have running and MCE could (/should be able to) easily grab focus away from it.

If the taskbar was set to auto hide then it couldn't give away the ruse, and an embedded graphic could be added to the window to make it look like something is/was about to happening.

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,913
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
I don't know, i think his original idea still seems simpler and more useful in general: A utility you can invoke, which puts a black window on top covering the screen for a specified amount of time and then exits.
Ideally with a nice commandline customizable text message and/or a "please wait" animation.

Stoic Joker

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 6,649
    • View Profile
    • Donate to Member
More useful yes, simpler? Getting it to close consistently when the application that is opening doesn't know it's supposed to tell it to exit just strikes me as a bit problematic - But then again perhaps I've just been traumatized by my previous foolish attempts at getting a return value from ShellExec(...). So I figure to avoid the whole message loop peek-A-boo bit just leave it running.

*Shrug* Just a Thought man :D

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,913
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
I would just let it take a delay value, and exit itself after X seconds.

If you wanted to get fancy, let it take on the commandline the secondary application to execute, and then exit after that program has launched and opened a window (and then switch to that window on exit).

4wd

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 5,644
    • View Profile
    • Donate to Member
I haven't used/seen MCE but if it has a GUI couldn't you use Process.WaitForInputIdle to detect when the MCE interface comes up?

You could always have a timeout option to fall back to.
« Last Edit: March 22, 2014, 02:12 AM by 4wd »

4wd

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 5,644
    • View Profile
    • Donate to Member
Proof of concept: BlankIt

Usage: BlankIt.exe "full\path\to\executable" [timeout]

Where [timeout] is an integer, (no limit, in seconds), if a value isn't given, (or 0), then the default is 15 seconds.

What it does:
Screen goes black until the called programs GUI is ready for input.  The timeout will kick in if the GUI doesn't open in time or the program has no GUI.

I've only done limited testing with a few programs but it didn't seem to format my HDD.

Executes the program argument, then displays a topmost, borderless black window.  The PID from the Run command is used to execute a Process.WaitForInputIdle call.  If it's received or the timeout occurs, the window is hidden and BlankIt exits.  (Not really necessary to hide the window since BlankIt exits immediately after but wth ...)

NOTE: VERY minimal error checking is done in the program, (doesn't even check for existence of argument program).  Now it does.

Also note, if the program you want to run normally requires Admin privileges, then BlankIt will need to be run from a CLI with Admin privileges to avoid the UAC requester, (unless UAC is disabled).

Code: AutoIt [Select]
  1. #Region ;**** Directives created by AutoIt3Wrapper_GUI ****
  2. #AutoIt3Wrapper_UseUpx=n
  3. #AutoIt3Wrapper_Change2CUI=y
  4. #AutoIt3Wrapper_Res_Fileversion=0.0.1.32
  5. #AutoIt3Wrapper_Res_Fileversion_AutoIncrement=y
  6. #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
  7. #cs ----------------------------------------------------------------------------
  8.  
  9.  AutoIt Version: 3.3.8.1
  10.  Name:           BlankIt.au3
  11.  Author:         4wd
  12.  
  13.  Script Function:
  14.         Blanks screen until called programs GUI opens and is ready for input.
  15.  
  16.  Requires:
  17.         Ascend4nt's Process Function UDF: http://www.autoitscript.com/forum/topic/115352-process-thread-dll-functions-udfs/
  18.  
  19. #ce ----------------------------------------------------------------------------
  20.  
  21. #include <GUIConstantsEx.au3>
  22. #Include <WinAPIEx.au3>
  23. #include <WindowsConstants.au3>
  24. #include "[includes]\_ProcessFunctions.au3"
  25.  
  26. Opt('MustDeclareVars', 1)
  27.  
  28. Const $iAccess=0x00001000
  29. Local $iTimeout = 15, $sCommand, $sPath
  30.  
  31. #Region ### START Koda GUI section ### Form=
  32. Global $Blank = GUICreate("Blank", @DesktopWidth, @DesktopHeight, 0, 0, $WS_POPUP, $WS_EX_TOPMOST)
  33. GUISetBkColor(0x000000)
  34. #EndRegion ### END Koda GUI section ###
  35.  
  36. If $CmdLine[0] = 0 Then _Usage()
  37. For $i = 1 To $CmdLine[0]
  38.         Switch StringRegExp($CmdLine[$i], "(?i)[a-z]+", 0)
  39.                 Case 0
  40.                         If $CmdLine[$i] > 0 Then $iTimeout = $CmdLine[$i]
  41.                 Case 1
  42.                         If StringInStr($CmdLine[$i], "\") > 0 Then
  43.                                 $sCommand = $CmdLine[$i]
  44.                                 $sPath = StringLeft($sCommand, StringInStr($sCommand, "\", 0,-1))
  45.                         Else
  46.                                 $sPath = @ScriptDir & "\"
  47.                                 $sCommand = $sPath & $CmdLine[$i]
  48.                         EndIf
  49.                 Case Else
  50.         EndSwitch
  51.  
  52. If $sCommand = "" Or Not FileExists($sCommand) Then
  53.         ConsoleWrite("Error: Executable does not exist!" & @CRLF & @CRLF)
  54.         _Usage()
  55. $iTimeout *= 1000
  56.  
  57. Local $iPID = Run($sCommand, $sPath)
  58. If $iPID <> 0 Then
  59.         GUISetState(@SW_SHOW)
  60.         Local $hProcess = _ProcessOpen($iPID, $iAccess)
  61.         If $hProcess <> 0 Then
  62.                 _ProcessWaitForInputIdle($hProcess, $iTimeout)
  63.                 _ProcessCloseHandle($hProcess)
  64.         Else
  65.                 Sleep($iTimeout)
  66.         EndIf
  67.         Sleep(250)
  68.         GUISetState(@SW_HIDE)
  69.         Local $Data = _WinAPI_EnumProcessWindows($iPID)
  70.         If IsArray($Data) Then
  71.                 If $Data[0][0] > 0 Then
  72.                         _WinAPI_SetFocus($Data[1][0])
  73.                 EndIf
  74.         EndIf
  75.  
  76. _Exit()
  77.  
  78. Func _Usage()
  79.         ConsoleWrite("Usage: BlankIt.exe <executable> [timeout]" & @CRLF & @CRLF)
  80.         ConsoleWrite("Where: <executable> = full path to executable, (include quotes if required)" & @CRLF)
  81.         ConsoleWrite("       [timeout]    = optional time to wait for program interface in seconds" & @CRLF)
  82.         ConsoleWrite("                      Default = 15" & @CRLF)
  83.         _Exit()
  84.  
  85. Func _Exit()
  86.         Exit
« Last Edit: March 22, 2014, 11:53 PM by 4wd, Reason: v0.0.1.32 update »

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,913
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Nice.  Will the new window get focus, or might that be a feature to add?

4wd

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 5,644
    • View Profile
    • Donate to Member
v0.0.1.32 <- Link
  • Change: Reverts to timeout value if a handle to the process can't be obtained.
  • Added:  Set focus to program window, (if it has one), before exiting.
  • Added:  Simple usage directions, (run it without any arguments).
  • Change: Compiled as a CLI program, it produces no GUI, all errors go to the CLI.
  • Change: Slightly better args parsing, (not much better but it is an improvement).
  • Added:  Checks for executable existence, (full path not required if executable is in same folder as BlankIt).

[Pre-update silly remarks below]

Nice.

Thanks, although I expect a much more polished version from you ;)

Will the new window get focus, or might that be a feature to add?

Feature? ... to add?

I'll look at bringing the program window to the front before exit, although usually it'd get focus anyway wouldn't it?

That's how Windows usually works, run a program and it forces itself in front of everything else unless told otherwise.

I'll also change it so that if it can't get a handle to the process it'll drop back to timeout instead of throwing up a requester.

Just a note, I'm on a slow convict ship back to the UK in just over a week - I'll be incommunicado for 6 weeks ... yes, I know, much cause for celebration on the forum  :P
« Last Edit: March 23, 2014, 12:05 AM by 4wd »

cranioscopical

  • Friend of the Site
  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 4,776
    • View Profile
    • Donate to Member
Just a note, I'm on a slow convict ship back to the UK in just over a week - I'll be incommunicado for 6 weeks
I'm not sure I buy your story — I'm unable to find Communicado on Google maps  >:(
 

4wd

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 5,644
    • View Profile
    • Donate to Member
It's vacant these days: http://goo.gl/maps/G4rth

4wd

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 5,644
    • View Profile
    • Donate to Member
V0.0.1.x is up there.

This is version 0.0.2.x:
Added:    At great expense I had a custom icon designed just for this program ... I'm not sure the graphic artist entered into the spirit of the request  :-\
             (Then again, since it's a CLI only program did I waste my money?)
Added:    Can set optional text to display, limited to 30 characters.
Added:    Can set background colour.
Changed: It now takes one command line argument which is a config file.


Usage: Main difference with this version is it just takes a config file as the argument, eg. BlankIt.exe test.ini

This means, for example, you no longer need a number of long lines in a batch file.  You can have any number of config files and just call the one you want.

If you run the program without any arguments, a example config file called BlankIt.ini will be created - you can then edit it, rename it, or use it as is if you want Notepad.exe to open, (BlankIt.exe BlankIt.ini).

Here's the contents of the example:
Code: Text [Select]
  1. [Settings]
  2. Program="C:\Windows\System32\notepad.exe"
  3. Timeout=10
  4. Colour=000000
  5. Text=Wait for it!

Program is the program to run, full path required unless it's in the same directory as BlankIt.exe.

Timeout is the maximum time in seconds the blank screen will be displayed if the Process.WaitForIdleInput fails or the program has no GUI.  Maximum value is 180 seconds, if it's more than that or the equivalent of 0 then the default will be 15.

Colour is a RGB hex value, here's a list.  If it's input incorrectly, (ie. not a valid hex value), then it will default to black, (000000).  The text colour will be white for all values 7FFFFF and below, and black for all values 800000 and above.

Text can be left empty, ie. no text will be displayed.  The limit is 30 characters which fits in the width of a 1680 pixel screen, and honestly if you need to display more than 30 characters, chances are there might not be enough time to read them all.

Code: AutoIt [Select]
  1. #Region ;**** Directives created by AutoIt3Wrapper_GUI ****
  2. #AutoIt3Wrapper_Icon=BlankIt.ico
  3. #AutoIt3Wrapper_Outfile=BlankIt.exe
  4. #AutoIt3Wrapper_Change2CUI=y
  5. #AutoIt3Wrapper_Res_Fileversion=0.0.2.30
  6. #AutoIt3Wrapper_Res_Fileversion_AutoIncrement=y
  7. #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
  8. #cs ----------------------------------------------------------------------------
  9.  
  10.         AutoIt Version: 3.3.10.2
  11.         Name:           BlankIt.au3
  12.         Author:         4wd
  13.  
  14.         Script Function:
  15.         Blanks screen until called programs GUI opens and is ready for input.
  16.  
  17.         Requires:
  18.         Ascend4nt's Process Function UDF: http://www.autoitscript.com/forum/topic/115352-process-thread-dll-functions-udfs/
  19.         Yashied's WinAPIEx UDF:           http://www.autoitscript.com/forum/topic/98712-winapiex-udf/
  20.  
  21. #ce ----------------------------------------------------------------------------
  22.  
  23. #include <GUIConstantsEx.au3>
  24. #include <StaticConstants.au3>
  25. #include <WinAPIEx.au3>
  26. #include <WindowsConstants.au3>
  27. #include "[includes]\_ProcessFunctions.au3"
  28.  
  29. Opt('MustDeclareVars', 1)
  30.  
  31. Const $iAccess = 0x00001000
  32.  
  33. If $CmdLine[0] = 0 Then _Usage()
  34.  
  35. Local $sIniFile = $CmdLine[1]
  36. If Not FileExists($sIniFile) Then
  37.         _Usage()
  38.         _GetINI($sIniFile)
  39.  
  40. #Region ### START Koda GUI section ### Form=
  41. GUICreate("Blank", @DesktopWidth, @DesktopHeight, 0, 0, $WS_POPUP, $WS_EX_TOPMOST)
  42. #forcedef $iTextCol, $iColour, $sText
  43. GUISetFont(48, 600)
  44. GUICtrlCreateLabel($sText, 10, Int(@DesktopHeight/2 - 34), @DesktopWidth - 20, 68, BitOR($SS_CENTER, $SS_CENTERIMAGE))
  45. GUISetBkColor($iColour)
  46. #EndRegion ### END Koda GUI section ###
  47.  
  48. _Main()
  49. _Exit()
  50.  
  51. Func _GetINI($sFile)
  52.         Global $sProgram, $sPath, $iTimeout, $iColour, $sText, $iTextCol
  53.         $sProgram = IniRead($sFile, "Settings", "Program", "")
  54.         If Not FileExists($sProgram) Then
  55.                 ConsoleWrite("Error: Executable does not exist!" & @CRLF & "       Check configuration file" & @CRLF)
  56.                 _Exit()
  57.         Else
  58.                 If StringInStr($sProgram, "\") > 0 Then
  59.                         $sPath = StringLeft($sProgram, StringInStr($sProgram, "\", 0, -1))
  60.                 Else
  61.                         $sPath = @ScriptDir & "\"
  62.                         $sProgram = $sPath & $sProgram
  63.                 EndIf
  64.         EndIf
  65.         $iTimeout = IniRead($sFile, "Settings", "Timeout", "15")
  66.         If $iTimeout < 1 Or $iTimeout > 180 Then $iTimeout = 15
  67.         $iTimeout *= 1000
  68.         $iColour = "0x" & IniRead($sFile, "Settings", "Colour", "000000")
  69.         If IsNumber(Dec($iColour)) Then
  70.                 If Dec($iColour) >= 0 And Dec($iColour) <= 0xFFFFFF Then
  71.                         $iColour = "0x" & Hex($iColour, 6)
  72.                 EndIf
  73.         Else
  74.                 $iColour = "0x000000"
  75.         EndIf
  76.         If $iColour > 0x7FFFFF Then
  77.                 $iTextCol = 0x000000
  78.         Else
  79.                 $iTextCol = 0xFFFFFF
  80.         EndIf
  81.         $sText = StringLeft(IniRead($sFile, "Settings", "Text", ""), 30)
  82. EndFunc   ;==>_GetINI
  83.  
  84. Func _Main()
  85.         Local $iPID = Run($sProgram, $sPath)
  86.         If $iPID <> 0 Then
  87.                 GUISetState(@SW_SHOW)
  88.                 Local $hProcess = _ProcessOpen($iPID, $iAccess)
  89.                 If $hProcess <> 0 Then
  90.                         _ProcessWaitForInputIdle($hProcess, $iTimeout)
  91.                         _ProcessCloseHandle($hProcess)
  92.                 Else
  93.                         Sleep($iTimeout)
  94.                 EndIf
  95.                 Sleep(150)
  96.                 GUISetState(@SW_HIDE)
  97.                 Local $Data = _WinAPI_EnumProcessWindows($iPID)
  98.                 If IsArray($Data) Then
  99.                         If $Data[0][0] > 0 Then
  100.                                 _WinAPI_SetFocus($Data[1][0])
  101.                         EndIf
  102.                 EndIf
  103.         EndIf
  104. EndFunc   ;==>_Main
  105.  
  106. Func _Usage()
  107.         Local $aDemo[4][2] = [["Program", '"C:\Windows\System32\notepad.exe"'],["Timeout", 10],["Colour", "000000"],["Text", "Wait for it!"]]
  108.         ConsoleWrite("Usage: BlankIt.exe <config file>" & @CRLF & @CRLF)
  109.         ConsoleWrite("Where: <config file> = .ini containing command parameters" & @CRLF & @CRLF)
  110.         ConsoleWrite("       An example config file called BlankIt.ini has been" & @CRLF)
  111.         ConsoleWrite("       generated." & @CRLF)
  112.         IniWriteSection("BlankIt.ini", "Settings", $aDemo, 0)
  113.         _Exit()
  114. EndFunc   ;==>_Usage
  115.  
  116. Func _Exit()
  117.         Exit
  118. EndFunc   ;==>_Exit

And that's pretty much it until someone says something.
« Last Edit: March 25, 2014, 07:39 AM by 4wd »

famewolf

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 31
    • View Profile
    • Donate to Member
Wow..you folks are amazing.  I apologize for the late (6 months!) reply but for some reason I stopped receiving notices of posts to this thread so I assumed interest had been lost after mouser's comment about it being an interesting task.  I come back to find a full fledged program that has had multiple revisions.

To recap I use a plugin in mediaportal called multishortcut that can run up to 3 apps from a menu item.  I use it to call media center and when media center closes I am back in mediaportal.   I repeat this information because it appears relevant to the scenario listed below.

1) I modified multishortcut to call blankit and pass an argument of "7mc.ini" which was basically the default one except I changed the wording to "Loading MCE...".
2) 7mc.ini was setup to call c:\windows\ehome\ehshell.exe.
3) I ran mediaportal and clicked on the 7mc menu item.
4) A dos shell opened running Blankit.exe  (is there a way to hide the shell?)
5) Loading MCE... displays for 1 second or less. (the ini specifies 10 seconds)
6) Blankit.exe dos shell is visable again and then closes.
7) Screen is "blank" for what feels like about 10 seconds.
8) MCE is running but only displays for less than a second.
9) Loading MCE... displays for less than 1 second.
10) Screen returns to displaying MCE again.
11)  As soon as any key on the keyboard is touched I am bounced back into mediaportal.
12) After exiting mediaportal I found that MCE was still running in memory and had not closed.

I ran it multiple times to ensure I documented each step.  I've reverted back to calling ehshell directly again for the time being.  I think at least part of the issue is mediaportal see's blankit close and thinks the task is complete.  For my scenario it would probably have to continue running until the task it calls dies.
« Last Edit: September 20, 2014, 03:51 PM by famewolf, Reason: Added step 12 »

4wd

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 5,644
    • View Profile
    • Donate to Member
You can use cmdow with the /HID parameter to run it without the CLI appearing.

I'll have a look at it but I'm currently overseas with just a netbook so don't expect anything too soon.

famewolf

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 31
    • View Profile
    • Donate to Member
Thanks!  Anything quicker than 6 months beats my response time. ;)

4wd

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 5,644
    • View Profile
    • Donate to Member
Thanks!  Anything quicker than 6 months beats my response time. ;)

Well, I guess I didn't make it before the six months time limit ... I added the option to wait for the called program to exit then completely forgot about posting it  :-[

Oh well, happens when you get older  ;D

Try this version, there's an option added to the .ini file called Wait, set it to True or False depending on whether you want to have BlankIt wait for the process it calls to exit, before exiting itself.

Attachment removed.
« Last Edit: May 08, 2015, 08:40 AM by 4wd »

famewolf

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 31
    • View Profile
    • Donate to Member
Thanks..I've grabbed it and will give it a try but if I understand you right it's an all or nothing setting?  Why not let a /wait parm or something be added so the user could have one application wait while another does not?   It will certainly do the trick in my case but might be an issue for others.

famewolf

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 31
    • View Profile
    • Donate to Member
Well I tried it "this morning" as it's 4am here.   It's not waiting the 10 seconds......it's flashing the "Loading MCE.... very briefly and I want to say it's showing the desktop both before and afterward before Media Center loads...it all happens pretty fast (I just switched to an ssd which resolved this issue somewhat) but I'm certain there is a flash of desktop AFTER the Loading MCE...just not positive about the Before.  Here's the 7MC.ini I'm using.....I get the same result when just running "Blankit.exe 7MC.ini" from the command line.

[Settings]
Program="c:\windows\ehome\ehshell.exe"
Timeout=10
Colour=000000
Text=Loading MCE...
Wait=True

The good news it does load Media center and media center stays running and does what it should but it's not actually doing it's assigned goal of keeping the screen/text up during the transition.  It might work for passing subliminal messages though. ;)


4wd

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 5,644
    • View Profile
    • Donate to Member
Thanks..I've grabbed it and will give it a try but if I understand you right it's an all or nothing setting?  Why not let a /wait parm or something be added so the user could have one application wait while another does not?

Since you need one .ini file per application and the Wait parameter is set in that .ini file according to what you want, it's not an all or nothing setting.

The setting applies according to what it is set for, for that particular execution.  One .ini could have Wait=True, the next could be Wait=False.

It's not waiting the 10 seconds......

The timeout period is only used if the executed program' process can not be opened to check for a wait idle state.

In your case, the MCE process can be opened to check its state, thus the Timeout period is redundant.  MCE' process then indicates that it's ready to accept input so BlankIt closes its screen and swaps to MCE.

Timeout is the maximum time in seconds the blank screen will be displayed if the Process.WaitForIdleInput fails or the program has no GUI.

To solve the flash of Desktop before switching to MCE, I'll switch it around to swap to MCE first and then close its screen, (BlankIt not MCE).  Might work.

Do you want the BlankIt screen to display for a specific period as set by Timeout, (I could add an Override option to the .ini file so that it overrides the default of checking the process).

If there is a flash of Desktop before BlankIt kicks in, then I think that might be caused by the program that's calling BlankIt momentarily dropping to the Desktop to run a DOS command.

I've got no way to test all this, so you're the guinea pig  ;D

famewolf

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 31
    • View Profile
    • Donate to Member
After a few more checks there is a brief flash of the desktop both before and after the loading mce... black screen...ideally that screen would stay up for at least a few seconds to cover the "transition" and then fade to show MCE already loaded.   Happy to be the guinea pig!