"Sheri" wrote:

> 
> You could likely do it with bars. One bar with a single button the size of 
> the desktop. Button color black. Button transparency as desired. A second bar 
> opened ontop, with a button sized 200x200.

Dumb me, why didn't I thought about that or why didn't you suggested that 
earlier!? :)
Ok, no need to use the script then. That's even better and for what I want, 
this covers it nicely.

The above script is an example the author kindly made for me with a window 
sized at 200x200 as the active window.
He said to me to replace that with a check for the active window or a specific 
app.

But now, with your suggestion, I created this script:
I'm checking/changing for screen settings to make it work with any res.

------------------------------
local xarea, yarea, hwnd

xarea = win.GetSystemMetrics("SM_CXVIRTUALSCREEN")
yarea = win.GetSystemMetrics("SM_CYVIRTUALSCREEN")
hwnd = win.handle("active")

cl.SetWidth("dimdesk", 0, xarea) 
cl.SetHeight("dimdesk", 0, yarea)  
if (hwnd)
bar.show("dimdesk")
hwnd.OnTop
------------------------------

It works, but is it well coded or can it be optimized/enhanced?



Reply via email to