Search found 11 matches

by gqqnbig
10 Feb 2018, 20:49
Forum: AutoHotkey v2 Development
Topic: Invalid return type for DllCall Topic is solved
Replies: 5
Views: 515

Re: Invalid return type for DllCall Topic is solved

guest3456 wrote:its also weird how the string is getting interpreted as "Close111Handle"
oh, LOL, I was just testing the code
by gqqnbig
10 Feb 2018, 01:55
Forum: AutoHotkey v2 Development
Topic: Invalid return type for DllCall Topic is solved
Replies: 5
Views: 515

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...
by gqqnbig
30 Jan 2018, 03:30
Forum: Ask For Help
Topic: How to check if active window runs as admin? Topic is solved
Replies: 4
Views: 520

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(...
by gqqnbig
27 Jan 2018, 11:43
Forum: Ask For Help
Topic: How to switch to the File Explorer Window that's opened to a specific folder path? Topic is solved
Replies: 8
Views: 493

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 := "...
by gqqnbig
27 Jan 2018, 04:15
Forum: Ask For Help
Topic: How to switch to the File Explorer Window that's opened to a specific folder path? Topic is solved
Replies: 8
Views: 493

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...
by gqqnbig
27 Jan 2018, 03:18
Forum: 请求帮助
Topic: 如何用快捷键快速粘贴一个图片
Replies: 1
Views: 843

Re: 如何用快捷键快速粘贴一个图片

这要看你在哪里写邮件。如果是Outlook之类的,应该有插入图片快捷键,AutoHotKey可以发送这个快捷键,然后贴上图片地址,然后自动按回车。

或者可以把图片放入剪贴板,我觉得这个方法比较好,也比较稳定,但AutoHotkey好像不支持设置ClipboardAll。我知道C#可以把文件对象或其他非文本数据放进剪贴板。所以你如果想用AutoHotKey实现的话,搜索一下看看能不能用COM或DLL调用设置剪贴板。
by gqqnbig
27 Jan 2018, 03:07
Forum: Ask For Help
Topic: How to check if active window runs as admin? Topic is solved
Replies: 4
Views: 520

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?
by gqqnbig
21 Jul 2015, 22:42
Forum: Ask For Help
Topic: ^* doesn't capture ctrl+a, ctrl+b, etc.
Replies: 3
Views: 529

^* doesn't capture ctrl+a, ctrl+b, etc.

Code: Select all

^*::
msgbox hello
return
This code doesn't work at all. I expect that if I press ctrl+a, the message box will show, but it doesn't.

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?
by gqqnbig
21 Jul 2015, 02:21
Forum: Ask For Help
Topic: Exchange LWin and LAlt
Replies: 0
Views: 439

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...
by gqqnbig
27 Jul 2014, 15:04
Forum: 请求帮助
Topic: 【已解决】if语句的疑问
Replies: 1
Views: 1390

【已解决】if语句的疑问

如果我写

Code: Select all

if(false)
{
    pause
}
则pause不会被执行。

如果我写

Code: Select all

v=false
if(v)
{
    pause
}
则pause会被执行。两者结果不同。

既然我已经定义v=false了,那么if(v)应该等价于if(false)。autohotkey为什么会这样呢?

Go to advanced search