Set my compiled script to be foreground app, after execution

3 posts in this topic

#1 ·  Posted (edited)

I have a program I use to post SCCM image, and pre-user first use, configure the machine. That part it working perfectly, except that I can not get the process to truly run in the foreground  without me having to click on it. The process runs start to end with the start menu bar at the bottom of the windows ui visible.

This application is not really full screen, but I do have a splash image background that fills the screen, giving the illusion of full screen. I have a progress bar with options to set it to be always on top and that does work for keeping the progress bar over the splash image, but the start menu ui stays visible even though the progress bar is updating.

Is there a trick I can use to foreground my process once it is running, or do I need to code this differently?

I have tried creating a function called forground($title) and it does this:

   If Not WinActive($title) Then

But this has no actual effect when I call it a few times: foreground("pps-installer.exe").

Thanks in advance for the help!



Edited by aseitz

Share this post

Link to post
Share on other sites

#3 ·  Posted (edited)

I used your logic to detect and take focus from the splash image and it didn't have any noticiable effect on the foregrounding of the app.

I am going to look into making this a full screen app, I think that might be easier that what I am doing.

Or am I wrong on that? :)

-- Update: I have now converted this to a full screen app and that absolutely solved the problem!!



Edited by aseitz

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