altrun简化版


#IfWinActive
!r::
brray := {控制面板:"kzmb",我的电脑:"wddn",回收站:"hsz",程序4:"cx4-rj5",程序5:"cx4-rj5",程序6:"cx4-rj5",程序7:"cx4-rj5",程序8:"cx4-rj5",程序9:"cx4-rj5",程序99:"cx4-rj5",程序22:"cx4-rj5",程序33:"cx4-rj5",程序333:"cx4-rj5",程序333:"cx4-rj5",程序222:"cx4-rj5"}
array:=[]
i:=0
Gui, -SysMenu AlwaysOnTop Resize
gui, font, s12
Gui, Add, Edit,w400 h20 x0 y0 vName gMySubroutine
Gui, Add, ListView, r11 w400 x0 y20 Count 10 -Hdr  ,111|22222222222222222222222|3333
For key, value in brray
    LV_Add( ,A_Index,key,value)
LV_Modify(1, "Select")
Gui, Show,w400 h193
ControlFocus,edit1,ahk_class AutoHotkeyGUI
DllCall("SendMessage" , UInt, DllCall("imm32ImmGetDefaultIMEWnd", Uint,ahk_class AutoHotkeyGUI), UInt, 0x0283   ,  Int, 0x002  ,  Int, 0x00)   ;切换成英文
OnMessage(0x86,"LostFocus")
return


LostFocus(wParam){
    if(wParam=0)
	{
        Gui, Destroy
		OnMessage(0x86, "")
		}
}

MySubroutine:
Gui, Submit , NoHide
LV_Delete()
if name
{
For key, value in brray
	{
		if value contains %name%
			{
			i:=i+1
			LV_Add( ,i,key,value)
			array[i] := key
			}
	}
i:=0
LV_Modify(1, "Select")
}
Else
For key, value in brray
    LV_Add( ,A_Index,key,value)
LV_Modify(1, "Select")
Return

我的电脑:
Run ::{20d04fe0-3aea-1069-a2d8-08002b30309d}  ; 打开 "我的电脑" 文件夹.
Return
回收站:
Run ::{645ff040-5081-101b-9f08-00aa002f954e}  ; 打开回收站.
Return
控制面板:
run C:WINDOWSsystem32control.exe
Return

#IfWinActive ahk_class AutoHotkeyGUI
esc::Gui, Destroy
!r::Gui, Destroy
Enter::
Space::
LV_GetText(OutputVar, LV_GetNext(), 2)
Gosub,%outputvar%
Sleep,200
Gui, Destroy
Return
down::
var2:=LV_GetNext()
LV_Modify(var2, "-Select")
if (var2 = LV_GetCount())
	var2:=0
LV_Modify(var2+1, "Select")
Return
up::
var2:=LV_GetNext()
LV_Modify(var2, "-Select")
if var2=0
	LV_Modify(LV_GetCount(), "Select")
Else if var2 = 1
	LV_Modify(LV_GetCount(), "Select")
Else
	LV_Modify(var2-1, "Select")
Return
1::
LV_GetText(OutputVar, 1, 2)
Gosub,%outputvar%
Sleep,200
Gui, Destroy
Return
2::
LV_GetText(OutputVar, 2, 2)
Gosub,%outputvar%
Sleep,200
Gui, Destroy
Return
3::
LV_GetText(OutputVar, 3, 2)
Gosub,%outputvar%
Sleep,200
Gui, Destroy
Return
4::
LV_GetText(OutputVar, 4, 2)
Gosub,%outputvar%
Sleep,200
Gui, Destroy
Return


给TA捐赠
共{{data.count}}人
人已捐赠
其他案例

altrun、wala功能合并简化脚本-对外公用版

2020-3-25 13:45:03

其他教程

ANSI脚本

2020-3-25 15:33:33

个人中心
购物车
优惠劵
今日签到
有新私信 私信列表
搜索