Jump to content
Sign in to follow this  
kater

make Black window as background

Recommended Posts

kater

Hi :)

I want to make Black window as background for hiding my script under this background until finish the script

For example

I want to hiding the below sicrpt under Black window as background until finish it ;)

=======================

Run("cmd.exe")

Sleep(1000)

Send("ipconfig /all")

Send("{ENTER}")

Send("Exit")

Sleep(1000)

Send("{ENTER}")

======================

How to do it ? ;)

Share this post


Link to post
Share on other sites
weaponx

You mean you want to black out the entire screen while it's running?

Why not just run your program hidden with @SW_HIDE?

Share this post


Link to post
Share on other sites
Zedna

#NoTrayIcon 
#include <GUIConstants.au3>

$gui = GUICreate("Black", @DesktopWidth, @DesktopHeight, 0, 0, $WS_POPUP)
GUISetBkColor(0x000000)
GUISetState(@SW_SHOW)
WinSetOnTop($gui,'',1)

While 1
    $msg = GuiGetMsg()
    If $msg = $GUI_EVENT_CLOSE Then ExitLoop
    Sleep(100)
WEnd

Edited by Zedna

Share this post


Link to post
Share on other sites
kater

You mean you want to black out the entire screen while it's running?

Why not just run your program hidden with @SW_HIDE?

Yes , This is what I mean ;)

but there is some problems facing me ;)

when me apply the black window I think the script will not complete because the black window will hiding the main window and the existing script will see only the black window I want it to see the window that located under the black screen

Please advice me in this issue :)

Edited by kater

Share this post


Link to post
Share on other sites
The Kandie Man

This is a much more effective way to do it rather than sending keystrokes directly to a console window:

Dim $s_oFileLocation = @HomeDrive & '\IPConfig.txt'

Runwait(@ComSpec & " /c " & 'ipconfig /all > "' &  $s_oFileLocation & '"', "", @SW_HIDE)

ShellExecute($s_oFileLocation)

I even had it output the console information to a text file. Simply change the value of $s_oFileLocation to where you want the file saved.

- The Kandie Man ;-)


"So man has sown the wind and reaped the world. Perhaps in the next few hours there will no remembrance of the past and no hope for the future that might have been." & _"All the works of man will be consumed in the great fire after which he was created." & _"And if there is a future for man, insensitive as he is, proud and defiant in his pursuit of power, let him resolve to live it lovingly, for he knows well how to do so." & _"Then he may say once more, 'Truly the light is sweet, and what a pleasant thing it is for the eyes to see the sun.'" - The Day the Earth Caught Fire

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  

×