From: Hayato Iriumi Date: 2008-03-11T08:45:00+09:00 Subject: Setting Focus on Console Window Hello, I'm having an issue with having a focus on the Ruby invoked console window on Windows platform when I start the process from one of the Scheduled Tasks. I have a Ruby script that gets kicked off by Scheduled Task. So the Run command looks like this: C:\ruby\bin\ruby.exe D:\Temp\HelloRuby.rb Now when I right click on the scheduled task and choose Run, the console window doesn't have the focus. I looked for ways to set the focus on the console window using kernel32 and stuff, but I haven't been able to find a solution. Does anyone know how best I can solve this problem? TIA