Sign in to follow this  
Followers 0
quantic

Dim Desktop but not active window

7 posts in this topic

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

Share this post


Link to post
Share on other sites



#3 ·  Posted (edited)

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

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

A small example.

Small is Beautiful!

Thank you so much! That's exactly what I wanted and also perfectly clear.

Appreciated the quick help!

Share this post


Link to post
Share on other sites

You'r welcome :)

Share this post


Link to post
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)

...

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