Re: python - stealth window

Discussion in 'Python' started by Gabriel Genellina, Nov 10, 2007.

  1. En Thu, 08 Nov 2007 03:23:27 -0300, Adam <>
    escribió:

    > 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:

    <code>
    import win32console, win32gui

    win32console.AllocConsole()
    stealth = win32gui.FindWindow("ConsoleWindowClass", None)
    win32gui.ShowWindow(stealth, 0)
    import time
    time.sleep(5)
    win32gui.ShowWindow(stealth, 1)
    </code>

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

    --
    Gabriel Genellina
    Gabriel Genellina, Nov 10, 2007
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Frank
    Replies:
    1
    Views:
    670
    William Ryan
    Dec 31, 2003
  2. Andrew Bewley via DotNetMonster.com

    window to window communication (window.opener)

    Andrew Bewley via DotNetMonster.com, Feb 3, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    1,042
    Andrew Bewley via DotNetMonster.com
    Feb 3, 2005
  3. John Benson

    CCPL: a new software stealth license

    John Benson, Jan 14, 2004, in forum: Python
    Replies:
    0
    Views:
    352
    John Benson
    Jan 14, 2004
  4. Replies:
    4
    Views:
    690
    Thomas Wittek
    May 12, 2007
  5. Ram Kumar
    Replies:
    1
    Views:
    114
    Ken Cox [Microsoft MVP]
    Dec 30, 2003
Loading...

Share This Page