Search found 56 matches

by williams
21 Apr 2024, 08:56
Forum: Ask for Help (v2)
Topic: How can I detect when a suspended process comes to the foreground?
Replies: 6
Views: 186

Re: How can I detect when a suspended process comes to the foreground?

It sounds like you already have a script that you are using to suspend a process. I recommend posting your script so that forum readers can examine and test it. One approach could simply be using your script to activate the window. You can then resume it at that time. Thank you very much, but I hop...
by williams
21 Apr 2024, 07:30
Forum: Ask for Help (v2)
Topic: How can I detect when a suspended process comes to the foreground?
Replies: 6
Views: 186

Re: How can I detect when a suspended process comes to the foreground?

mikeyww wrote:
21 Apr 2024, 07:12
Hello,

This may help.

https://www.autohotkey.com/search/?q=suspend+process
Thank you, I searched on google and the forum before posting.
by williams
21 Apr 2024, 06:54
Forum: Ask for Help (v2)
Topic: How can I detect when a suspended process comes to the foreground?
Replies: 6
Views: 186

How can I detect when a suspended process comes to the foreground?

I want to write a script that automatically suspends a process when its window goes into the background, and resumes the process when the window comes back to the foreground. The problem is, when the suspended window is switched back to the foreground, its title, ahk_clash, ahk_exe, and ahk_pid all ...
by williams
16 Oct 2023, 04:55
Forum: Ask for Help (v2)
Topic: `reload` cannot prevent the next code from executing Topic is solved
Replies: 1
Views: 601

`reload` cannot prevent the next code from executing Topic is solved

