Jump to content

Darken an area of the screen?


Recommended Posts

Ok, see how the screen darkens around non essential areas in this video: http://www.apple.com/macosx/theater/dashboard.html ?

Is it possible to do something like this with autoit? I would like to darken the screen while some automation is done in th background so that the user can clearly see to not touch the mouse. Even better would be to darken select areas, like, everything but a little GUI box in the middle or something.

Is it possible with that, um, prospeed.dll thing?

Any help would be appreciated.

Link to comment
Share on other sites

The easiest way would to be to create two GUI windows. The one in the background would have the $WS_POPUP style, so that it would not have any edges, a black background, and transparency set to 120 with WinSetTrans. Then your data gui would be in the front, using WinSetOnTop to keep it above the background gui.

Or something like that.

[font="Fixedsys"][list][*]All of my AutoIt Example Scripts[*]http://saneasylum.com[/list][/font]

Link to comment
Share on other sites

#include <GUIConstants.au3>

HotKeySet("{ESC}", "End")

$hGui = GUICreate("Test" , 2000, 2000, -10, -10, $WS_POPUP, $WS_EX_TOPMOST)
GUISetBkColor(0x222222)

GUISetState(@SW_SHOW)  

WinSetTrans($hGui, "", 235);Trans

While 1
    $msg = GUIGetMsg()
    
    If $msg = $GUI_EVENT_CLOSE Then ExitLoop
    Wend
    
    
Func End()
    Exit
EndFunc

Edited by Sardith

[font="Verdana"]Valik:Get it straight - I'm not here to say please, I'm here to help - if my help's not appreciated then lotsa luck, gentlemen.[/font]

Link to comment
Share on other sites

This all looks good and all, but the mouse cannot move and click things in the background. My program will be moving the mouse and whatnot while the screen is darkened, and it doesnt work with a GUI in the way. Any way around this?

Link to comment
Share on other sites

#include <GUIConstants.au3>

HotKeySet("{ESC}", "End")

$hGui = GUICreate("Test" , 2000, 2000, -10, -10, $WS_POPUP, $WS_EX_TRANSPARENT+$WS_EX_TOPMOST)
GUISetBkColor(0x222222)

GUISetState(@SW_SHOW)  

WinSetTrans($hGui, "", 235);Trans

While 1
Sleep(100)
    Wend
    
    
Func End()
    Exit
EndFunc

That does what you're asking for but the task bar must have some 'topmost' quality to it. Not sure how to remove that or what a work around would be.

[font="Verdana"]Valik:Get it straight - I'm not here to say please, I'm here to help - if my help's not appreciated then lotsa luck, gentlemen.[/font]

Link to comment
Share on other sites

#include <GUIConstants.au3>
Opt("WinTitleMatchMode",4)

HotKeySet("{ESC}", "End")

$hGui = GUICreate("Test" , 2000, 2000, -10, -10, $WS_POPUP, $WS_EX_TRANSPARENT+$WS_EX_TOPMOST)
GUISetBkColor(0x222222)

GUISetState(@SW_SHOW) 

WinSetTrans($hGui, "", 235);Trans
WinSetState("Classname=Shell_TrayWnd", "", @SW_HIDE);hides the taskbar



While 1
Sleep(100)
    Wend
   
   
Func End()
WinSetState("Classname=Shell_TrayWnd", "", @SW_SHOW);shows the task bar
    Exit
EndFunc

That hides the taskbar =).

[font="Verdana"]Valik:Get it straight - I'm not here to say please, I'm here to help - if my help's not appreciated then lotsa luck, gentlemen.[/font]

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