I'm new to coding. (installed AHK yesterday, still learning)
I want to write a script to automatically select the subtitle by the name I want
In fact, I've already written one, which is worked by imageSearch and Click, but it's not flexible enough
How can i make it more flexible?
Automatically select the subtitle [potplayer]
Automatically select the subtitle [potplayer]
- Attachments
-
- related information
- 2022-09-26_133543.jpg (631.16 KiB) Viewed 651 times
Re: Automatically select the subtitle [potplayer]
Welcome to this AutoHotkey forum!
I did not try it, but you could try Control, ChooseString.
https://www.autohotkey.com/docs/commands/Control.htm#ChooseString
I did not try it, but you could try Control, ChooseString.
https://www.autohotkey.com/docs/commands/Control.htm#ChooseString
Re: Automatically select the subtitle [potplayer]
thank you for your help!mikeyww wrote: ↑26 Sep 2022, 05:52Welcome to this AutoHotkey forum!
I did not try it, but you could try Control, ChooseString.
https://www.autohotkey.com/docs/commands/Control.htm#ChooseString
now the problem is that I can't get any information from the control(Afx:00007FFEE7E600000000000000010003:0000000000900011:00000000000000001)
Code: Select all
#IfWinActive ahk_class PotPlayer64
ControlGet, Items, List,, Afx:00007FFEE7E60000:b:0000000000010003:0000000000900011:00000000000000001
Loop, Parse, Items, `n
MsgBox Item number %A_Index% is %A_LoopField%.
Re: Automatically select the subtitle [potplayer]
I do not have a way to test, but if Window Spy shows the control, then it should work. What does Window Spy show as ClassNN?
Re: Automatically select the subtitle [potplayer]
it showed like this
Code: Select all
ClassNN:Afx:00007FFEE7E60000:b:0000000000010003:0000000000900011:00000000000000001
Re: Automatically select the subtitle [potplayer]
Is this part of a hotkey routine? What is the larger script?
Your posted code contains a bug: #If is used only for hotkeys & hotstrings. See documentation. #If is not If.
Without a WinTitle for ControlGet, AHK will use the last found window. In your posted code, this might be the wrong window.
Your posted code contains a bug: #If is used only for hotkeys & hotstrings. See documentation. #If is not If.
Without a WinTitle for ControlGet, AHK will use the last found window. In your posted code, this might be the wrong window.
Re: Automatically select the subtitle [potplayer]
Thank you so much!I think I should read the documentation firstmikeyww wrote: ↑27 Sep 2022, 06:24Is this part of a hotkey routine? What is the larger script?
Your posted code contains a bug: #If is used only for hotkeys & hotstrings. See documentation. #If is not If.
Without a WinTitle for ControlGet, AHK will use the last found window. In your posted code, this might be the wrong window.