实例介绍
【实例简介】按键精灵脚本源代码,可以根据自己需要设置按键,设置技能冷却时间。文件是按键精灵软件导出的,使用进行导入就OK
【实例截图】
【实例截图】
【核心代码】
[General] SyntaxVersion=2 BeginHotkey=121 BeginHotkeyMod=0 PauseHotkey=0 PauseHotkeyMod=0 StopHotkey=123 StopHotkeyMod=0 RunOnce=1 EnableWindow= MacroID=743f684b-0984-4707-b7c1-e352d9e61276 Description=1-7按 Enable=0 AutoRun=0 [Repeat] Type=0 Number=1 [SetupUI] Type=1 QUI=Form1 [Relative] SetupOCXFile= [Comment] [UIPackage] UEsDBBQAAgAIAExulz92IcwmhAEAAEoFAAAJABEAVUlQYWNrYWdlVVQNAAc h/ROPof0Tj6H9E5tks1KAlEUgO YllHWA1QgvkDOv21NhqS20UJUVIQo0zKDNoFB9LtpkbVrkb1A0CpctIyew4do0aJz6jh27z3CNzMO5/sWZ25ECGEAS0A0aLX3YngxDXz371eOCPEF99hGpVpvTP5ecShhDr7fhx vny DYf8NpXlgFigBKcWw0LA4I0VGRjFsNGzOcMlYVwwHDYcz8mSUFcNFw WMEtFRDA8NjzPaZFwqho GrxpzNFkEHoF4vrl/1Mm2jqdHD7hjIw3LFzVgBrgCFoWSz DY4QS8vaH1PwALbNKSkklKmmpyRUqmKGmySVtK2pTMjZNTfwcmLTVdaubYphM2q0BAm9rSmmbYvAbWgHua05uu1CxQs6E1LalZpGaDbXpSs0XNrta0peYBNbts0w bFeAMuAB6WtMJm7jvc5pB4qvb9douNkcPuKfxnyjM3AEJ4IlOlKFLFislSVrmJVuTenQq kCWlxxWCkja5CWXlQok7fCSp0n4IZrAM3DCSz4rnZJ0i9IPUEsBAhcLFAACAAgATG6XP3YhzCaEAQAASgUAAAkACQAAAAAAAAAAAACAAAAAAFVJUGFja2FnZVVUBQAHPof0TlBLBQYAAAAAAQABAEAAAAC8AQAAAAA= [Script] hwnd = Plugin.Window.MousePoint() time01 = now()//1键开始时间 time02 = time01//2键开始时间 time03 = time01//3键开始时间 time04 = time01//4键开始时间 time05 = time01//5键开始时间 time06 = time01//6键开始时间 time07 = time01//7键开始时间 time01_lengque = Form1.InputBox1.Text//1键上的技能冷却时间 time02_lengque = Form1.InputBox2.Text//2键上的技能冷却时间 time03_lengque = Form1.InputBox3.Text//3键上的技能冷却时间 time04_lengque = Form1.InputBox4.Text//4键上的技能冷却时间 time05_lengque = Form1.InputBox5.Text//5键上的技能冷却时间 time06_lengque = Form1.InputBox6.Text//6键上的技能冷却时间 time07_lengque = Form1.InputBox7.Text//7键上的技能冷却时间 time01_enable = Form1.CheckBox1.Value time02_enable = Form1.CheckBox2.Value time03_enable = Form1.CheckBox3.Value time04_enable = Form1.CheckBox4.Value time05_enable = Form1.CheckBox5.Value time06_enable = Form1.CheckBox6.Value time07_enable = Form1.CheckBox7.Value Rem xunhuan Call mainRukou Delay 10 //================================================================= //程序主函数 Sub mainRukou() result = DateDiff("s", time01, now()) If FormatNumber(result)>=FormatNumber(time01_lengque) And time01_enable Then //1键的技能冷却完成,可以释放 Call Plugin.Bkgnd.KeyPress(hwnd, 49) Delay 5 time01 = now() MessageBox time01_enable End If result = DateDiff("s", time02, now()) If FormatNumber(result)>=FormatNumber(time02_lengque) And time02_enable Then //2键的技能冷却完成,可以释放 Call Plugin.Bkgnd.KeyPress(hwnd, 50) Delay 5 time02 = now() End If result = DateDiff("s", time03, now()) If FormatNumber(result)>=FormatNumber(time03_lengque) And time03_enable Then //3键的技能冷却完成,可以释放 Call Plugin.Bkgnd.KeyPress(hwnd, 51) Delay 5 time03 = now() End If result = DateDiff("s", time04, now()) If FormatNumber(result)>=FormatNumber(time04_lengque) And time04_enable Then //4键的技能冷却完成,可以释放 Call Plugin.Bkgnd.KeyPress(hwnd, 52) Delay 5 time04 = now() End If result = DateDiff("s", time05, now()) If FormatNumber(result)>=FormatNumber(time05_lengque) And time05_enable Then //5键的技能冷却完成,可以释放 Call Plugin.Bkgnd.KeyPress(hwnd, 53) Delay 5 time05 = now() End If result = DateDiff("s", time06, now()) If FormatNumber(result)>=FormatNumber(time06_lengque) And time06_enable Then //6键的技能冷却完成,可以释放 Call Plugin.Bkgnd.KeyPress(hwnd, 54) Delay 5 time06 = now() End If result = DateDiff("s", time07, now()) If FormatNumber(result)>=FormatNumber(time07_lengque) And time07_enable Then //7键的技能冷却完成,可以释放 Call Plugin.Bkgnd.KeyPress(hwnd, 55) Delay 5 time07 = now() End If //============================================================= //此处进行血、蓝的判断 KeyDown 17,1 //Ctrl 1 Call Plugin.Bkgnd.KeyPress(hwnd,49) KeyUp 17,1 //============================================================= End Sub //================================================================= //输入界面数据改变正确性判断; Event Form1.InputBox1.Change temp = IsNumeric(Form1.InputBox1.Text) If temp=false Then Form1.InputBox1.Text="0" End If End Event Event Form1.InputBox2.Change temp = IsNumeric(Form1.InputBox2.Text) If temp=false Then Form1.InputBox2.Text="0" End If End Event Event Form1.InputBox3.Change temp = IsNumeric(Form1.InputBox3.Text) If temp=false Then Form1.InputBox3.Text="0" End If End Event Event Form1.InputBox4.Change temp = IsNumeric(Form1.InputBox4.Text) If temp=false Then Form1.InputBox4.Text="0" End If End Event Event Form1.InputBox5.Change temp = IsNumeric(Form1.InputBox5.Text) If temp=false Then Form1.InputBox5.Text="0" End If End Event Event Form1.InputBox6.Change temp = IsNumeric(Form1.InputBox6.Text) If temp=false Then Form1.InputBox6.Text="0" End If End Event Event Form1.InputBox7.Change temp = IsNumeric(Form1.InputBox7.Text) If temp=false Then Form1.InputBox7.Text="0" End If End Event Event Form1.CheckBox1.Click time01_enable=Form1.CheckBox1.Value End Event Event Form1.CheckBox2.Click time02_enable=Form1.CheckBox2.Value End Event Event Form1.CheckBox3.Click time03_enable=Form1.CheckBox3.Value End Event Event Form1.CheckBox4.Click time04_enable=Form1.CheckBox4.Value End Event Event Form1.CheckBox5.Click time05_enable=Form1.CheckBox5.Value End Event Event Form1.CheckBox6.Click time06_enable=Form6.CheckBox6.Value End Event Event Form1.CheckBox7.Click time07_enable=Form1.CheckBox7.Value End Event //=================================================================
好例子网口号:伸出你的我的手 — 分享!
小贴士
感谢您为本站写下的评论,您的评论对其它用户来说具有重要的参考价值,所以请认真填写。
- 类似“顶”、“沙发”之类没有营养的文字,对勤劳贡献的楼主来说是令人沮丧的反馈信息。
- 相信您也不想看到一排文字/表情墙,所以请不要反馈意义不大的重复字符,也请尽量不要纯表情的回复。
- 提问之前请再仔细看一遍楼主的说明,或许是您遗漏了。
- 请勿到处挖坑绊人、招贴广告。既占空间让人厌烦,又没人会搭理,于人于己都无利。
关于好例子网
本站旨在为广大IT学习爱好者提供一个非营利性互相学习交流分享平台。本站所有资源都可以被免费获取学习研究。本站资源来自网友分享,对搜索内容的合法性不具有预见性、识别性、控制性,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,平台无法对用户传输的作品、信息、内容的权属或合法性、安全性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论平台是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二与二十三条之规定,若资源存在侵权或相关问题请联系本站客服人员,点此联系我们。关于更多版权及免责申明参见 版权及免责申明
网友评论
我要评论