Bring window to the front.

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
menadool
Posts: 1
Joined: 20 Apr 2013 21:35

Bring window to the front.

#1 Post by menadool » 20 Apr 2013 21:54

Hi there people

Quick question that one of you geniuses will know the answer straight off the cuff. I'm a very novice Batch programmer.

I have a Windows 8 machine as my Home Theatre PC running XBMC, Sickbeard and Sabnzbd.

I have a little batch that, initially opens explorer (to get into the desktop from metro) then opens the above programs. The problem is that i want the Xmbc app to open last and to stay on top. I have it initialising last yet sometimes the sickbeard and Sabnzbd will open on top. Is there a line of code or a command to "stay on top"?

Much Appreciated.

foxidrive
Expert
Posts: 6031
Joined: 10 Feb 2012 02:20

Re: Bring window to the front.

#2 Post by foxidrive » 20 Apr 2013 22:40

Use ping to allow each program time to load, and the last one will remain on top.


Code: Select all

start "" "program1"
ping localhost -n 5 >nul
start "" "program2"
ping localhost -n 5 >nul
start "" "program3"

abc0502
Posts: 1007
Joined: 26 Oct 2011 22:38
Location: Egypt

Re: Bring window to the front.

#3 Post by abc0502 » 20 Apr 2013 23:50

Also, see if the application itself has option to make it stay on top, set it and when you run the application it will be on top.

Post Reply