Using ahk_class and ClassNN for pasting text

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
ymnaren
Posts: 26
Joined: 24 Oct 2022, 07:03
Location: Oslo

Using ahk_class and ClassNN for pasting text

Post by ymnaren » 10 May 2024, 03:35

There is an ahk_class TfmSubtitleWriterMain which has two ClassNN I want to use, TInnslag and TSubitle.

Today (if done manually) I can use the shortcut ctrl+enter to create new TInnslag, then tab (to get to TSubtitle), and then ctrl+enter for creating TSubitle1, 2, 3 etc.

What I dont understand is how I can use these two classes to perform a paste of text where I want it.

I have solved this by writing a script that simulates pressing all the shortcuts but I am thinking it is a lot faster if I can use the classes directly?

Or I am thinking wrong about this?
User avatar
boiler
Posts: 17310
Joined: 21 Dec 2014, 02:44

Re: Using ahk_class and ClassNN for pasting text

Post by boiler » 10 May 2024, 05:57

See ControlSetText. If you don’t want to replace the entire text of the control but rather just add or insert text to the existing text in the control at the text entry position, see ControlSend.
Post Reply

Return to “Ask for Help (v1)”