A long while back i tried to create this BGinfo style of macro with the help of these forums i got quite far but i got stuck on a very specific issue (small but needs to be fixed)
i got everything to work just fine but the issue is that if i "win + d" or press the "show desktop" button next to the clock it disappears. Believe me when i tell you this , i have tried to find a solution for this
I think i copied most of the code from another thread that i don't remember by now, its a mess i know.
Code: Select all
;#notrayicon
#SingleInstance, Force
Coordmode,Mouse,Relative
;To autostart with windows (optional); RegWrite, REG_SZ, HKEY_CURRENT_USER, Software\Microsoft\Windows\CurrentVersion
\Run, Gadget IP, %A_ScriptFullPath%
CustomColor = AAAA99 ; Can be any RGB color (it will be made transparent below).
CustomColor2 = AAFF99 ; Second GUIs backgrund RGB color (it will be made semi transparent below).
Gui, 2: -Caption +ToolWindow
Gui, 2: Color, %CustomColor2%
Gui, 1: -Caption +toolwindow ; "-caption" wont show the button bar
Gui, 1: Color, %CustomColor%
Gui, 1: +LastFound
Gui, 1: font, s11.5 cFFFFFF, Segoe UI
Gui, 1: Add, Text, x2 y0, COMPUTER INFORMATION
Gui, 1: font, s8.5 cFFFFFF, Segoe UI
Gui, 1: Add, Text, x2 y26 gUSR, IP Address:
Gui, 1: Add, Text, x100 y26 gLAN, %A_IPAddress1%
Gui, 1: Add, Text, x2 y47 gUSR, Nodename:
Gui, 1: Add, Text, x100 y47 gWAN, %Computername%
Gui, 1: Add, Text, x2 y68 gUSR, UserID:
Gui, 1: Add, Text, x100 y68 gUSR, %A_UserName%
hGadgetGui := WinExist()
WinSet, TransColor, %CustomColor% ; Make all pixels of this color transparent in the first GUI
Gui, 2: +LastFound
WinSet, Transparent, 150 ; makes all of the Second Gui semi transparent
SetTimer, UpdateOSD, 200
Gosub, UpdateOSD ; Make the first update immediate rather than waiting for the timer.
Gui, 2: Show, % "x" A_ScreenWidth - 199 "y" A_Screenheight - 130 " w" 200 NoActivate ; NoActivate avoids deactivating the
currently active window.
Gui, 1: Show, % "x" A_ScreenWidth - 199 "y" A_Screenheight - 130 " w" 200 NoActivate, gadget window
Return
Gui, 1: +LastFound
WinGetClass, ahk_class, A
If (ahk_class == "WorkerW") and (LastClass != "WorkerW") ;and (LastClass != "AutoHotkeyGUI")
WinActivate, % "ahk_id " . hGadgetGui
LastClass := ahk_class
UpdateOSD:
MouseGetPos, MouseX, MouseY
GuiControl,, MyText, X%MouseX%, Y%MouseY%
Gui, 1: +LastFound
return
GuiClose:
ExitApp
close:
ExitApp
Refresh:
Reload
Return
Call:
Reload
Return
WAN:
clipboard = %Computername%
Return
LAN:
clipboard = %A_IPAdress1% ; Clicking the ip will copy it.
Return
USR:
clipboard = %A_UserName%
Return
^!r::Reload
Code: Select all
Del::
MouseGetPos,,,win
WinGetClass, class, ahk_id %win%
If class in Progman,WorkerW
MsgBox put your action here
else
Send, {Del}
Return
Code: Select all
UpdateOSD:
MouseGetPos, MouseX, MouseY, win
GuiControl,, MyText, X%MouseX%, Y%MouseY%
Gui, 1: +LastFound
WinGetClass, class, ahk_id %win%
If class in Progman,WorkerW
{
If WinActive("ahk_class" . class)
GoTo Labeltest1
else
return
}
else
return
would be really greateful if someone knows any solution for this.