当前位置: 首页 > 按键精灵 > 正文

按键精灵的事件子程序

一、脚本载入事件子程序(onscriptload)123Sub onscriptload() MessageBox "脚本载入配置完成"End Sub二、脚本停止事件子程序(onscriptexit)123Sub onscr

信义之树

一、脚本载入事件子程序(onscriptload)

1
2
3
Sub onscriptload()
    MessageBox "脚本载入配置完成"
End Sub

二、脚本停止事件子程序(onscriptexit)

1
2
3
Sub onscriptexit()
    MessageBox "脚本已经停止"
End Sub

三、线程停止事件子程序(onthreadexit)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
Global 线程ID1,线程ID2
线程ID1=BeginThread(子线程1)
线程ID2=BeginThread(子线程2)
Sub 子线程1()
    TracePrint "子线程1被启动"
End Sub
Sub 子线程2()
    TracePrint "子线程2被启动"
End Sub
Sub onthreadexit()
    Dim threadID
    threadID = GetThreadID()
    Select Case threadID
    Case 线程ID1
        TracePrint "线程1("&线程ID1&")已经停止"
    Case 线程ID2
        TracePrint "线程2("&线程ID2&")已经停止"
    End Select 
End Sub



上一篇: 按键精灵的多线程 下一篇:按键精灵的QUI界面之窗体事件
返回顶部