这个AHK脚本是用来给Win10PE修复显示桌面用的

Post a reply


In an effort to prevent automatic submissions, we require that you complete the following challenge.
Smilies
:D :) ;) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :!: :?: :idea: :| :mrgreen: :geek: :ugeek: :arrow: :angel: :clap: :crazy: :eh: :lolno: :problem: :shh: :shifty: :sick: :silent: :think: :thumbup: :thumbdown: :salute: :wave: :wtf: :yawn: :facepalm: :bravo: :dance: :beard: :morebeard: :xmas: :HeHe: :trollface: :cookie: :rainbow: :monkeysee: :monkeysay: :happybday: :headwall: :offtopic: :superhappy: :terms: :beer:
View more smilies

BBCode is ON
[img] is OFF
[flash] is OFF
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: 这个AHK脚本是用来给Win10PE修复显示桌面用的

这个AHK脚本是用来给Win10PE修复显示桌面用的

Post by daiaji » 29 May 2017, 19:22

Code: Select all

;#NoTrayIcon ;隐藏图标
if not A_IsAdmin ;查询是否具有管理员权限
{
   Run *RunAs "%A_AhkPath%"  ; 需要 v1.0.92.01+
   ExitApp
}
Loop ;循环
{
	IfWinExist, ahk_class Shell_TrayWnd ;判断是否存在ahk_class为Shell_TrayWnd的任务栏窗口
	{
		SendMessage, 1466, , , , ahk_class Shell_TrayWnd ;什么用不知道但是用SendMessage向ahk_class为Shell_TrayWnd的任务栏窗口发送1466的Msg
		WinWaitClose, ahk_class Shell_TrayWnd ;等待ahk_class为Shell_TrayWnd的任务栏窗口关闭
	}
	/* ;这个去掉的话底层实现是否没变?
	else ;否则
	{
		WinWait, ahk_class Shell_TrayWnd ;等待ahk_class为Shell_TrayWnd的任务栏窗口开启
	}
	*/
}
原先是别人用易语言实现的
我出于复用原则用ahk实现了一遍
人家说不要用loop
监视Explorer是否重启就行
那么问题来了
如何不用Loop监视Explorer是否重启呢?
有什么win32的API可用还是怎么的?

Top