更改指定程序托盘图标示例

简单的修改更改指定程序托盘图标示例,给需要的人

base64Code:="iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAgAElEQVR4Xu1de1xVVfb/rnOvQiXgg8u9kDpNWpPYlGiFgfVToZpeWNOEWk2PmRoMFKvRyqZ+6adJZ9QMUTAaS5vpITr9mujhTIr6K0BtUugh1SRMIwYX8IlmAt6zfp99FX/cy7mcfc49F8Haf96z1tprr/29e5+z12MTfmjfawvQ93r0PwwePwDgew6CHwDwAwBOfwsMfTc3jI+Fj2dSXaTyv6om3F+qNeoR6+pnk81WTaraEGlzrN80jo6d7tY5rVeAc9967jyofDspymQwzvdOJqOoakLGBK2JTShu3AlgiHhGRJ+p7HnJpnhWbhsXt+d0BcJpCYBz3lh2jqIoM0jBr8EI7zh5SkpV2n0b2v8+cl3tMFZ6VWpM9G5mXqZ61MWfXOP69nQDwmkHgKFFBQ8yMANAXKDJUlW+9d83Tflr++cj1jfeToSXA/Ew+DOAFlekOJafTiA4bQAw9O3n05jVGWC6Qm+CCLhvZ1qGz0R6939FeVKPF0TFAOeWj3cU6dL2AIIeD4BziwoGE/AYgAx5e/PMqrQpC/1WgJeJcLu0DEaBwra5267qv0uapxsS9mgADCkqEJMuJn+wIdsy/75qwpQn2vMkbGjcCMZYY3Kwi4C521MdBYb4uhFxjwTAkLeXXQhVeQrATWZsSUDOzrSMB4MGwAkBDH4DiuehinGxX5vR51Ty9DgADCkq+A0AMfkxQRhueVVaxn1WAcD72Qh8qZLtoYrx/d8NQq8uZ+0xAPAe5njCCsC4K2grEVZV3Zgx2UoAtMliwsMV4x0LgtaxiwT0CAAM+ceyGG5W/kLA1VbYhcBv70ybcmMoAOCVyVhUnur4rRW6hlpGtweAOM0jplcAXGqdMWhTVdpvxoUMAN49gV4sHx/9a+t0Do2kbg+AoUUFf2XgFkuHz3inakLGDe1ljihufIsAn9+C7ZOJ8yrGx0wNVk4o+bs1AM5957lLyEP/DIEBCqvSMib5rADFja8B8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ncgF6TOtRAKhPcj3J1M2icvymupeC4QM+cOuWk+suCOlRAHAnu0StXdP+/a4wOjPmxJaZ8813hX7+ffQoANSOiR2lMH90Kgwl0ycx1jjL3EYrksqIDhlNjwKAsEIIq5YHZWRxX6+zVO6+3qA6spi5xwFAjJ+vHRrW0HT4KQYs9fmbtO3XJ5Z9y2oDmNTDFFuPBEDbSHNiFdIAAAE7SURBVN1JzgkgEmHRQeQbmrLbCSZazh5+OnaLW7eYdDC9hJK3RwPAuyVc7TyLDtMTTN5bPLqmEd4hcI6zpL6bhYkZH36PB0DbkOvHOFNVpifIyiRUP3syY7uiUI6zpE434sj4VJwajtMGAG3mqxvjupOYfgmwJQGhJ+R+Aeb898+uz09fgy65lqar4HDaAeAkEJJd4lqYO8GYZNaYDNQQON8GT56jdM8hs3K6M99pC4A2o9cmx16iMO4AsUgNl03q3AHwK0ovdUXMpsbQXJTRTVBx2gOgzc6NydFxx9h+Bx2vEXCRlv0JtE4Fv+KKc79Mp9lSHwhv3xsAtDeAe4wzESouAyERUI4SY5OH6aO4zbVfdJM/Zpep8b0EQJdZtwd09AMAesAkhVLFHwAQSuv2ANk/AKAHTFIoVfw/BWQZNYRN6C8AAAAASUVORK5CYII="
hIcon:=CreateIconFromBase64(base64Code, 48)
;;hIcon:=LoadPicture("Shell32.dll", "Icon42 w48 h-1", IMAGE_ICON:=1)
try TrayIconInfo := GetTrayIconInfo(DllCall("GetCurrentProcessId"))   ;获取指定程序的托盘图标信息,传入pid或exe进程名
if TrayIconInfo.hWnd&&hIcon
	ReplaceTrayIcon(hIcon, TrayIconInfo.hWnd, TrayIconInfo.Id)
MsgBox % TrayIconInfo.hWnd&&hIcon?"修改成功!":"修改失败!"


