找回密码
 加入
搜索
楼主: joydog

au3怎么提取EXE中的图标资源??

  [复制链接]
发表于 2012-3-5 04:21:13 | 显示全部楼层
正在找这东西收下了
发表于 2012-3-5 04:39:51 | 显示全部楼层
算了,高级的搞不了,就用愚公移山的办法吧,能行得通就行.
#include <WinAPI.au3>
#include <WinAPIEx.au3>
$file = FileOpen("vDesk.scf",10) ;创建一个'显示桌面'的副本.
FileWriteLine($file,"[Shell]")
FileWriteLine($file,"Command=2")
FileWriteLine($file,"IconFile=explorer.exe,3")
FileWriteLine($file,"[Taskbar]")
FileWriteLine($file,"Command=ToggleDesktop")
FileClose($file)
ShellExecuteWait("vDesk.scf");执行这个动作
Sleep(1000)
Global $qWnd = _WinAPI_GetForegroundWindow();获取当前前景窗口句柄
Global Const $hWndDesktop = _WinAPI_GetDesktopWindow();桌面句宾
MsgBox(16,"",_WinAPI_GetClassName($qWnd)) ;显示所提取的句柄
While 1
        Sleep(50)
;如果前景窗口为所提取的窗口就再执行一次,恢复桌面窗口为前景窗口.
        If         _WinAPI_GetForegroundWindow() = $qWnd Then
        ShellExecuteWait("vDesk.scf")        
        EndIf
WEnd
已解决
您需要登录后才可以回帖 登录 | 加入

本版积分规则

QQ|手机版|小黑屋|AUTOIT CN ( 鲁ICP备19019924号-1 )谷歌 百度

GMT+8, 2024-9-30 19:39 , Processed in 0.158541 second(s), 15 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表