Pakku Posted March 20, 2008 Share Posted March 20, 2008 (edited) Hi all, Don't know why, but been away for a while from the forum, but thought I'll come back, see how things are going at AutoIt forum. To pay for the last few monthes, here a script I wrote yesterday just for fun. Hit Ctrl + Alt + a to activate and deactivate, after activating, moving your mouse form the spot to the left will make your current active window transparant, moving far more away will make it more transparant. moving to the right will make it more sollid, and even more right than where you start will make it as solid as possible. HotKeySet("^!a","trans") $until = 0 While 1 Sleep(10) WEnd Func trans() HotKeySet("^!a","reset") $pos0 = MouseGetPos(0) $ruimte = 20 $oldtrans = 255 $titel = WinGetTitle("") Do $pos1 = MouseGetPos(0) if $pos1 > $pos0 Then $trans = 255 Elseif $pos1 < $ruimte Then $trans = 0 Else $trans = Int(255 - ((($pos0 - $pos1) / ($pos0 - 20)) * 255)) EndIf if $oldtrans <> $trans Then WinSetTrans($titel,"",$trans) $oldtrans = $trans EndIf Sleep(100) Until $until = 1 $until = 0 EndFunc Func reset() $until = 1 HotKeySet("^!a","Trans") EndFunc Life can't be made easier, but fun can be added Edited November 16, 2010 by Pakku How can someone use Windows without using AutoIt?That one would properly don't know how to handle a computer!My scripts:Send files over internetKind of RSS reader3Draw ProUDF: convert a character string to a binary one and backCalculate PiCommand line downloader (Youtube/Google video)Set the transparency of a window just by hitting a key!Secure your pcOther things:My filemanMy profilePM me Link to comment Share on other sites More sharing options...
vengat Posted June 13, 2008 Share Posted June 13, 2008 Hi all, Don't know why, but been away for a while from the forum, but thought I'll come back, see how things are going at AutoIt forum. To pay for the last few monthes, here a script I wrote yesterday just for fun. Hit Ctrl + Alt + a to activate and deactivate, after activating, moving your mouse form the spot to the left will make your current active window transparant, moving far more away will make it more transparant. moving to the right will make it more sollid, and even more right than where you start will make it as solid as possible. HotKeySet("^!a","trans") $until = 0 While 1 Sleep(10) WEnd Func trans() HotKeySet("^!a","reset") $pos0 = MouseGetPos(0) $ruimte = 20 $oldtrans = 255 $titel = WinGetTitle("") Do $pos1 = MouseGetPos(0) if $pos1 > $pos0 Then $trans = 255 Elseif $pos1 < $ruimte Then $trans = 0 Else $trans = Int(255 - ((($pos0 - $pos1) / ($pos0 - 20)) * 255)) EndIf if $oldtrans <> $trans Then WinSetTrans($titel,"",$trans) $oldtrans = $trans EndIf Sleep(100) Until $until = 1 $until = 0 EndFunc Func reset() $until = 1 HotKeySet("^!a","Trans") EndFunc Life can't be made easier, but fun can be added Arjan vengat , cool of all Link to comment Share on other sites More sharing options...
Zinthose Posted June 18, 2008 Share Posted June 18, 2008 It's a bit buggy on my dual monitor system but still an interesting idea. Maybe if you could cycle through all inactive windows and set the transparency to 75% and the active window is always set to 100%. --- TTFN Link to comment Share on other sites More sharing options...
PantZ4 Posted June 19, 2008 Share Posted June 19, 2008 It's a bit buggy on my dual monitor system but still an interesting idea. Maybe if you could cycle through all inactive windows and set the transparency to 75% and the active window is always set to 100%. Heh (Remember to press x on your keyboard to reset all windows transparency) expandcollapse popupGlobal $Transparency = 255 * 0.75 Global $LastActiveWindow = 1 HotKeySet("x","reset") $List = WinList() For $x = 1 To $List[0][0] If BitAnd( WinGetState($List[$x][1]), 2 ) Then WinSetTrans($List[$x][1],"",$Transparency) Next While 1 CheckInactive() Sleep(10) WEnd Func CheckInactive() If WinActive($LastActiveWindow) Then Return Else WinSetTrans($LastActiveWindow,"",$Transparency) $List = WinList() For $x = 1 To $List[0][0] If BitAnd( WinGetState($List[$x][1]), 8 ) Then $LastActiveWindow = $List[$x][1] WinSetTrans($LastActiveWindow,"",254.9) EndIf Next EndIf EndFunc Func reset() $List = WinList() For $x = 1 To $List[0][0] If BitAnd( WinGetState($List[$x][1]), 2 ) Then WinSetTrans($List[$x][1],"",255) Next Exit EndFunc Link to comment Share on other sites More sharing options...
Zinthose Posted June 19, 2008 Share Posted June 19, 2008 @Mr. Zero Very Nice! On a dual monitor system it works very well. Amazing all the crap I have running. --- TTFN Link to comment Share on other sites More sharing options...
PantZ4 Posted June 19, 2008 Share Posted June 19, 2008 @Mr. Zero Very Nice! On a dual monitor system it works very well. Amazing all the crap I have running. Well the problem is that WinSetTrans makes the transparent windows slow and flickers when going from non-transparent to transparent. For example: For $x = 1 To $List[0][0] If BitAnd( WinGetState($List[$x][1]), 8 ) Then $LastActiveWindow = $List[$x][1] WinSetTrans($LastActiveWindow,"",254.9) EndIf Next This code finds the active window and apply transparency. Notice that I have written 254.9 to make it almost not transparent. The reason to this is because if you set it to become non transparent it will flicker black for millisec but enough to see it. Which is kind of annoying. On the other hand having the active window not full non transparent makes it slow for some reason. So it is a question about efficiency vs. lookout. Personal I prefer 255 for faster process. Global $Transparency = 255 * 0.75 Global $FullTransparency = 254.9 Global $LastActiveWindow = 1 HotKeySet("x","reset") $List = WinList() For $x = 1 To $List[0][0] If BitAnd( WinGetState($List[$x][1]), 2 ) Then WinSetTrans($List[$x][1],"",$Transparency) Next While 1 If WinActive($LastActiveWindow) Then Sleep(10) Else WinSetTrans($LastActiveWindow,"",$Transparency) $List = WinList() For $x = 1 To $List[0][0] If BitAnd( WinGetState($List[$x][1]), 8 ) Then $LastActiveWindow = $List[$x][1] WinSetTrans($LastActiveWindow,"",$FullTransparency) EndIf Next EndIf WEnd Func reset() $List = WinList() For $x = 1 To $List[0][0] If BitAnd( WinGetState($List[$x][1]), 2 ) Then WinSetTrans($List[$x][1],"",255) Next Exit EndFunc Sorry arjan. Didn't mean to hijack the topic . Link to comment Share on other sites More sharing options...
SxyfrG Posted June 20, 2008 Share Posted June 20, 2008 Wow Mr Zero ... messed up the taskbar and desktop ... >_> My scripts:AppLauncherTRAY - Awesome app launcher that runs from the system tray NEW VERSION! | Run Length Encoding - VERY simple compression in pure autoit | Simple Minesweeper Game - Fun little game :)My website Link to comment Share on other sites More sharing options...
anixon Posted June 24, 2008 Share Posted June 24, 2008 Hi all, Don't know why, but been away for a while from the forum, but thought I'll come back, see how things are going at AutoIt forum. To pay for the last few monthes, here a script I wrote yesterday just for fun. Hit Ctrl + Alt + a to activate and deactivate, after activating, moving your mouse form the spot to the left will make your current active window transparant, moving far more away will make it more transparant. moving to the right will make it more sollid, and even more right than where you start will make it as solid as possible. HotKeySet("^!a","trans") $until = 0 While 1 Sleep(10) WEnd Func trans() HotKeySet("^!a","reset") $pos0 = MouseGetPos(0) $ruimte = 20 $oldtrans = 255 $titel = WinGetTitle("") Do $pos1 = MouseGetPos(0) if $pos1 > $pos0 Then $trans = 255 Elseif $pos1 < $ruimte Then $trans = 0 Else $trans = Int(255 - ((($pos0 - $pos1) / ($pos0 - 20)) * 255)) EndIf if $oldtrans <> $trans Then WinSetTrans($titel,"",$trans) $oldtrans = $trans EndIf Sleep(100) Until $until = 1 $until = 0 EndFunc Func reset() $until = 1 HotKeySet("^!a","Trans") EndFunc Life can't be made easier, but fun can be added Arjan Hi Arjan Very nice and clever works on my Desktop. If you like a challenge you might like to consider the following and that is how to make the mouse pointer transparent or invisible when the pointer is moved. In Vista Control Panel/Mouse/Pointer Options/Visibility there is an option to hide the mouse pointer when inputing text. So is it possible to manipulate this Windows feature to hide the mouse when the mouse pointer is moved? [i like to learn something new every day please contribute] Ant.. Link to comment Share on other sites More sharing options...
BrettF Posted June 24, 2008 Share Posted June 24, 2008 I realise people failed to listen, and press x on exit. The following is much easier: Global $Transparency = 255 * 0.75 Global $FullTransparency = 254.9 Global $LastActiveWindow = 1 HotKeySet("x","reset") Opt ("OnExitFunc", "reset") $List = WinList() For $x = 1 To $List[0][0] If BitAnd( WinGetState($List[$x][1]), 2 ) Then WinSetTrans($List[$x][1],"",$Transparency) Next While 1 If WinActive($LastActiveWindow) Then Sleep(10) Else WinSetTrans($LastActiveWindow,"",$Transparency) $List = WinList() For $x = 1 To $List[0][0] If BitAnd( WinGetState($List[$x][1]), 8 ) Then $LastActiveWindow = $List[$x][1] WinSetTrans($LastActiveWindow,"",$FullTransparency) EndIf Next EndIf WEnd Func reset() $List = WinList() For $x = 1 To $List[0][0] If BitAnd( WinGetState($List[$x][1]), 2 ) Then WinSetTrans($List[$x][1],"",255) Next Exit EndFunc Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! Link to comment Share on other sites More sharing options...
TomV Posted May 15, 2009 Share Posted May 15, 2009 Thankyou Bedankt [font="Comic Sans MS"][size="4"]My UDF's:[/size]1. _ChooseIconAnd this is just the beginning[/font] Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now