Search found 35 matches
- 22 Apr 2024, 04:33
- Forum: Gaming
- Topic: How to send ControlClick to game window ragardless its active state?
- Replies: 0
- Views: 233
How to send ControlClick to game window ragardless its active state?
I want to send mouse click (and keyboard key later) to a game, even though the game window is not active. #Requires AutoHotkey v2.0 #SingleInstance Force InstallKeybdHook(True, True) InstallMouseHook(True, True) DetectHiddenWindows(True) target_hwnd := 0 target_title := "Granblue Fantasy: Relink" ta...
- 01 Feb 2024, 02:46
- Forum: Wish List
- Topic: Dark theme / Windows themed AHK
- Replies: 32
- Views: 16684
Re: Dark theme / Windows themed AHK
I also wish AHK supports Windows' dark theme 'natively', but I think it must be almost impossible. Even .NET WinForms, which would be first-party to MS, doesn't support dark theme nativly. They have opened issue for tracking it though. Basically, those dark theme things are not well documented. All ...
- 24 Jan 2024, 06:05
- Forum: Ask for Help (v2)
- Topic: How to get handle of RCDATA in compiled script?
- Replies: 1
- Views: 160
How to get handle of RCDATA in compiled script?
I want to get handle of image as RCDATA in compiled script. GetRDHandle(Key) { ; Code generated with ChatGPT because I couldn't get good result with Google search, and this doesn't work :( If (!A_IsCompiled) { return 0 } hModule := DllCall("GetModuleHandle", "Str", A_ScriptName, "Ptr") hResource := ...
- 04 Nov 2023, 07:25
- Forum: Ask for Help (v2)
- Topic: Why tray menu can't recognize keyboard key when first opened? Topic is solved
- Replies: 20
- Views: 1179
Re: Why tray menu can't recognize keyboard key when first opened? Topic is solved
PS. I use Windows 10 Enterprise LTSC 64-bit version 10.0.17763.4499 OS difference can be the reason of why two of us are having different experience. I use Windows 11 23H2 (22631.2506). I also get same tray menu. If invoked by RMB, there is no underline at all. But if invoked by hotkey, it shows un...
- 04 Nov 2023, 07:07
- Forum: Ask for Help (v2)
- Topic: Why tray menu can't recognize keyboard key when first opened? Topic is solved
- Replies: 20
- Views: 1179
Re: Why tray menu can't recognize keyboard key when first opened? Topic is solved
You are very much mistaken. Many things may affect the normal operations of Windows shells. If then, I'll just have to wait for reply from others in bug report. There is nothing I can do about that. I will try to use v2.1 alpha for a while. I'm not sure, but maybe using alpha version might help. Th...
- 04 Nov 2023, 06:52
- Forum: Ask for Help (v2)
- Topic: Why tray menu can't recognize keyboard key when first opened? Topic is solved
- Replies: 20
- Views: 1179
Re: Why tray menu can't recognize keyboard key when first opened? Topic is solved
It is your Windows shell fault. I don't think it is. I ran these three commands. sfc /scannow dism /online /cleaup-image /scanhealth dism /online /cleaup-image /checkhealth All three check/repair passed without any problem reported. Since you mentioned 'Windows Shell', I even tried to disable Start...
- 04 Nov 2023, 06:37
- Forum: Ask for Help (v2)
- Topic: Why tray menu can't recognize keyboard key when first opened? Topic is solved
- Replies: 20
- Views: 1179
Re: Why tray menu can't recognize keyboard key when first opened? Topic is solved
Add #F10::MenuTray.Show() and try to press Win-F10 , and then X . For me this still works fine, as expected. Tested with this code #Requires AutoHotkey v2.0 #SingleInstance Force Persistent(True) MenuTray := A_TrayMenu #F10::MenuTray.Show() When pressing Win+F10 , tray menu shows up with hotkey cha...
- 04 Nov 2023, 06:14
- Forum: Ask for Help (v2)
- Topic: Why tray menu can't recognize keyboard key when first opened? Topic is solved
- Replies: 20
- Views: 1179
Re: Why tray menu can't recognize keyboard key when first opened? Topic is solved
@tetratheta Don't rush to publish a bug report. Your code, from the very first example, works as it should. I open the menu via right click, press X, and the script exits. On the first try. This is minimal code for testing. #Requires AutoHotkey v2.0 #SingleInstance Force Persistent(True) At least, ...
- 04 Nov 2023, 06:03
- Forum: Bug Reports
- Topic: [Fixed in v2.0.11] Tray menu doesn't recognize keyboard input when opened first time Topic is solved
- Replies: 0
- Views: 503
[Fixed in v2.0.11] Tray menu doesn't recognize keyboard input when opened first time Topic is solved
For full context, head to https://www.autohotkey.com/boards/viewtopic.php?f=82&t=122843 . AHK v2.0.10 can't recognize keyboard input when its tray menu is opened first time. After closing tray menu and re-open the tray menu, all keyboard input will be handled by AHK correctly. This is my 'full code'...
- 04 Nov 2023, 05:38
- Forum: Ask for Help (v2)
- Topic: Why tray menu can't recognize keyboard key when first opened? Topic is solved
- Replies: 20
- Views: 1179
Re: Why tray menu can't recognize keyboard key when first opened? Topic is solved
Then try comments all .Rename() calls. And then check again. I commented all rename part and edited corresponding default part too. #Requires AutoHotkey v2.0 #SingleInstance Force Persistent(True) A_IconTip := "TEST" ; Tray icon tip MenuTray := A_TrayMenu MenuTray.Delete() ; Reset tray menu MenuTra...
- 04 Nov 2023, 05:32
- Forum: Ask for Help (v2)
- Topic: Why tray menu can't recognize keyboard key when first opened? Topic is solved
- Replies: 20
- Views: 1179
Re: Why tray menu can't recognize keyboard key when first opened? Topic is solved
@tetratheta Try to use menu item full name instead of just number in Line:17 :arrow: MenuTray.Default := "14&" MenuItemName I don't know why, but that doesn't seem to work consistently. #Requires AutoHotkey v2.0 #SingleInstance Force Persistent(True) A_IconTip := "TEST" ; Tray icon tip MenuTray := ...
- 04 Nov 2023, 04:44
- Forum: Ask for Help (v2)
- Topic: Why tray menu can't recognize keyboard key when first opened? Topic is solved
- Replies: 20
- Views: 1179
- 04 Nov 2023, 04:24
- Forum: Ask for Help (v2)
- Topic: Why tray menu can't recognize keyboard key when first opened? Topic is solved
- Replies: 20
- Views: 1179
Why tray menu can't recognize keyboard key when first opened? Topic is solved
I created tray menu with this code: #Requires AutoHotkey v2.0 #SingleInstance Force Persistent(True) A_IconTip := "TEST" ; Tray icon tip ;@Ahk2Exe-IgnoreBegin ;TraySetIcon("icon_normal.ico") ; You can ignore this line. I already have icon_normal.ico file which works well. ;@Ahk2Exe-IgnoreEnd MenuTra...
- 27 Oct 2023, 07:30
- Forum: Ask for Help (v2)
- Topic: How to center text vertically in DropDownList?
- Replies: 0
- Views: 246
How to center text vertically in DropDownList?
Document says that I can adjust row height of DropDownList by using these code: ; CB_SETITEMHEIGHT = 0x0153 PostMessage(0x0153, -1, 50, DDL) ; Set height of selection field. PostMessage(0x0153, 0, 50, DDL) ; Set height of list items. So I tried it within my code. But I found it doesn't center text v...
- 16 Jan 2023, 00:18
- Forum: Ask for Help (v2)
- Topic: Looking for a way to decode URL encoded string in AHK v2 Topic is solved
- Replies: 5
- Views: 1299
Looking for a way to decode URL encoded string in AHK v2 Topic is solved
I'm trying to decode URL encoded string like %E3%83%95%E3%82%A6%E3%82%AB to フウカ , in AHK v2. Many codes that can be found on Google search are for AHK v1 so many of them won't work with AHK v2. Here are some codes I've found (and failed to update them to work with AHK v2 or don't like them): Source:...
- 15 May 2022, 11:57
- Forum: Ask for Help (v1)
- Topic: Icon always changed to 'default' when Suspend/Pause Topic is solved
- Replies: 2
- Views: 478
Re: Icon always changed to 'default' when Suspend/Pause Topic is solved
Thanks, it worked. I had to direct Ahk2Exe to include compiled script only lines for changing icon when compiled. SuspendScript: Suspend, Toggle If (A_IsSuspended) { Menu, Submenu, Rename, Suspend Script`t&S, Resume Script`t&S ;@Ahk2Exe-IgnoreBegin Menu, Tray, Icon, QuickTextInput_Gray.ico,,1 ;@Ahk2...
- 15 May 2022, 09:17
- Forum: Ask for Help (v1)
- Topic: Icon always changed to 'default' when Suspend/Pause Topic is solved
- Replies: 2
- Views: 478
Icon always changed to 'default' when Suspend/Pause Topic is solved
I'm trying to make my script to change its tray icon to certain icon when suspended or paused. So I put corresponding icons to executable with this code: ;@Ahk2Exe-SetMainIcon QuickTextInput.ico ; Default Icon ;@Ahk2Exe-AddResource QuickTextInput_Gray.ico, 160 ; Suspend Icon ;@Ahk2Exe-AddResource Qu...
- 15 May 2022, 05:07
- Forum: Gaming Help (v1)
- Topic: How to stop mouse click down when lost focus of certain window? Topic is solved
- Replies: 4
- Views: 429
Re: How to stop mouse click down when lost focus of certain window? Topic is solved
Here is full code of what I've coded. #If WinExist(game_title) XButton1::GoSub, KeepClickToggle F11::GoSub, KeepClickToggle #If KeepClickToggle: If (toggle_keep_click := !toggle_keep_click) { MouseClick, Left,,,,,D SetTimer, KeepClick, 100 } Else { MouseClick, Left,,,,,U SetTimer, KeepClick, Off } R...
- 15 May 2022, 03:46
- Forum: Gaming Help (v1)
- Topic: How to stop mouse click down when lost focus of certain window? Topic is solved
- Replies: 4
- Views: 429
Re: How to stop mouse click down when lost focus of certain window? Topic is solved
Hallo, try: #InstallMouseHook #If WinExist(game_title) F11::GoSub, KeepClick #If ; ... KeepClickToggle: WinGetTitle, current_window_title, A If (current_window_title != game_title) { IF GetKeyState("LButton") And !GetKeyState("LButton","P") MouseClick,Left,,,,,U Return } KeepClick: If (toggle_keep_...
- 15 May 2022, 01:16
- Forum: Gaming Help (v1)
- Topic: How to stop mouse click down when lost focus of certain window? Topic is solved
- Replies: 4
- Views: 429
How to stop mouse click down when lost focus of certain window? Topic is solved
Slightly related to this question because I'm working on same script. Currently, I have hotkey that toggles 'mouse click hold' like this. (WIP code so this code doesn't work) #If WinExist(game_title) F11::GoSub, KeepClick #If ... KeepClickToggle: WinGetTitle, current_window_title, A If (current_wind...