Hier wäre das Script weiter unten die Exe in einer Zip Datei.
Ps: Das Script / exe ist dafür gedacht ein beliebiges Fenster z.b ein Browserfenster gewünscht transparent zu machen es Always on Top zu stellen und es für Mausklicks durchsichtig zu machen solang es nicht in den Vordergrund geholt wird. Des weiteren kann man einen Twitch Namen/ Chan eintragen, das Script legt das Fenster oben in die rechte Bildschirmecke ab und resized das Fenster. Die Kernfunktion besteht darin alle Prozesse laufende Fenster als Klassen an ein Drop Down zu übergeben, dadurch steuert man mein kleines Script indirekt.
Ps: Das Script funktioniert nur bedingt ohne Die Grafiken, diese sind nämlich Css ähnlich eingebunden. Befinden sich allerdings in der Zip Datei.
Zipdatei bei Google Drive: [Mod edit: Link zur Exe entfernt.]
___________________________________________________ Anfang _________________________________________
Code: Select all
SetTitleMatchMode, RegEx
DetectHiddenWindows, Off
Loop, READ, %A_ScriptDir%\appends\all_windows.txt
List .= a_index = 1 ? A_LoopReadLine : "|" A_LoopReadLine
Gui, Add, Button, w480 gbutton5, Get all active Apps
Gui, Add, Dropdownlist, w480 vGamechoice, %List%
AddGraphicButton(1, "x0", "y65", "h100", "w250", "button1", a_ScriptDir . "\includes\hide_window_up.png", a_ScriptDir . "\includes\hide_window_hover.png", a_ScriptDir . "\includes\hide_window_hover.png")
AddGraphicButton(1, "x245", "y65", "h100", "w250", "button2", a_ScriptDir . "\includes\unhide_window_up.png", a_ScriptDir . "\includes\unhide_window_hover.png", a_ScriptDir . "\includes\unhide_window_hover.png")
OnMessage(0x200, "MouseMove")
OnMessage(0x201, "MouseLDown")
OnMessage(0x202, "MouseLUp")
Gui, Add, Radio, x7 y170 gbutton6, 5
Gui, Add, Radio, x55 y170 gbutton7, 15
Gui, Add, Radio, x105 y170 gbutton8, 30
Gui, Add, Radio, x155 y170 gbutton9, 50
Gui, Add, Radio, x205 y170 gbutton10, 80
Gui, Add, Radio, x255 y170 gbutton11, 100
Gui, Add, Button, x210 y195 gbutton12, Open Chrome
Gui, Add, Edit, x7 y195 vText, Twitch Name Eintragen
Gui, Add, Button, x140 y195 gbutton14, Save
Gui, Show, h225
Gui, Color, 555555
Return
button6:
WinSet, Transparent, 20, %Gamechoice%
return
button7:
WinSet, Transparent, 40, %Gamechoice%
return
button8:
WinSet, Transparent, 70, %Gamechoice%
return
button9:
WinSet, Transparent, 150, %Gamechoice%
return
button10:
WinSet, Transparent, 180, %Gamechoice%
return
button11:
WinSet, Transparent, 255, %Gamechoice%
return
button12:
SetControlDelay -1
FileRead, Text, %A_ScriptDir%\appends\twitch_name.txt
Run, chrome.exe --app=https://www.twitch.tv/popout/%Text%/chat?popout=
Winwait, ahk_exe chrome.exe
WinMove, ahk_exe chrome.exe,, 1670, 15, 240, 600
WinSet, Transparent, 165, ahk_exe chrome.exe
sleep, 2000
FileDelete, %A_ScriptDir%\appends\twitch_name.txt
return
button14:
Gui, Submit, NoHide
FileAppend, %Text%, %A_ScriptDir%\appends\twitch_name.txt
return
button5:
WinGet windows, List
Loop %windows%
{
id := windows%A_Index%
WinGetTitle title, ahk_id %id%
WinGetClass class, ahk_id %id%
If (class = "ApplicationFrameWindow")
{
WinGetText, text, ahk_id %id%
If (text = "")
continue
}
WinGet, style, style, ahk_id %id%
if !(style & 0xC00000) ; if the window doesn't have a title bar
{
; add exaptions
continue
}
r .= title . "`n"
}
FileRead, Contents, %A_ScriptDir%\appends\all_windows.txt
if not ErrorLevel ; Successfully loaded.
{
Sort, Contents
FileDelete, %A_ScriptDir%\appends\all_windows.txt
FileAppend, %A_ScriptDir%\appends\all_windows.txt
Contents := "" ; Free the memory.
}
{
FileAppend,%r%, %A_ScriptDir%\appends\all_windows.txt
}
reload
return
watchdog:
loop {
ifwinactive, %Gamechoice%
WinSet, ExStyle, -0x0000020, %Gamechoice%
ifwinnotactive, %Gamechoice%
WinSet, ExStyle, +0x0000020, %Gamechoice%
sleep 1000
}
Button1_down:
Gui, Submit, NoHide
WinSet, ExStyle, +0x0000020, %Gamechoice%
WinSet, Transparent, 150, %Gamechoice%
WinSet, AlwaysOnTop, On, %Gamechoice%
sleep, 1000
goto, watchdog
return
Button1_down_up:
return
Button2_down:
tooltip, Button2 down stroke gsub launched
Gui, Submit, NoHide
WinSet, ExStyle, -0x00000020, %Gamechoice%
WinSet, Region,, %Gamechoice%
WinSet, AlwaysOnTop, Off, %Gamechoice%
WinSet, Transparent, Off, %Gamechoice%
return
Button2_down_up:
return
MouseMove(wParam, lParam, msg, hwnd)
{
Global
local Current_Hover_Image
local Current_Main_Image
local Current_GUI
loop, parse, Graphic_Button_List, |
{
Current_GUI := %a_loopField%_GUI_Number
If (hwnd = %a_loopField%_HWND) and (%a_loopField%LastButtonData1 != %a_loopField%_HWND)
{
Current_Hover_Image := %a_loopField%_Hover_Image
guicontrol, %Current_GUI%:, %a_loopField%, %Current_Hover_Image%
%a_loopField%LastButtonData1 := hwnd
}
else if(hwnd != %a_loopField%_HWND) and (%a_loopField%LastButtonData1 = %a_loopField%_HWND)
{
Current_Up_Image := %a_loopField%_Up_Image
guicontrol, %Current_GUI%:, %a_loopField%, %Current_Up_Image%
%a_loopField%LastButtonData1 := hwnd
%a_loopField%LastButtonData2 =
tooltip,
}
}
Return
}
MouseLDown(wParam, lParam, msg, hwnd)
{
Global
Local Current_Down_Image
Local Current_GUI
loop, parse, Graphic_Button_List, |
{
If (hwnd = %a_loopField%_HWND) and (%a_loopField%LastButtonData2 != %a_loopField%_HWND)
{
Current_GUI := %a_loopField%_GUI_Number
Current_Down_Image := %a_loopField%_Down_Image
guicontrol, %Current_GUI%:, %a_loopField%, %Current_Down_Image%
%a_loopField%LastButtonData2 := hwnd
break
}
}
Return
}
MouseLUp(wParam, lParam, msg, hwnd)
{
Global
local Current_Main_Image
Local Current_GUI
loop, parse, Graphic_Button_List, |
{
If (hwnd = %a_loopField%_HWND) and (%a_loopField%LastButtonData2 = %a_loopField%_HWND)
{
Current_GUI := %a_loopField%_GUI_Number
Current_Hover_Image := %a_loopField%_Hover_Image
guicontrol, %Current_GUI%:, %a_loopField%, %Current_Hover_Image%
%a_loopField%LastButtonData2 =
GOSUB % a_loopField . "_Down_Up"
break
}
}
Return
}
AddGraphicButton(GUI_Number, Button_X, Button_Y, Button_H, Button_W, Button_Identifier, Button_Up, Button_Hover, Button_Down)
{
Global
if(Graphic_Button_List = "")
Graphic_Button_List .= Button_Identifier
else
Graphic_Button_List .= "|" . Button_Identifier
current_Button_HWND := Button_Identifier . "_hwnd"
%Button_Identifier%_Up_Image := Button_Up
%Button_Identifier%_Hover_Image := Button_Hover
%Button_Identifier%_Down_Image := Button_Down
%Button_Identifier%_GUI_Number := GUI_Number
Gui, %GUI_Number%:Add, Picture, +altsubmit %Button_X% %Button_Y% %Button_H% %Button_W% g%Button_Identifier%_Down v%Button_Identifier% hwnd%current_Button_HWND%, %Button_Up%
}
Ctrl & PgDn::Reload
GuiClose:
ExitApp
[Mod edit: [code][/code]-Tags hinzugefügt. Bitte selber verwenden, beim nächsten Mal. Danke!]