按键精灵的系统插件(Sys) | 信义之树

按键精灵的系统插件(Sys)

2018年02月24日 星期六 22:32:50 按键精灵 7,557 次 0

一、得到/设置屏幕分辨率和色深

screenX = Plugin.sys.GetScRX()
screenY = Plugin.sys.GetScRY()
Dep=plugin.sys.GetScDep()
TracePrint screenX
TracePrint screenY
TracePrint Dep
Call Plugin.sys.SetSc(1024,768,16)

二、获取系统运行时间

KeyPress "F2", 1
time1 = Plugin.sys.GetTime()
Do
    time2 = Plugin.sys.GetTime()
    If time2 - time1 >= 10000 Then 
        TracePrint "冷却时间到"
        KeyPress "F2", 1
        time1 = Plugin.sys.GetTime()
    Else 
        TracePrint "冷却时间未到"
        KeyPress "F3", 1
        Delay 1000
    End If
loop

三、获取系统运行时间

银币 = 10000
当前系统时间 = Plugin.sys.GetDateTime()
Call plugin.file.WriteFileEx("C:\记录.txt",当前系统时间&" 银币="&银币)

四、设置/得到剪贴板内容

账号 = "487786133"
Call plugin.sys.SetCLB(账号)
Clipboard = Plugin.sys.GetCLB()
TracePrint Clipboard

五、获取操作系统类型

系统类型 = Plugin.sys.GetOSType()
Select Case 系统类型
Case 0
    MessageBox "您的操作系统版本是:Windows 95/98"
Case 1
    MessageBox "您的操作系统版本是:windows ME/windows NT/windows 2000/windows XP"
Case 2
    MessageBox "您的操作系统版本是:windows 2003"
Case 3
    MessageBox "您的操作系统版本是:windows 2008"
Case 4
    MessageBox "您的操作系统版本是:Windows vista"
Case 5
    MessageBox "您的操作系统版本是:win7"
Case 6
    MessageBox "您的操作系统版本是:windows CE"
Case Else
    MessageBox "无法识别当前系统"
End Select

六、自动关机

While true
    s = Plugin.sys.GetDateTime()
    TracePrint "您的操作系统日期和时间:" & s
    If s="2018-02-24 22:17:00" then
        Call Plugin.sys.ExitOS(0)
    Else 
        Delay 200
    End if
Wend