[英]Is there a way I can make a exe, bat or other file in Windows type to change the cursor to 'busy' after execution?
我试图通过执行一个将更改光标一段时间的文件来模拟繁忙的窗口,或更简单的是繁忙的光标。 我希望能够控制光标处于“忙碌”状态的时间。 有任何想法吗?
创建批处理文件并放置“ TIMEOUT 60”语句对您有用吗? 60只是秒数,因此您可以根据需要进行调整。
如果这没有提供您要查找的“忙”状态,则还可以在批处理文件中创建一个for循环,该循环计数到某个固定数字,然后退出。
您可以创建一个AutoHotkey脚本。
使用此SetSystemCursor
函数,并将以下内容添加到自动执行部分的顶部:
#NoTrayIcon
#Persistent
DefaultBusyTime := 1000
SetSystemCursor("IDC_WAIT")
If %0% > 1
SetTimer,RestoreSystemCursor,-%1%
Else
SetTimer,RestoreSystemCursor,-%DefaultBusyTime%
Return
RestoreSystemCursor:
SetSystemCursor("Restore")
ExitApp
Return
完整脚本: busycursor.ahk
编译为独立可执行文件:
Ahk2Exe.exe /in busycursor.ahk /out busycursor.exe
将毫秒的繁忙等待时间作为参数传递:
busycursor 2500
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.