[Moderator's note: Topic moved from Bug Reports.]

Code: Select all

#requires AutoHotkey >=v2.0-

reload
FileAppend A_Now, "test.log"
Test.log is generated and continuously written to
by williams
01 Oct 2023, 04:53
Forum: Ask for Help (v2)
Topic: Please help me understand the behavior of this script
Replies: 1
Views: 261

Please help me understand the behavior of this script

#Requires AutoHotkey >=v2.0- settimer func1, -1 settimer func2, -1 func1(){ MsgBox "func1" } func2(){ MsgBox "func2" sleep 2000 } The behavior of this script is to first pop up MsgBox "func2" . After manually closing MsgBox "func2" , it waits for two seconds and then pops up MsgBox "func1" . Is thi...
by williams
30 Aug 2023, 03:01
Forum: Ask for Help (v2)
Topic: Ran into some compatibility issues between FileAppend stdout and PowerShell Topic is solved
Replies: 5
Views: 647

Re: Ran into some compatibility issues between FileAppend stdout and PowerShell Topic is solved

UX scripts = all scripts pre-installed in the UX directory. Non-UX scripts = everything else. It really doesn't matter what "UX" stands for, but yes, UX refers to User Experience . Thank you for your explanation, I have compiled a script to do this specifically ; AutoHotkey64Console.exe #Requires A...
by williams
30 Aug 2023, 01:17
Forum: Ask for Help (v2)
Topic: Ran into some compatibility issues between FileAppend stdout and PowerShell Topic is solved
Replies: 5
Views: 647

Re: Ran into some compatibility issues between FileAppend stdout and PowerShell Topic is solved

I'm fairly certain this is because you are piping it through more , which is decoding the output according to the wrong codepage, and then printing Unicode. ;@Ahk2Exe-ConsoleApp sets the exe to be a console app. If you copy AutoHotkey64.exe and do the same to it (manually or using some other softwa...
by williams
29 Aug 2023, 09:17
Forum: Ask for Help (v2)
Topic: Ran into some compatibility issues between FileAppend stdout and PowerShell Topic is solved
Replies: 5
Views: 647

Re: Ran into some compatibility issues with FileAppend stdout and PowerShell Topic is solved

test.ahk with Powrshell 5
5ahk.gif
5ahk.gif (35.69 KiB) Viewed 644 times






test1.ahk and test1.exe with Powrshell 7
7test1.png
7test1.png (216.42 KiB) Viewed 644 times





test1.ahk and test1.exe with Powrshell 5
5test1.png
5test1.png (24.22 KiB) Viewed 644 times
by williams
29 Aug 2023, 09:15
Forum: Ask for Help (v2)
Topic: Ran into some compatibility issues between FileAppend stdout and PowerShell Topic is solved
Replies: 5
Views: 647

Ran into some compatibility issues between FileAppend stdout and PowerShell Topic is solved

After being compiled into an exe, it works fine in both PowerShell 5 and PowerShell 7. But when it is not compiled, the output content cannot be collapsed. Additionally it will not be output asynchronously in PowerShell 5, and the Chinese characters are garbled in PowerShell 7. Could you please prov...
by williams
28 Aug 2023, 14:04
Forum: Ask for Help (v2)
Topic: What is the best way to call nested functions outside of the outer function? Topic is solved
Replies: 1
Views: 262

What is the best way to call nested functions outside of the outer function? Topic is solved

Since the nested function serves as a callback, it will be called externally. However, CallbackFunc() merely serves as an auxiliary to Func2() within Func1(), so I would prefer it to be a local inner function. Do you have any suggestions? Thank you in advance Func1(){ Func2("CallbackFunc") CallbackF...
by williams
28 Aug 2023, 13:19
Forum: Ask for Help (v2)
Topic: Assume-global mode reports an error when string concatenation is included in the optional argument Topic is solved
Replies: 3
Views: 413

Assume-global mode reports an error when string concatenation is included in the optional argument Topic is solved

Code: Select all

#Requires AutoHotkey >=v2.0-

Fc()
Fc(pm:="sta" "stb"){
    global              ; error
    var:=1   
    MsgBox pm
    return
}
1.png
1.png (19.19 KiB) Viewed 413 times
by williams
24 Aug 2023, 00:15
Forum: Ask for Help (v2)
Topic: What is the best practice for obtaining administrator privileges without a UAC prompt? Topic is solved
Replies: 1
Views: 237

What is the best practice for obtaining administrator privileges without a UAC prompt? Topic is solved

I noticed that RunAsTask() doesn't seem to be able to pass parameters. From my understanding, it seems like I need to write a permanently running script with administrator rights that monitors a directory of files. When other scripts require administrator privileges, a file containing its own startu...
by williams
02 Jan 2023, 10:13
Forum: Ask for Help (v1)
Topic: How to creating key combinations using AutoHotInterception? Topic is solved
Replies: 4
Views: 1222

Re: How to creating key combinations using AutoHotInterception? Topic is solved

u wanted an example, u got an example. any additional behaviors, conditions and whathaveu need to be encoded as needed. the code is urs to modify. there is no concept of "at the same time" when input is concerned. one event necessarily must come before another. the program cannot foresee the future...
by williams
02 Jan 2023, 09:44
Forum: Ask for Help (v1)
Topic: How to creating key combinations using AutoHotInterception? Topic is solved
Replies: 4
Views: 1222

Re: How to creating key combinations using AutoHotInterception? Topic is solved

Thanks for your help, it works But two more problems are causing some confusion :oops: 1. This hotkey will block 1 and 2 completely, can I press 1 or 2 alone without blocking them, and block them only after pressing them at the same time? (tried it myself but failed) 2. Why does it not work when I ...
by williams
02 Jan 2023, 08:14
Forum: Ask for Help (v1)
Topic: How to creating key combinations using AutoHotInterception? Topic is solved
Replies: 4
Views: 1222

How to creating key combinations using AutoHotInterception? Topic is solved

Hello, could you give me an example of creating a key combination using Subscription Mode?
I've read the documentation, but I still feel like I have nowhere to start

Context Mode is very convenient and easy to use but there seems to be some bugs
Thanks for your attention to this matter
by williams
01 Jan 2023, 07:05
Forum: Scripts and Functions (v1)
Topic: AutoHotInterception (AHI): Multi-Keyboard / Multi-Mouse support for AHK. Per-device blocking!
Replies: 345
Views: 203996

Re: AutoHotInterception (AHI): Multi-Keyboard / Multi-Mouse support for AHK. Per-device blocking!

evilC wrote:
08 Oct 2019, 09:23
No, you would need to manually handle that yourself
Hello, could you give an example of creating a key combination using Subscription mode?
Thanks for your help
by williams
23 Nov 2022, 13:42
Forum: 请求帮助
Topic: 如何获取当前窗口的进程路径,并打开所属文件夹 Topic is solved
Replies: 2
Views: 1219

Re: 如何获取当前窗口的进程路径,并打开所属文件夹 Topic is solved

swagfag wrote:
23 Nov 2022, 09:31
stolen from v2
````
[/code]
这个比相比 winget 有什么优点吗?


回楼主

Code: Select all

#F1::
WinGet, OutputVar, ProcessPath, A
MsgBox, %OutputVar%
Return
by williams
23 Nov 2022, 13:17
Forum: Ask for Help (v1)
Topic: How to get cpu turbo ratio limits? Topic is solved
Replies: 4
Views: 562

Re: How to get cpu turbo ratio limits? Topic is solved

mikeyww wrote:
23 Nov 2022, 13:15
I believe that is correct. You can always rename afterwards.
Thanks for your help :thumbup:
by williams
23 Nov 2022, 13:10
Forum: Ask for Help (v1)
Topic: How to get cpu turbo ratio limits? Topic is solved
Replies: 4
Views: 562

Re: How to get cpu turbo ratio limits? Topic is solved

app = d:\utils\CPUz\cpuz_x64.exe ; https://www.cpuid.com/softwares/cpu-z.html out = %A_ScriptDir%\cpu ; .txt file for output ToolTip, Working RunWait, "%app%" -txt=%out% ToolTip FileRead, text, %out%.txt RegExMatch(text, "Max turbo ratio.+", mtr) RegExMatch(text, "Ratio 3 cores.+" , r3c) MsgBox, 64...
by williams
23 Nov 2022, 03:01
Forum: Ask for Help (v1)
Topic: How to get cpu turbo ratio limits? Topic is solved
Replies: 4
Views: 562

How to get cpu turbo ratio limits? Topic is solved

Are there any tools or libs that can do? Searched for a while but no results
Thank you everybody
2022-11-23_154242.png
2022-11-23_154242.png (237.71 KiB) Viewed 371 times

Go to advanced search