[AHK]简版堆栈实现
来源:互联网 发布:java 网络拓扑发现 编辑:程序博客网 时间:2024/06/05 21:19
数据结构
S:=[] ; new StackS.Push("Hello")S.Push("World")MsgBox % S.Pop() S.Pop()
栈数据结构的应用,按热键依次最小化当前窗口,再按热键依次逆序恢复最小化的窗口(作品来自网友: 道破红尘 )
WindowList:=[];shift+esc 最小化窗口,shift+`还原窗口+esc::WindowLIst.push(WinExist("A"))PostMessage,0X112,0XF020,,,% "ahk_id" WinExist("A")return+`::WinActivate % "ahk_id" WindowList.pop()return
实现顺序粘贴,即先在某个窗口复制几个条目(F1热键),然后再另一个窗口依次粘贴填表(F2热键),每粘贴完成后会清除掉该条目,如果想恢复刚用过的条目需要按(F3热键)。代码出自:QZ/VimD/TC/AHK 271105729 群
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.; #Warn ; Enable warnings to assist with detecting common errors.SendMode Input ; Recommended for new scripts due to its superior speed and reliability.SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.f1:: CBData.Copy()returnf2:: CBData.Paste()returnf3:: CBData.Redo()returnClass CBData{ Static List:= [] Static Recycle := [] Copy() { CB := ClipboardAll Clipboard := "" SendInput, ^{Ins} ;^{vk43sc02E} ;ctrl+c ClipWait,% 1, 1 If !Errorlevel this.List.Insert(Clipboard) Clipboard := CB this.Show() } Paste() { msg := this.List[this.List.MinIndex()] If strlen(msg) { CB := ClipboardAll Clipboard := msg SendInput, ^v this.List.Remove(1) this.Recycle.Insert(msg) } this.Show() } Redo() { msg := this.Recycle[this.Recycle.MaxIndex()] If strlen(msg) { this.List.InsertAt(1,msg) this.Recycle.Remove() } this.Show() } Show() { Loop % this.List.MaxIndex() { msg .= "#" A_Index " | `t" this.List[A_Index] "`n" } Tooltip % msg }}
阅读全文
0 0
- [AHK]简版堆栈实现
- [AHK]仅识别八个方向的简版鼠标手势实现
- AHK 单键实现复制粘贴
- AHK
- 堆栈实现
- 实现堆栈
- 堆栈实现
- 堆栈实现
- [AHK]用AutoHotkey实现中银国际通达信版自动登录
- AHK-简单实现的注册表定位脚本
- [FUNC]用ahk的类实现秒表
- [AHK]虚拟数字小键盘(NumPad) v3.0 绿色免费版(ahk实现作品,作者小恐龙)
- [AHK]AutoHotkey版的鼠标手势
- PyAutoGUI-python版的autoit/AHK
- PyAutoGUI-python版的autoit/AHK
- [转] 16行AHK代码实现鼠标手势!
- 用AHK实现水木社区一C++程序
- [转] 16行AHK代码实现鼠标手势!
- Android使用SO库时要注意的一些问题
- Retrofit 请求数据返回乱码问题笔记
- 存储过程详解
- linux串口命令
- Group Anagrams
- [AHK]简版堆栈实现
- JavaScript中promise的基本用法
- 深入理解线程安全和可重入函数
- 基于jfreechart的图表生成方法
- Python 中 argparse简单使用
- Python中的join()函数的用法
- 深入理解HBase的系统架构
- java中Class对象详解
- jQuery选择器大全