Skip to content

Instantly share code, notes, and snippets.

@anonymous1184
anonymous1184 / GetUrl.ahk
Last active August 13, 2025 03:00
GetUrl()
#Requires AutoHotkey v2.0
; Version: 2023.10.05.1
; https://gist.github.com/7cce378c9dfdaf733cb3ca6df345b140
GetUrl() { ; Active Window Only
static S_OK := 0, TreeScope_Descendants := 4, UIA_ControlTypePropertyId := 30003, UIA_DocumentControlTypeId := 50030, UIA_EditControlTypeId := 50004, UIA_ValueValuePropertyId := 30045
hWnd := WinGetID("A")
IUIAutomation := ComObject("{FF48DBA4-60EF-4201-AA87-54103EEF594E}", "{30CBE57D-D9D0-452A-AB13-7AC5AC4825EE}")
eRoot := ComValue(13, 0)
; Google Drive API test
#NoEnv
SetWorkingDir %A_ScriptDir%
SetBatchLines, -1
; http://www.howtosolvenow.com/how-to-create-your-google-drive-api-keys/
; http://www.howtosolvenow.com/how-to-get-refresh-token-for-google-drive-api/
client_id := "xxxxxxxxxxx"
client_secret := "xxxxxxxxxxx"
; Accessible Info Viewer by jethrow
; https://autohotkey.com/board/topic/77888-accessible-info-viewer-alpha-release-2012-09-20/
; Modified by tmplinshi - https://gist.github.com/tmplinshi/0fcb8655c1402a3662ac048d0d974915/
#NoEnv
#SingleInstance, force
SetBatchLines, -1
{
WM_ACTIVATE := 0x06
@brettinternet
brettinternet / ExtractISO.ps1
Last active February 16, 2021 19:21
PowerShell script to extract all ISO images in subfolders with 7zip - see improved batch script below
Get-ChildItem $folderPath -recurse | %{
if($_.Name -match "^*.`.iso$")
{
$parent="$(Split-Path $_.FullName -Parent)";
write-host "Extracting $($_.FullName) to $parent"
$arguments=@("x", "`"$($_.FullName)`"", "-o`"$($parent)`"");
$ex = start-process -FilePath "`"C:\Program Files\7-Zip\7z.exe`"" -ArgumentList $arguments -wait -PassThru;
font := FileOpen("C:\Users\Jonny\Downloads\blasad\ACaslonPro-BoldItalic.otf", "r")
otf := 1 ; set to 1 if using otf file, 0 for ttf
if !font ; error catching
MsgBox % "Error " A_LastError
while font.ReadUInt() != 0x656D616E ; "name" table
continue
;font.seek(0xCC)
;msgbox % font.ReadUInt()
class http {
static o := ComObjCreate("WinHttp.WinHttpRequest.5.1")
get(args*) {
return this._request("GET", args*)
}
post(args*) {
return this._request("POST", args*)
/*
CreateFormData - Creates "multipart/form-data" for http post
https://www.autohotkey.com/boards/viewtopic.php?t=7647
Usage: CreateFormData(ByRef retData, ByRef retHeader, objParam)
retData - (out) Data used for HTTP POST.
retHeader - (out) Content-Type header used for HTTP POST.
objParam - (in) An object defines the form parameters.
^!LButton::Compass(1) ; Ctrl+Alt+LButton
^+LButton::Compass(2) ; Ctrl+Shift+LButton
/* Compass
* by kon - http://ahkscript.org/boards/viewtopic.php?f=6&t=7225
* Measure angles with your mouse. Press the hotkeys and drag your mouse between two points.
* If you change the hotkeys, also change the keys GetKeyState monitors in the while-loop.
* If you have multiple monitors, adjust the static variables w and h to match your resolution.
* Parameters
@fuzzmz
fuzzmz / extract.bat
Created June 7, 2012 21:52
Recursively extract archives in nested folders with 7-zip
FOR /D /r %%F in ("*") DO (
pushd %CD%
cd %%F
FOR %%X in (*.rar *.zip) DO (
"C:\Program Files\7-zip\7z.exe" x %%X
)
popd
)