BitmapFromBase64(ByRef base64) { ; Modified from just me's ImageToInclude
	hBitmap := 0
	VarSetCapacity(B64, StrLen(base64) << !!A_IsUnicode)
	B64 := base64
	If !DllCall("Crypt32.dll\CryptStringToBinary", "Ptr", &B64, "UInt", 0, "UInt", 0x01, "Ptr", 0, "UIntP", DecLen, "Ptr", 0, "Ptr", 0)
		Return False
	VarSetCapacity(Dec, DecLen, 0)
	If !DllCall("Crypt32.dll\CryptStringToBinary", "Ptr", &B64, "UInt", 0, "UInt", 0x01, "Ptr", &Dec, "UIntP", DecLen, "Ptr", 0, "Ptr", 0)
		Return False
	; Bitmap creation adopted from "How to convert Image data (JPEG/PNG/GIF) to hBITMAP?" by SKAN
	; -> http://www.autohotkey.com/board/topic/21213-how-to-convert-image-data-jpegpnggif-to-hbitmap/?p=139257
	hData := DllCall("Kernel32.dll\GlobalAlloc", "UInt", 2, "UPtr", DecLen, "UPtr")
	pData := DllCall("Kernel32.dll\GlobalLock", "Ptr", hData, "UPtr")
	DllCall("Kernel32.dll\RtlMoveMemory", "Ptr", pData, "Ptr", &Dec, "UPtr", DecLen)
	DllCall("Kernel32.dll\GlobalUnlock", "Ptr", hData)
	DllCall("Ole32.dll\CreateStreamOnHGlobal", "Ptr", hData, "Int", True, "PtrP", pStream)
	hGdip := DllCall("Kernel32.dll\LoadLibrary", "Str", "Gdiplus.dll", "UPtr")
	VarSetCapacity(SI, 16, 0), NumPut(1, SI, 0, "UChar")
	DllCall("Gdiplus.dll\GdiplusStartup", "PtrP", pToken, "Ptr", &SI, "Ptr", 0)
	DllCall("Gdiplus.dll\GdipCreateBitmapFromStream",  "Ptr", pStream, "PtrP", pBitmap)
	DllCall("Gdiplus.dll\GdipCreateHBITMAPFromBitmap", "Ptr", pBitmap, "PtrP", hBitmap, "UInt", 0)
	;DllCall("Gdiplus.dll\GdipDisposeImage", "Ptr", pBitmap)
	DllCall("Gdiplus.dll\GdiplusShutdown", "Ptr", pToken)
	DllCall("Kernel32.dll\FreeLibrary", "Ptr", hGdip)
	DllCall(NumGet(NumGet(pStream + 0, 0, "UPtr") + (A_PtrSize * 2), 0, "UPtr"), "Ptr", pStream)
	Return {hBitmap:hBitmap,pBitmap:pBitmap}
}

CreateIconFromBase64(base64, icoSize){
	chars := StrLen(base64)
	if !DllCall("Crypt32\CryptStringToBinary", "Str", base64, "UInt", chars, "UInt", 1
		, "Ptr", 0, "UIntP", bytes, "UIntP", 0, "UIntP", 0)
		throw "CryptStringToBinary failed. LastError: " . A_LastError
	VarSetCapacity(icoData, bytes, 0)
	DllCall("Crypt32\CryptStringToBinary", "Str", base64, "UInt", chars, "UInt", 1
		, "Str", icoData, "UIntP", bytes, "UIntP", 0, "UIntP", 0)
	Return DllCall("CreateIconFromResourceEx", "Ptr", &icoData, "UInt", bytes, "UInt", true
		, "UInt", 0x30000, "Int", icoSize, "Int", icoSize, "UInt", 0, "Ptr")
}

ReplaceTrayIcon(hIcon, hWnd, iconId) {
	static flag := NIF_ICON := 2, action := NIM_MODIFY := 1
	VarSetCapacity(NOTIFYICONDATA, size := A_PtrSize*4 + 8, 0)
	NumPut(size  , NOTIFYICONDATA)
	NumPut(hWnd  , NOTIFYICONDATA, A_PtrSize)
	NumPut(iconId, NOTIFYICONDATA, A_PtrSize*2)
	NumPut(flag  , NOTIFYICONDATA, A_PtrSize*2 + 4)
	NumPut(hIcon , NOTIFYICONDATA, A_PtrSize*3 + 8)
	Return DllCall("Shell32\Shell_NotifyIcon", "UInt", action, "Ptr", &NOTIFYICONDATA)
}

