Search found 29 matches
- 22 Jan 2022, 01:02
- Forum: 请求帮助
- Topic: AutoHotKey在发送SendInput指令时会自动发送其他其他按键,如何避免这种问题? Topic is solved
- Replies: 2
- Views: 2355
Re: AutoHotKey在发送SendInput指令时会自动发送其他其他按键,如何避免这种问题? Topic is solved
把大写的 E 改成小写的 e 试试
- 07 Feb 2019, 06:25
- Forum: Forum Issues
- Topic: Where is the Chinese Forum ?
- Replies: 69
- Views: 28013
Re: Where is the Chinese Forum ?
IMHO, making that forum unwritable(cannot post) instead of inaccessible would be better. (until a moderator found)
- 26 Nov 2018, 03:59
- Forum: 请求帮助
- Topic: 請問如何計算出文件夾中檔案的數量
- Replies: 1
- Views: 3241
Re: 請問如何計算出文件夾中檔案的數量
Code: Select all
getFilesCount(file_pattern) {
count := 0
loop, %file_pattern%, 0, 1
{
count++
}
return count
}
msgbox % getFilesCount("C:\a\*.pdf")
msgbox % getFilesCount("C:\b\*.pdf")
- 15 Jul 2016, 22:12
- Forum: Ask for Help (v1)
- Topic: Check text size Topic is solved
- Replies: 6
- Views: 2548
Re: Check text size Topic is solved
You don't need to do this by yourself, just specify "Limit" option when you add an edit control.
This would allow no more than 10 characters to be entered.
Code: Select all
Gui, Add, Edit, Limit10 vMyEdit
- 13 Jul 2016, 11:18
- Forum: 请求帮助
- Topic: 哪里能找到支持NT4.0的autohotkey版本 Topic is solved
- Replies: 1
- Views: 3196
Re: 哪里能找到支持NT4.0的autohotkey版本 Topic is solved
AHK Basic 支持 9x/NT ,最后的版本号是 1.0.48.05
这里应该能下: https://autohotkey.com/download/1.0/
这里应该能下: https://autohotkey.com/download/1.0/
- 21 Jun 2016, 02:33
- Forum: 请求帮助
- Topic: 【已解决】有没有操作已经打开的Excel表的例子? Topic is solved
- Replies: 5
- Views: 5574
Re: 有没有操作已经打开的Excel表的例子? Topic is solved
经测试很有用,非常感谢!~nams wrote:我自己的代码是下面这样,不知道能否帮到你
原来把 ComObjCreate 换成 ComObjActive 就行了,这么简单,学习了~
- 15 Jun 2016, 22:01
- Forum: 请求帮助
- Topic: 【已解决】有没有操作已经打开的Excel表的例子? Topic is solved
- Replies: 5
- Views: 5574
Re: 有没有操作已经打开的Excel表的例子? Topic is solved
谢谢,但是正像我所说的,这个方法就是把启动 Excel 到关闭 Excel 一步到位了。Marcosa1020 wrote:這裡有一些說明:https://autohotkey.com/boards/viewtopic.php?f=29&t=4256
我要的不是这个,我希望是对任何已经打开的 EXCEL 窗口里的表格进行COM操作,而不是另开一个单独的EXCEL进行操作。
- 11 Jun 2016, 04:43
- Forum: Ask for Help (v1)
- Topic: [Solved] OnMessage(WM_INITPOPUPMENU) doesn't work
- Replies: 13
- Views: 5685
Re: OnMessage(WM_INITPOPUPMENU) doesn't work
Hi, Commenting out the if (!INTERRUPTIBLE_IN_EMERGENCY) return false; lines in MsgMonitor() inside AutoHotkey_L's application.cpp is actually enough to make OnMessage(WM_INITMENUPOPUP) work. INTERRUPTIBLE_IN_EMERGENCY checks to see if a menu is being displayed at that point, which what lifeweaver w...
- 10 Jun 2016, 02:23
- Forum: Ask for Help (v1)
- Topic: [Solved] OnMessage(WM_INITPOPUPMENU) doesn't work
- Replies: 13
- Views: 5685
Re: OnMessage(WM_INITPOPUPMENU) doesn't work
Enable, MenuItemName : Allows the user to once again select MenuItemName if was previously disabled (grayed). Disable, MenuItemName : Changes MenuItemName to a gray color to indicate that the user cannot select it. ToggleEnable, MenuItemName : Disables MenuItemName if it was previously enabled; oth...
- 09 Jun 2016, 23:34
- Forum: Ask for Help (v1)
- Topic: [Solved] OnMessage(WM_INITPOPUPMENU) doesn't work
- Replies: 13
- Views: 5685
Re: OnMessage(WM_INITPOPUPMENU) doesn't work
Sorry, but I don't know how to do it...any idea please?just me wrote:So why don't you do it using the Menu command?wz520 wrote:I want to enable/disable some items before a menu is about to be shown.
- 09 Jun 2016, 23:34
- Forum: Ask for Help (v1)
- Topic: [Solved] OnMessage(WM_INITPOPUPMENU) doesn't work
- Replies: 13
- Views: 5685
Re: OnMessage(WM_INITPOPUPMENU) doesn't work
Sorry but maybe you misunderstood something. The WM_CONTEXTMENU message is sent when the user rightclicks in a window, not when a menu is opened. I have no idea about your script. You commented out the menu creation commands, so when the user rightclicks the window, WM_CONTEXTMENU() is called, then ...
- 08 Jun 2016, 22:07
- Forum: Ask for Help (v1)
- Topic: [Solved] OnMessage(WM_INITPOPUPMENU) doesn't work
- Replies: 13
- Views: 5685
Re: OnMessage(WM_INITPOPUPMENU) doesn't work
Thanks for your reply. Unfortunately, this doesn't work for me... I have read the thread you mentioned, and another thread referred by that thread. Then I changed the script to something like this: #NoEnv WM_INITMENUPOPUP(wParam, lParam, msg, hwnd) { MsgBox } WM_CONTEXTMENU(wParam, lParam, msg, hwnd...
- 08 Jun 2016, 07:53
- Forum: 请求帮助
- Topic: 【已解决】有没有操作已经打开的Excel表的例子? Topic is solved
- Replies: 5
- Views: 5574
【已解决】有没有操作已经打开的Excel表的例子? Topic is solved
网上只找到了用COM实现开启Excel->打开工作表->修改->保存->关闭,一步到位。
但是如果我已经通过其他手段启动了Excel并在其中打开了一张表,如何用AHK对它进行操作?
但是如果我已经通过其他手段启动了Excel并在其中打开了一张表,如何用AHK对它进行操作?
- 08 Jun 2016, 07:40
- Forum: Ask for Help (v1)
- Topic: [Need Help] Random Sleeps
- Replies: 3
- Views: 1357
Re: [Need Help] Random Sleeps
Code: Select all
`::
click,left
Random rand, 20, 30
Sleep %rand%
click,left
Random rand, 520, 550
Sleep %rand%
return
- 08 Jun 2016, 07:26
- Forum: Ask for Help (v1)
- Topic: [Solved] OnMessage(WM_INITPOPUPMENU) doesn't work
- Replies: 13
- Views: 5685
[Solved] OnMessage(WM_INITPOPUPMENU) doesn't work
Hi, I want to enable/disable some items before a menu is about to be shown. I know how to do this in a classic Win32 application: Process the WM_INITPOPUPMENU message. This works in my C++ application. But when I set a message handler for WM_INITMENUPOPUP using OnMessage() in an AHK script, it seems...
- 22 May 2016, 03:59
- Forum: 请求帮助
- Topic: Joysitck (請問鍵盤如何模擬搖桿)
- Replies: 5
- Views: 6425
Re: Joysitck (請問鍵盤如何模擬搖桿)
AHK可以获取Joystick的状态,但无法模拟。Windows 并没有提供模拟摇杆的API。所以不从底层驱动入手的话,应该是无解。
而且,我不明白为什么要模拟摇杆呢?有什么游戏是只支持摇杆而不支持键盘/鼠标的吗?
另外请不要随便更改顶楼的帖子内容,你这样一改在别人看来就会觉得我2楼的回帖有点莫名其妙
而且,我不明白为什么要模拟摇杆呢?有什么游戏是只支持摇杆而不支持键盘/鼠标的吗?
另外请不要随便更改顶楼的帖子内容,你这样一改在别人看来就会觉得我2楼的回帖有点莫名其妙
- 07 May 2016, 10:31
- Forum: 请求帮助
- Topic: Joysitck (請問鍵盤如何模擬搖桿)
- Replies: 5
- Views: 6425
Re: Joysitck
摇杆方向并不被分配在 Joy+数字 上。获取摇杆方向是这样的:
然后 x 和 y 就是摇杆当前的方向, x, y 的取值范围在 0~100,不碰摇杆的话 x, y 都是 50(居中)。
你贴的那个 url 里有 “让操纵杆轴向或视点帽发送键击或鼠标点击”这一节,里面的脚本就可以用来测试摇杆方向。
Code: Select all
GetKeyState, x, JoyX
GetKeyState, y, JoyY
你贴的那个 url 里有 “让操纵杆轴向或视点帽发送键击或鼠标点击”这一节,里面的脚本就可以用来测试摇杆方向。
- 18 Dec 2015, 20:23
- Forum: 请求帮助
- Topic: 如何用AHK控制外部treeview控件
- Replies: 5
- Views: 7728
- 18 Dec 2015, 20:23
- Forum: 请求帮助
- Topic: 请问如何在Win7的底下关闭程式?
- Replies: 2
- Views: 4045
Re: 请问如何在Win7的底下关闭程式?
WinClose 的参数是窗口标题栏上的文本,不是进程名。
如果你要按照进程名来关闭程序,使用 "Process, Close, AAAA.exe"
如果你要按照进程名来关闭程序,使用 "Process, Close, AAAA.exe"
- 16 Dec 2015, 06:50
- Forum: 请求帮助
- Topic: 求问大神:如何让ahk脚本同时只运行一个实例
- Replies: 2
- Views: 4901
Re: 求问大神:如何让ahk脚本同时只运行一个实例
脚本开头添加 #SingleInstance ignore 不行吗?