Snippets Collections
# Create a ".desktop" file in "/usr/share/applications" with following content

[Desktop Entry]
Name=NameOfApplication
Exec=/path/to/your/script
Icon=/path/to/image/to/use/as/icon.png
Terminal=false
Type=Application
; ----------------------------------------------------------------------------------------------------------------------
; GetWindowInfo(HWND)
; Function:
;     Retrieves information about the specified window.
; Parameter:
;     HWND - A handle to the window whose information is to be retrieved.
; Return value:
;     If the function succeeds, the return value is an object containing the information.
;     If the function fails, the return value is zero.
; MSDN:
;     http://msdn.microsoft.com/en-us/library/ms632610(v=vs.85).aspx
; ----------------------------------------------------------------------------------------------------------------------
GetWindowInfo(HWND) {
   Static SizeOfWINDOWINFO := 60
   ; Struct WINDOWINFO
   VarSetCapacity(WINDOWINFO, SizeOfWINDOWINFO, 0)
   NumPut(SizeOfWINDOWINFO, WINDOWINFO, "UInt")
   If !DllCall("User32.dll\GetWindowInfo", "Ptr", HWND, "Ptr", &WINDOWINFO, "UInt")
      Return False
   ; Object WI
   WI := {}
   WI.WindowX := NumGet(WINDOWINFO,  4, "Int")                 ; X coordinate of the window
   WI.WindowY := NumGet(WINDOWINFO,  8, "Int")                 ; Y coordinate of the window
   WI.WindowW := NumGet(WINDOWINFO, 12, "Int") - WI.WindowX    ; Width of the window
   WI.WindowH := NumGet(WINDOWINFO, 16, "Int") - WI.WindowY    ; Height of the window
   WI.ClientX := NumGet(WINDOWINFO, 20, "Int")                 ; X coordinate of the client area
   WI.ClientY := NumGet(WINDOWINFO, 24, "Int")                 ; Y coordinate of the client area
   WI.ClientW := NumGet(WINDOWINFO, 28, "Int") - WI.ClientX    ; Width of the client area
   WI.ClientH := NumGet(WINDOWINFO, 32, "Int") - WI.ClientY    ; Height of the client area
   WI.Style   := NumGet(WINDOWINFO, 36, "UInt")                ; The window styles.
   WI.ExStyle := NumGet(WINDOWINFO, 40, "UInt")                ; The extended window styles.
   WI.State   := NumGet(WINDOWINFO, 44, "UInt")                ; The window status (1 = active).
   WI.BorderW := NumGet(WINDOWINFO, 48, "UInt")                ; The width of the window border, in pixels.
   WI.BorderH := NumGet(WINDOWINFO, 52, "UInt")                ; The height of the window border, in pixels.
   WI.Type    := NumGet(WINDOWINFO, 56, "UShort")              ; The window class atom.
   WI.Version := NumGet(WINDOWINFO, 58, "UShort")              ; The Windows version of the application.
   Return WI
}
star

Fri Oct 22 2021 20:58:23 GMT+0000 (UTC) https://es.wordpress.org/plugins/bf-wpo-dequeuer/

#enqueue #scripts #performance
star

Tue Jun 08 2021 08:36:37 GMT+0000 (UTC) https://www.computerwissen.de/linux/distributionen/ubuntu/ubuntu-programme/so-erstellen-sie-einen-eigenen-starter/

#ubuntu #scripts #gui
star

Wed Dec 23 2020 10:22:27 GMT+0000 (UTC) https://autohotkey.com/board/topic/91798-getting-info-about-existence-of-all-gui-borders-and-their-thickness/

#ahk #scripts

Save snippets that work with our extensions

Available in the Chrome Web Store Get Firefox Add-on Get VS Code extension