AutoHotkey数组例子
来源:互联网 发布:python 定时发送邮件 编辑:程序博客网 时间:2024/05/20 16:37
通过查看AutoHotkey的帮助文档,可以看到AHK支持数组,但例子和文档表述还是不明晰,因此花了半天时间调试,成功写出了一维数组、二维数组的示例
;[以下测试从文件逐行读取数据到一维数组,并再次从一维数组读出cnt_rqlb=0Loop, read, rqlb.txt{ cnt_rqlb+=1;下一行中因使用:=,所以右侧不添加%% rqlb%cnt_rqlb%:=A_LoopReadLine;下一行中的" . "有讲究,注意"."两侧都要保留空格,且OutputDebug后不是","而是"%" OutputDebug % "1D Read File:" . rqlb%cnt_rqlb% }OutputDebug, cnt_rqlb=%cnt_rqlb%Loop %cnt_rqlb%{;下一行中的:=又有讲究,右侧因访问数组下标,所以出现了%A_Index% strLine:=rqlb%A_Index% OutputDebug % "1D Read Array:" . A_Index . " is " . rqlb%A_Index%};];[以下测试从文件逐行逐列读取数据到二维数组,并再次从二维数组读出cnt_rqlb=0Loop, read, rqlb.txt{ row=%A_Index% cnt_rqlb+=1 Loop, parse, A_LoopReadLine, %A_Tab% { col=%A_Index% rqlb%row%_%col%=%A_LoopField% OutputDebug % "2D Read File:" . rqlb%row%_%col% }}OutputDebug, cnt_rqlb=%cnt_rqlb%;下面两行都可以输出数组指定下标的数据OutputDebug, rqlb1_1=%rqlb1_1%OutputDebug % "rqlb1_2=" . rqlb1_2Loop %cnt_rqlb%{ row=%A_Index% Loop 2 { col=%A_Index% item:=rqlb%row%_%col% OutputDebug % "2D Read Array:(" . row . " ," . col . ") is " . rqlb%row%_%col% }};]
0 0
- AutoHotkey数组例子
- Autohotkey
- AutoHotKey的那些事儿:(二)、AutoHotkey变量、函数、数组、类的使用
- AutoHotKey定时器
- AutoHotkey DllCall()
- 初识AutoHotKey
- Autohotkey配置
- AutoHotkey入门教程
- autohotkey txt
- AutoHotKey 学习
- Autohotkey介紹
- 用 AutoHotkey 做一个文件查找工具之二:数组的使用
- 函数传递数组 例子
- js 数组例子
- 指针数组的例子
- 数组打乱小例子
- 对象数组例子
- php数组array_merge例子
- UITabeViews---设置字体格式,大小,颜色
- 用例规约
- Linux tar 解压命令总结
- c# 调用Web Service的问题:The operation 'XXX' could not be loaded because it has a parameter...
- swustoj2521 acmer的约会—状态压缩+bfs
- AutoHotkey数组例子
- linux awk命令详解
- https://leetcode.com/problems/sqrtx/
- 【原创】windows 进程管理
- 位运算符(&【按位与】,|【按位或】,^按位异或,~【按位取反】,<<【向左移动】,>>【向右移动】)
- 第九周 项目二--Time类中的运算符重载(续)
- php 中使用cURL发送get/post请求,上传图片,批处理
- 连接池和使用dbutils
- 风格和房管局和法国加工费