Search found 17 matches
- 28 May 2024, 09:57
- Forum: Ask for Help (v2)
- Topic: Is there a way to read the value of a certain system setting in Win10? Topic is solved
- Replies: 2
- Views: 202
Re: Is there a way to read the value of a certain system setting in Win10? Topic is solved
teadrinker Thank you for your answer! In addition, I spend a few days searching search engines for answers before I ask questions, but I am always disturbed by irrelevant content, and maybe the keywords are not used correctly. I feel like ChatGPT is always a bit silly, I don't know if it's the reas...
- 28 May 2024, 09:40
- Forum: Ask for Help (v2)
- Topic: The keyboard layout set by the SendMessage 0x50 message on Explorer is not persistent
- Replies: 0
- Views: 109
The keyboard layout set by the SendMessage 0x50 message on Explorer is not persistent
I consulted this issue on Microsoft’s Q&A platform a few days ago. Their staff said that they couldn’t reproduce the problem in C++ and believed that I was asking an XY question. However, my C++ skills are very poor, and my knowledge of programming is limited to game development scripts. I really do...
- 28 May 2024, 04:47
- Forum: Ask for Help (v2)
- Topic: Is there a way to read the value of a certain system setting in Win10? Topic is solved
- Replies: 2
- Views: 202
Is there a way to read the value of a certain system setting in Win10? Topic is solved
For example, if I want to read/set `Let me use a different input method for each app window` in `Language`, what kind of API should I use?
If we are using the registry, how to know where a setting is in the registry?
If we are using the registry, how to know where a setting is in the registry?
- 22 May 2024, 15:55
- Forum: Ask for Help (v2)
- Topic: How to modify the text in the GUI?
- Replies: 3
- Views: 237
Re: How to modify the text in the GUI?
boiler There seems to be a problem with writing this way, the initial string of myGui.Add determines the range of the text, if the initial text is very short, such as an empty string, and the rest of the code remains the same, Pressing ctrl will only show a "N". #Requires AutoHotkey v2.0 myGui := G...
- 22 May 2024, 15:16
- Forum: Ask for Help (v2)
- Topic: How to modify the text in the GUI?
- Replies: 3
- Views: 237
How to modify the text in the GUI?
I tried using Gui.Destroy() and then creating a new Gui, but even if I destroy it and create a new window immediately, then show it right away, there is often a brief flicker. Is there any API that allows modifying the text without destroying the window? Here's my code of gui: Shift:: { static myGui...
- 22 May 2024, 07:12
- Forum: Ask for Help (v2)
- Topic: How to modify the position of the GuiControl after Gui.Add? Topic is solved
- Replies: 2
- Views: 176
Re: How to modify the position of the GuiControl after Gui.Add? Topic is solved
@niCode
Thank you! It works!
Thank you! It works!
- 22 May 2024, 04:15
- Forum: Ask for Help (v2)
- Topic: How to modify the position of the GuiControl after Gui.Add? Topic is solved
- Replies: 2
- Views: 176
How to modify the position of the GuiControl after Gui.Add? Topic is solved
First, let me explain my goal: I want to display a small window with text centered on it, regardless of the specified text size. The window's size should remain fixed, even if the text cannot fit entirely. Adding +Center option in Gui.Add doesn't achieve this because it doesn't adjust the text posit...
- 17 May 2024, 10:29
- Forum: Ask for Help (v2)
- Topic: Does the triggering of CapsLock's hotkey be faster than the change of the CapsLock state itself?
- Replies: 2
- Views: 186
Re: Does the triggering of CapsLock's hotkey be faster than the change of the CapsLock state itself?
@ Noitalommi_2
Oh, it looks like the problem might be with my keyboard.
Thank you for your answer!
Oh, it looks like the problem might be with my keyboard.
Thank you for your answer!
- 17 May 2024, 09:30
- Forum: Ask for Help (v2)
- Topic: Does the triggering of CapsLock's hotkey be faster than the change of the CapsLock state itself?
- Replies: 2
- Views: 186
Does the triggering of CapsLock's hotkey be faster than the change of the CapsLock state itself?
I currently have a requirement to record the CapsLock state for each process so that when I switch back, it can automatically restore. So, I want to implement a feature to record the CapsLock state when CapsLock is pressed. I tested it with the following code: ~CapsLock:: { ToolTip(GetKeyState("Caps...
- 09 May 2024, 15:15
- Forum: Ask for Help (v2)
- Topic: How do you check for extra keys when LShift is set as the hotkey?
- Replies: 7
- Views: 340
Re: How do you check for extra keys when LShift is set as the hotkey?
mikeyww I need the ~LShift Up hotkey. What I mean is that I want to remain inactive during the timeout period, but react when it's not timed out and the Up key is pressed. After much research, I've figured out how to implement it, and here's what I've written so far. Do you have any suggestions for...
- 09 May 2024, 09:29
- Forum: Ask for Help (v2)
- Topic: Is there a way to identify if Photoshop is in text editing mode?
- Replies: 0
- Views: 110
Is there a way to identify if Photoshop is in text editing mode?
I have tried using the code: control := ControlGetFocus("A") controlName := ControlGetClassNN(control) MsgBox(controlName) In the UI input field, I can recognize Control as EditX (where X is a number). However, if I use the Text tool on the canvas, Control displays as PSViewC34 , which is the same a...
- 22 Apr 2024, 12:38
- Forum: 请求帮助
- Topic: 是否有办法切换同一个键盘布局(如简体中文)下的不同输入法?
- Replies: 1
- Views: 416
是否有办法切换同一个键盘布局(如简体中文)下的不同输入法?
我知道0x50的Message可以切换KBL
但是这样只能切换到那个键盘布局的默认IME,如果我想通过ahk切换五笔和拼音,应该用什么API来切换呢?
(除了映射到原本的快捷键这种方法)
Code: Select all
SendMessage(0x50, , kblCode, , imeWinId, , , , 1000)
(除了映射到原本的快捷键这种方法)
- 22 Apr 2024, 12:27
- Forum: Ask for Help (v2)
- Topic: Is there any way to switch IMEs in one KeyboardLayout?
- Replies: 2
- Views: 166
Is there any way to switch IMEs in one KeyboardLayout?
This code is known to toggle KeyboardLayout: SendMessage(0x50, , kblCode, , imeWinId, , , , 1000) It can switch the IME between English, Chinese, Japnese, and so on. But It can't specify which specific IME to use for the switching KeyboardLayout. In Chinese, there are often many different IMEs that ...
- 16 Apr 2024, 13:06
- Forum: Ask for Help (v2)
- Topic: How do you check for extra keys when LShift is set as the hotkey?
- Replies: 7
- Views: 340
Re: How do you check for extra keys when LShift is set as the hotkey?
mikeyww Sorry, I was confused by some of the problems with this somewhat difficult api, so I didn't notice that InputHook can solve the problem of extra keys. But I still don't know the correct usage of InputHook: I tweaked the If statement in your code to call MsgBox when it's not Timeout, but it ...
- 16 Apr 2024, 08:48
- Forum: 请求帮助
- Topic: 如何避免多余的按键被按下时的热键触发? Topic is solved
- Replies: 1
- Views: 314
如何避免多余的按键被按下时的热键触发? Topic is solved
这是我的最短代码,
结果当我按下 Ctrl+Shift+A 的时候,也会触发该热键,请问如何防止这类事情发生?
除了一个一个按键去 CheckKeyState ,每次都遍历100多个键位的话那效率也太低下了。
请问有什么办法能够限定,有且仅有指定按键触发时才执行呢?
Code: Select all
~Shift & A:: {
MsgBox("Pressed.")
}
除了一个一个按键去 CheckKeyState ,每次都遍历100多个键位的话那效率也太低下了。
请问有什么办法能够限定,有且仅有指定按键触发时才执行呢?
- 16 Apr 2024, 08:39
- Forum: Ask for Help (v2)
- Topic: How do you check for extra keys when LShift is set as the hotkey?
- Replies: 7
- Views: 340
Re: How do you check for extra keys when LShift is set as the hotkey?
mikeyww Oh, I wrote the KeyWait parameter wrong, now I changed it to KeyWait("Shift") without timeout. Also, thanks for telling me about A_PriorKey, which made my code work as expected. But then I suddenly realized a little thing: That is, A_PriorKey only returns A single key, and if I extend this ...
- 16 Apr 2024, 07:51
- Forum: Ask for Help (v2)
- Topic: How do you check for extra keys when LShift is set as the hotkey?
- Replies: 7
- Views: 340
How do you check for extra keys when LShift is set as the hotkey?
Here is my minimul code: ~Shift:: { pressTick := A_TickCount KeyWait("Shift", 300) if (A_TickCount - pressTick >= 300) return MsgBox("Shift key pressed") } The result I expected was that the function was triggered when only a short Shift press was pressed, and not if an extra key was pressed. For ex...