Sign in to follow this  
Followers 0
lte5000

Hide Full-screen Command Window

4 posts in this topic

#1 ·  Posted (edited)

It seems to me that this topic was discussed to some extent in another thread, but I can't remember what, when, or where.

When the command prompt is set to full screen mode and you do: example:

RunWait(@ComSpec & " /c dir c:\", "", @SW_Hide)

A console window will briefly flash (full-screen)(ugly), before being hidden. Is there any way to ensure that the console window will always be in windowed mode so that it won't be seen? Or any other resolution?

Kendall

Edit: Fix some mistakes.

Edited by lte5000

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

I dont' get a flash, unless I try to run a windows based program, in which case you wouldn't need the secondary command interpreter.

RunWait(@ComSpec & " /c dir>c:\testingtest.txt", "", @SW_Hide)

I wouldn't do this for example:

RunWait(@ComSpec & " /c notepad.exe", "", @SW_Hide)

I would use this:

RunWait("notepad.exe", "", @SW_Hide)

I test on WinXP and Win2000 mostly...

...edit oh yea, and you have an extra " in your code.

Edited by scriptkitty

AutoIt3, the MACGYVER Pocket Knife for computers.

Share this post


Link to post
Share on other sites

Let me try to explain better:

On Win98se (the only OS I tested this on); if you:

1. Launch a command window.

2. Go into the 'Properties' by right clicking the title bar and selecting 'Properties' from the menu that appears.

3. Click the 'Screen' tab.

4. Mark the 'Full Screen' radio button and save the settings.

Now if you run AutoIt code such as scriptkitty's example; the command window will NOT be hidden but will actually exist as long as the DOS command is running:

RunWait(@ComSpec & " /c dir>c:\testingtest.txt", "", @SW_Hide)

In other words the '@SW_Hide' option does not work on 'Full Screen' command windows (at least on Win98se).

Now what I'm wondering is, is there any good method to make sure a user does not have their command.com window set to 'Full Screen mode' if a script is to be used on multiple computers? Or a way to hide a 'Full Screen' window (it can be set as @SW_Minimize if nothing else...).

Thanks for the replies and any future help.

Kendall

Share this post


Link to post
Share on other sites

OK.

Thanks, Larry.

Kendall

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
Sign in to follow this  
Followers 0