Search found 13 matches
- 24 Jun 2020, 06:33
- Forum: Ask for Help (v2)
- Topic: Error: Target Window not found Topic is solved
- Replies: 3
- Views: 3407
Re: Error: Target Window not found Topic is solved
Thank all you guys.
- 22 Jun 2020, 08:22
- Forum: Ask for Help (v2)
- Topic: Error: Target Window not found Topic is solved
- Replies: 3
- Views: 3407
Error: Target Window not found Topic is solved
I'm running ProcessName:=WinGetProcessName("A") 批注 2020-06-22 212208.png The code sometimes gives error: Target Window not found. I checked the documentation, but failed to find related information. When does this error happen? How do I deal with it? Is it documented anywhere? I'm using Autohotkey v...
- 10 Feb 2018, 20:49
- Forum: Ask for Help (v2)
- Topic: Invalid return type for DllCall Topic is solved
- Replies: 5
- Views: 2371
Re: Invalid return type for DllCall Topic is solved
oh, LOL, I was just testing the codeguest3456 wrote:its also weird how the string is getting interpreted as "Close111Handle"
- 10 Feb 2018, 01:55
- Forum: Ask for Help (v2)
- Topic: Invalid return type for DllCall Topic is solved
- Replies: 5
- Views: 2371
Invalid return type for DllCall Topic is solved
GetModuleFileNameEx( p_pid ) ; by shimanov - www.autohotkey.com/forum/viewtopic.php?t=9000 { local h_process, name_size, result, name h_process := DllCall( "OpenProcess", "uint", 0x10|0x400, "int", false, "uint", p_pid ) if ( ErrorLevel or h_process = 0 ) return name_size:= 255 VarSetCapacity( name...
- 30 Jan 2018, 03:30
- Forum: Ask for Help (v1)
- Topic: How to check if active window runs as admin? Topic is solved
- Replies: 4
- Views: 2932
Re: How to check if active window runs as admin? Topic is solved
Thanks, jeeswg. I made a modification by declaring the variables before use so that in #warn mode it doesn't throw exception. q:: ;is process admin WinGet, vPID, PID, ahk_class RegEdit_RegEdit MsgBox, % JEE_ProcessIsElevated(vPID) WinGet, vPID, PID, ahk_class Notepad MsgBox, % JEE_ProcessIsElevated(...
- 28 Jan 2018, 14:23
- Forum: Ask for Help (v1)
- Topic: How to check if active window runs as admin? Topic is solved
- Replies: 4
- Views: 2932
- 27 Jan 2018, 11:43
- Forum: Ask for Help (v1)
- Topic: How to switch to the File Explorer Window that's opened to a specific folder path? Topic is solved
- Replies: 8
- Views: 1877
Re: How to switch to the File Explorer Window that's opened to a specific folder path? Topic is solved
A slight mod of GEV's script: q:: ;explorer - activate window that matches folder folder_path := "C:\Windows\Temp" ; Get fullpath of all opened explorer windows: ; https://autohotkey.com/boards/viewtopic.php?p=28751#p28751 for window in ComObjCreate("Shell.Application").Windows { explorer_path := "...
- 27 Jan 2018, 04:15
- Forum: Ask for Help (v1)
- Topic: How to switch to the File Explorer Window that's opened to a specific folder path? Topic is solved
- Replies: 8
- Views: 1877
Re: How to switch to the File Explorer Window that's opened to a specific folder path? Topic is solved
I'm in favor of GEV's solution but there is my two cents. My code utilize the pattern that the title of the explorer window shows the folder name. So my script gets the last folder name of your desired path, search for all opened explorer windows and find the match. Note if there are explorer window...
- 27 Jan 2018, 03:18
- Forum: 请求帮助
- Topic: 如何用快捷键快速粘贴一个图片
- Replies: 2
- Views: 3900
Re: 如何用快捷键快速粘贴一个图片
这要看你在哪里写邮件。如果是Outlook之类的,应该有插入图片快捷键,AutoHotKey可以发送这个快捷键,然后贴上图片地址,然后自动按回车。
或者可以把图片放入剪贴板,我觉得这个方法比较好,也比较稳定,但AutoHotkey好像不支持设置ClipboardAll。我知道C#可以把文件对象或其他非文本数据放进剪贴板。所以你如果想用AutoHotKey实现的话,搜索一下看看能不能用COM或DLL调用设置剪贴板。
或者可以把图片放入剪贴板,我觉得这个方法比较好,也比较稳定,但AutoHotkey好像不支持设置ClipboardAll。我知道C#可以把文件对象或其他非文本数据放进剪贴板。所以你如果想用AutoHotKey实现的话,搜索一下看看能不能用COM或DLL调用设置剪贴板。
- 27 Jan 2018, 03:07
- Forum: Ask for Help (v1)
- Topic: How to check if active window runs as admin? Topic is solved
- Replies: 4
- Views: 2932
How to check if active window runs as admin? Topic is solved
Tons of questions and articles are talking about how to run AutoHotKey as admin. However I'm doing the opposite way.
I know my script runs under normal user mode, can my script check if another window runs under admin mode?
I know my script runs under normal user mode, can my script check if another window runs under admin mode?
- 21 Jul 2015, 22:42
- Forum: Ask for Help (v1)
- Topic: ^* doesn't capture ctrl+a, ctrl+b, etc.
- Replies: 3
- Views: 1343
^* doesn't capture ctrl+a, ctrl+b, etc.
Code: Select all
^*::
msgbox hello
return
From the documentation I know asterisk is wildcard, but it seems not to work in this situation. Is it a known limitation or did I use it correctly?
- 21 Jul 2015, 02:21
- Forum: Ask for Help (v1)
- Topic: Exchange LWin and LAlt
- Replies: 0
- Views: 825
Exchange LWin and LAlt
This is my code. #InputLevel 1 LAlt::LWin LWin::LAlt #InputLevel 2 !a:: #a:: tooltip You pressed %A_ThisHotkey%. return From my understanding, InputLevel 2 is executed first, then InputLevel 1, which means if I press LAlt key and a key, screen will show I pressed !a, if I press LWin key and a key, s...
- 27 Jul 2014, 15:04
- Forum: 请求帮助
- Topic: 【已解决】if语句的疑问
- Replies: 1
- Views: 2958
【已解决】if语句的疑问
如果我写
则pause不会被执行。
如果我写
则pause会被执行。两者结果不同。
既然我已经定义v=false了,那么if(v)应该等价于if(false)。autohotkey为什么会这样呢?
Code: Select all
if(false)
{
pause
}
如果我写
Code: Select all
v=false
if(v)
{
pause
}
既然我已经定义v=false了,那么if(v)应该等价于if(false)。autohotkey为什么会这样呢?