Set Focus to Command Prompt Window When Expanded

General Macro Scheduler discussion

Moderators: JRL, Dorian (MJT support)

Post Reply
kpassaur
Automation Wizard
Posts: 696
Joined: Wed Jul 07, 2004 1:55 pm

Set Focus to Command Prompt Window When Expanded

Post by kpassaur » Sat Apr 30, 2005 8:30 pm

When I try to use Setfocus to change to the screen that has a Full Screen Command Prompt Screen - I know that sounded funny, but with the command prompt you have the option of running in a full screen mode.) it dosen't work. It will work however if it is in a Command Prompt window.

I want to know if there is a way to change to this screen, also, is there a way to detect if the screen is in a full screen or window mode.

Any thoughts?

User avatar
Bob Hansen
Automation Wizard
Posts: 2475
Joined: Tue Sep 24, 2002 3:47 am
Location: Salem, New Hampshire, US
Contact:

Post by Bob Hansen » Sat Apr 30, 2005 10:17 pm

Have you considered Maximizing the Command window vs. going into Full Screen mode?
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!

kpassaur
Automation Wizard
Posts: 696
Joined: Wed Jul 07, 2004 1:55 pm

Wish that was an option

Post by kpassaur » Sun May 01, 2005 10:11 am

That would not always be an option, my goal is to capture a screen in the full screen mode so that I can parse the data. If I could set focus to the full screen mode I could use the ALT Enter key to change to the standard window, copy the text to the clipboard for later processing and then use the key combo to change back.

User avatar
Bob Hansen
Automation Wizard
Posts: 2475
Joined: Tue Sep 24, 2002 3:47 am
Location: Salem, New Hampshire, US
Contact:

Post by Bob Hansen » Sun May 01, 2005 6:26 pm

So you may need to use redirection to sent the contents of the window to a file. Something like this:

Run Program>cmd /c Dir C:\Windows\*.* > windir.txt

Then read windir.txt and parse the contents of thet file.
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!

Me_again
Automation Wizard
Posts: 1101
Joined: Fri Jan 07, 2005 5:55 pm
Location: Somewhere else on the planet

Post by Me_again » Tue May 03, 2005 3:06 pm

Bob Hansen wrote:Run Program>cmd /c Dir C:\Windows\*.* > windir.txt
It won't work that way, I think the second ">" confuses MS, see this thread http://www.mjtnet.com/usergroup/viewtop ... hlight=cmd

User avatar
support
Automation Wizard
Posts: 1450
Joined: Sat Oct 19, 2002 4:38 pm
Location: London
Contact:

Post by support » Tue May 03, 2005 3:30 pm

The second > will not cause a problem. We routinely redirect command output to a file using this method and have never had a problem. In parsing the script line Macro Scheduler looks only at the text before the first > symbol so there are no problems including subsequent > symbols and indeed many other commands use them (greater than in If commands for example).

The problem in the thread you linked to was because the poster had incorrectly inserted a space between / and c for the /c switch.
MJT Net Support
[email protected]

User avatar
Bob Hansen
Automation Wizard
Posts: 2475
Joined: Tue Sep 24, 2002 3:47 am
Location: Salem, New Hampshire, US
Contact:

Post by Bob Hansen » Tue May 03, 2005 10:22 pm

I use variations of the redirection sample I provided, every day.

No problem with the second > symbol. Frequently use >> to append to a file.
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts