Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Re: python - stealth window

Thread Tools

Re: python - stealth window

Gabriel Genellina
Posts: n/a
En Thu, 08 Nov 2007 03:23:27 -0300, Adam <(E-Mail Removed)>

> I want create Windows console window in stealth with Python script. I
> tried
> search on internet but I do not find anything. I want something like this
> just it is in C++:
> HWND stealth; /*creating stealth (window is not visible)*/
> AllocConsole();
> stealth=FindWindowA("ConsoleWindowClass",NULL);
> ShowWindow(stealth,0);
> So I start my script and that is will be run in the background and I can
> trick with "hotkeys" in WINAMP. I do not worry for a new one window.
> I
> hope you understand me because my english is not perfect.

Using the pywin32 packages from Mark Hammond, this is a direct translation
of the above:

import win32console, win32gui

stealth = win32gui.FindWindow("ConsoleWindowClass", None)
win32gui.ShowWindow(stealth, 0)
import time
win32gui.ShowWindow(stealth, 1)

You must either run it using pythonw.exe, or remove the AllocConsole call

Gabriel Genellina

Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
stealth screen scraping with python? Python 4 05-12-2007 09:34 AM
ABS Stealth Computer Case @ A True Review Silverstrand Front Page News 0 12-01-2005 01:23 AM
How to: Drive Stealth Silverstrand Reviews & How-To's 14 08-02-2005 07:07 AM
[ot] New Stealth Fighter Unveiled JaR MCSE 12 01-27-2005 06:39 PM
configuring router ACL's for stealth? joeblow Cisco 8 07-08-2004 12:19 AM