GetTrayIconInfo(proceccNameOrPID := "") {
	static TB_GETBUTTON	:= 0x417
		  , TB_BUTTONCOUNT := 0x418
		  , ptrSize := 4 << A_Is64bitOS
		  , szTBBUTTON := 8 + ptrSize*3
		  , szTRAYDATA := 16 + ptrSize*2
	
	Arr := []
	dhw_prev := A_DetectHiddenWindows
	DetectHiddenWindows, On
	WinGet, PID, PID, ahk_exe explorer.exe
	RB := new RemoteBuffer(PID, szTRAYDATA)
	found := false
	Loop 2 {
		if (A_Index = 2)
			ControlGet, hToolBar, hwnd,, ToolbarWindow321, ahk_class NotifyIconOverflowWindow
		else {
			for k, v in ["TrayNotifyWnd", "SysPager", "ToolbarWindow32"]
				hToolBar := DllCall("FindWindowEx", "Ptr", k = 1 ? WinExist("ahk_class Shell_TrayWnd") : hToolBar, "Ptr", 0, "Str", v, "UInt", 0, "Ptr")
		}
		SendMessage, TB_BUTTONCOUNT,,,, ahk_id %hToolBar%
		Loop % ErrorLevel {
			SendMessage, TB_GETBUTTON, A_Index - 1, RB.ptr,, ahk_id %hToolBar%
			try RB.Read(TBBUTTON, szTBBUTTON)
			catch
				continue
			try RB.Read(TRAYDATA, szTRAYDATA, NumGet(&TBBUTTON + 8 + ptrSize) - RB.ptr)
			catch
				continue
			tipOffset := NumGet(&TBBUTTON + 8 + ptrSize*2) - RB.ptr
			try RB.Read(tip, 1024, tipOffset)
			hWnd := NumGet(TRAYDATA)
			WinGet, PID, PID, ahk_id %hWnd%
			(PID = proceccNameOrPID && found := true)
			WinGet, processName, ProcessName, ahk_id %hWnd%
			(processName = proceccNameOrPID && found := true)
			WinGetTitle, title, ahk_id %hWnd%
			
			Arr.Push({ PID: PID, ProcessName: processName, ID: NumGet(&TRAYDATA + ptrSize, "UInt"), WinTitle: title
						, hWnd: hWnd, Tip: tip, CallbackMessage: NumGet(&TRAYDATA + 4 + ptrSize, "UInt")
						, HICON: NumGet(&TRAYDATA + 16 + ptrSize, ptrSize = 4 ? "UInt" : "UInt64") })
		} until found
	} until found
	DetectHiddenWindows, %dhw_prev%
	if (proceccNameOrPID && !found)
		throw "Icon of specified process not found"
	Return found ? Arr.Pop() : Arr
}

class RemoteBuffer
{
	__New(PID, size) {
		static flags := (PROCESS_VM_OPERATION := 0x8) | (PROCESS_VM_WRITE := 0x20) | (PROCESS_VM_READ := 0x10)
			  , Params := ["UInt", MEM_COMMIT := 0x1000, "UInt", PAGE_READWRITE := 0x4, "Ptr"]
			
		if !this.hProc := DllCall("OpenProcess", "UInt", flags, "Int", 0, "UInt", PID, "Ptr")
			throw Exception("Can't open remote process PID = " . PID . "`nA_LastError: " . A_LastError, "RemoteBuffer.__New")
		
		if !this.ptr := DllCall("VirtualAllocEx", "Ptr", this.hProc, "Ptr", 0, "Ptr", size, Params*) {
			DllCall("CloseHandle", "Ptr", this.hProc)
			throw Exception("Can't allocate memory in remote process PID = " . PID . "`nA_LastError: " . A_LastError, "RemoteBuffer.__New")
		}
	}
	__Delete() {
		DllCall("VirtualFreeEx", "Ptr", this.hProc, "Ptr", this.ptr, "UInt", 0, "UInt", MEM_RELEASE := 0x8000)
		DllCall("CloseHandle", "Ptr", this.hProc)
	}
	Read(ByRef localBuff, size, offset = 0) {
		VarSetCapacity(localBuff, size, 0)
		if !DllCall("ReadProcessMemory", "Ptr", this.hProc, "Ptr", this.ptr + offset, "Ptr", &localBuff, "Ptr", size, "PtrP", bytesRead)
			throw Exception("Can't read data from remote buffer`nA_LastError: " . A_LastError, "RemoteBuffer.Read")
		Return bytesRead
	}
	Write(pData, size, offset = 0) {
		if !res := DllCall("WriteProcessMemory", "Ptr", this.hProc, "Ptr", this.ptr + offset, "Ptr", pData, "Ptr", size, "PtrP", bytesWritten)
			throw Exception("Can't write data to remote buffer`nA_LastError: " . A_LastError, "RemoteBuffer.Write")
		Return bytesWritten
	}
}

给TA捐赠
共{{data.count}}人
人已捐赠
工具社区推荐

鼠标周围高亮

2022-5-22 12:09:34

AHKV1代码示例其他

[第1001关] 极速构建一个输出热字符串输出的形码输入法

2022-5-23 9:13:24

6 条回复 A文章作者 M管理员
  1. doge

    大佬,我想问一下,有没有这样的软件或脚本:比如我打开了一个Chrome,我正在浏览网页,但是我想把任务栏(非托盘)上的Chrome图标给隐藏掉。因为平时工作开了很多窗口,任务栏太挤了,不能第一时间找到我想要的。

    • HoneyBadger

      ; Ctrl+f1一键隐藏或恢复当前活动窗口的任务栏图标,代码就这样窗口ToolWindow对应样式是0x80,怎么实现方便自己研究
      DetectHiddenWindows, On

      ^F1::
      WinHide, % “ahk_id ” (AID:=WinExist(“A”))
      WinSet, ExStyle, ^0x80, ahk_id %AID%
      WinShow, ahk_id %AID%

      Return

    • doge

      谢谢,我研究研究

  2. dbgba
    dbgba给您打赏了¥5
  3. 1河许人
    1河许人给您打赏了¥2
个人中心
购物车
优惠劵
今日签到
有新私信 私信列表
搜索