However I had to set the transparency value to 85 for it to work on all 3 of: the systray, an AHK window title bar, the Program Files folder window.
The issues I am having are:
- Does a transparency value have to be set? Can this be avoided if you use TransBlack or TransWhite etc.
- How can the transparency colour RGB value for an icon be retrieved. (I tried MS Paint Windows XP version, NirSoft IconsExtract, IcoFX, Icon Sushi.)
- When ImageSearch is used, hIcon, appears not to work anymore. Although the variable does retain its value.
- Can this script be modified to work with Notepad's icon?
Code: Select all
q:: ;move cursor to 16x16 AHK exe icon e.g. systray, title bar, Explorer windows CoordMode, Pixel, Screen CoordMode, Mouse, Screen vPath := A_AhkPath hIcon := LoadPicture(vPath, "w16 h16", vType) ;SplashImage, HICON:%hIcon%, B ImageSearch, vPosX, vPosY, 0, 0, % A_ScreenWidth, % A_ScreenHeight, % "*85 HICON:*" hIcon ;hIcon appears to be destroyed by using it with ImageSearch ;SplashImage, HICON:%hIcon%, B MouseMove, % vPosX, % vPosY return