How do I schedule a Windows task to run in the foreground?

Bobt1234

New member
Local time
5:39 PM
Messages
5
How do I force a scheduled task to run as a foreground window, to capture the focus when it runs?

I wrote a little Delphi app to open a reminder window, but when I schedule it the silly window stays in the background, behind the other 50 windows I routinely have open, and I'm likely to miss it.

I tried tweaking the app to force it to gain focus, but the only thing that does is make the icon flash in the icon bar.

Is there a way to do this?
 

My Computer My Computer

At a glance

Windows 7Intel Pentium4 GB
Computer Manufacturer/Model Number
Acer
OS
Windows 7
CPU
Intel Pentium
Memory
4 GB
Hard Drives
320 GB
In order to Force focus, you would have to include some stuff in the script. You need to take focus, then ignore user imput while it runs. Thats really the only way to force focus. Unless you can figure out how to make the window "always on top", but thats outside of my scripting knowledge.
 

My Computer My Computer

At a glance

windows 7 RTM x64Phenom II 965 Quad Core 3.4GhzMushkin Blackline 8GB (4x2gb)XFX Radeon 5970 Black Edition
Computer Manufacturer/Model Number
Black_Box (homebuilt)
OS
windows 7 RTM x64
CPU
Phenom II 965 Quad Core 3.4Ghz
Motherboard
Asus M4A79T Deluxe
Memory
Mushkin Blackline 8GB (4x2gb)
Graphics Card(s)
XFX Radeon 5970 Black Edition
Sound Card
onboard
Monitor(s) Displays
Dell 2408WPF-main Dell E248WFP-secondary
Screen Resolution
1920x1200-main 1920x1200-secondary
Hard Drives
OCZ Vertex Limited Edition 100GB (OS)
x1 WD Black Edition 500GB drive (Storage)
PSU
XFX 850w Black Edition (Modular)
Case
Mountian Mods H2go
Cooling
CoolITSystems ECO A.L.C.
Keyboard
Logitech MX 5500 wireless keyboard
Mouse
Razor Copperhead
Internet Speed
16Mb down/2Mb up Wowway Cable Internet
Great point!

Thanks for the "always on top" tip. That sort of works. It doesn't cause the window to gain focus, but at least displays it on top of all other windows.

I have several other Delphi apps that use the "window always on top" feature. I'm surprised I didn't think of it.

A partial solution is better than no solution.
 

My Computer My Computer

At a glance

Windows 7Intel Pentium4 GB
Computer Manufacturer/Model Number
Acer
OS
Windows 7
CPU
Intel Pentium
Memory
4 GB
Hard Drives
320 GB
Glad I could be of some help.
 

My Computer My Computer

At a glance

windows 7 RTM x64Phenom II 965 Quad Core 3.4GhzMushkin Blackline 8GB (4x2gb)XFX Radeon 5970 Black Edition
Computer Manufacturer/Model Number
Black_Box (homebuilt)
OS
windows 7 RTM x64
CPU
Phenom II 965 Quad Core 3.4Ghz
Motherboard
Asus M4A79T Deluxe
Memory
Mushkin Blackline 8GB (4x2gb)
Graphics Card(s)
XFX Radeon 5970 Black Edition
Sound Card
onboard
Monitor(s) Displays
Dell 2408WPF-main Dell E248WFP-secondary
Screen Resolution
1920x1200-main 1920x1200-secondary
Hard Drives
OCZ Vertex Limited Edition 100GB (OS)
x1 WD Black Edition 500GB drive (Storage)
PSU
XFX 850w Black Edition (Modular)
Case
Mountian Mods H2go
Cooling
CoolITSystems ECO A.L.C.
Keyboard
Logitech MX 5500 wireless keyboard
Mouse
Razor Copperhead
Internet Speed
16Mb down/2Mb up Wowway Cable Internet
Back
Top