Jump to content

Dim Desktop but not active window


Recommended Posts

Hi,

first post and hope to learn a lot in here.

I never used AutoIt before (mainly using PowerPro) and no knowledge at all in advanced srcipting, so go easy, please.

I'd like a script that can dim the entire desktop, except the active window like some tutorial applications out there.

Is this doable?

If yes, I'd like it to be as simple as possible in order to understand which line does what.

Thanks

Link to comment
Share on other sites

What represent your "dim"?

You must be exact in your questions!

Sorry, but English is not my native language. I thought it was clear but anyway here's a screenshot to explain it visually:

http://www.lifeclever.com/wp-content/uploa...immenushade.jpg

Doodim (This is for Mac but I've seen similar apps for Windows that can do this)

http://www.freemacware.com/doodim

Basically I want to dim the entire desktop and leave focus on the active window, defined in script or not.

Something like this:

execute application

wait to became active

dim desktop & focus active window

when application is terminated give back focus to the desktop

Edited by quantic
Link to comment
Share on other sites

A small example. Just change it to get WinGetTitle or something and give the active window focus instead.

#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>

$GUI = GUICreate("", @DesktopWidth, @DesktopHeight-30, 0, 0, $WS_POPUP, BitOR($WS_EX_TOOLWINDOW, $WS_EX_LAYERED))
GUISetBkColor(0x000000)
GUISetState()
WinSetTrans($GUI, "", 200)

GUICreate("test", 200, 200)

GUISetState()


While 1
    $msg = GUIGetMsg()

    If $msg = $GUI_EVENT_CLOSE Then ExitLoop
WEnd
Link to comment
Share on other sites

A small example. Just change it to get WinGetTitle or something and give the active window focus instead.

#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>

$GUI = GUICreate("", @DesktopWidth, @DesktopHeight-30, 0, 0, $WS_POPUP, BitOR($WS_EX_TOOLWINDOW, $WS_EX_LAYERED))
GUISetBkColor(0x000000)
GUISetState()
WinSetTrans($GUI, "", 200)

GUICreate("test", 200, 200)

GUISetState()


While 1
    $msg = GUIGetMsg()

    If $msg = $GUI_EVENT_CLOSE Then ExitLoop
WEnd
little improvement: GUISetState(@SW_DISABLE)

...

$GUI = GUICreate("", @DesktopWidth, @DesktopHeight-30, 0, 0, $WS_POPUP, BitOR($WS_EX_TOOLWINDOW, $WS_EX_LAYERED))
GUISetBkColor(0x000000)
GUISetState(@SW_DISABLE)
GUISetState()
WinSetTrans($GUI, "", 200)

...
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...