Help? Control,EditPaste, text ,,Valheim ahk_class UnityWndClass

Ask gaming related questions (AHK v1.1 and older)
User avatar
ThumpieBunnyEve
Posts: 109
Joined: 03 Aug 2016, 19:03

Help? Control,EditPaste, text ,,Valheim ahk_class UnityWndClass

05 Aug 2021, 12:53

Control, EditPaste,% "resetskill " RegExReplace(s, "^(\w*).*", "$1"),,Untitled - Notepad ahk_class Notepad
pastes text bypassing the clipboard, into notepad, just fine.

but im trying to pass text into the console in Valheim, a Unity game, and i tried these:

Code: Select all

s=Blocking 44
Control, EditPaste,% "resetskill " RegExReplace(s, "^(\w*).*", "$1"),,Valheim ahk_class UnityWndClass
Control, EditPaste,% "resetskill " RegExReplace(s, "^(\w*).*", "$1"),,Valheim
Control, EditPaste,% "resetskill " RegExReplace(s, "^(\w*).*", "$1"),,ahk_class UnityWndClass
send,{enter}
but all that happens is nothing. it does not paste when console is up.

I then tried

Code: Select all

clipboard:="resetskill " RegExReplace(s, "^(\w*).*", "$1")
send,^v{enter}
and that works fine. But I've 2 different programs that make noise when the MS clipboard contents change and the above is in a loop for some 18 skills so it makes a lot of noise. and i really don't want to use the clipboard or risk silliness during an alt-tab. can some one help me with the
CONTROL, EDITPASTE, text,,Wintitle&Class stuff so it works with Valheim console window?


EDIT: I've also tried

Code: Select all

winActivate, Valheim ahk_class UnityWndClass
WinGetActiveTitle, ValheimTitle
Control, EditPaste,% "TESTING!",,%ValheimTitle%
send,{enter}

and still no luck. I really want to start relying on the speed of {Control, EditPaste,,,} but it is such a pain to get working and nearly never works for the applications i need it to. Please some one help?

---Still trying Edit:-----

Code: Select all

winActivate, Valheim ahk_class UnityWndClass
WinGetActiveTitle, ValheimTitle
WinGet,ValheimID,ID
Control, EditPaste,% "TEST!",,ahk_id %ValheimID%
send,{enter}
This Still doesn't work!
Other then Send which types it out slowly, is there no way to get EditPaste to output the text in? Is bloaty busy MS Clipboard the ONLY way?
swagfag
Posts: 6222
Joined: 11 Jan 2017, 17:59

Re: Help? Control,EditPaste, text ,,Valheim ahk_class UnityWndClass

05 Aug 2021, 16:30

ure trying to use a function designed to operate on a very specific win32 control(Edit) on something that is the further thing from one(a game) and ure finding out it isnt doing anything. what a shocker :facepalm:

if it isnt working, it isnt working. theres no making it work. use something else. ControlSend keystrokes(which also isnt guaranteed to work for the exact same reasons!!) or Send<whatever mode uve chosen>(adjusting any delays as needed/desired) the text as keystrokes into the active window
User avatar
ThumpieBunnyEve
Posts: 109
Joined: 03 Aug 2016, 19:03

Re: Help? Control,EditPaste, text ,,Valheim ahk_class UnityWndClass

06 Aug 2021, 01:34

nah, I've already used send like i said its slow. and controlsend is too.

as above: """""""""""""
I then tried

Code: Select all

clipboard:="resetskill " RegExReplace(s, "^(\w*).*", "$1")
send,^v{enter}
and that works fine.
""""""""""""""
its just slower due to other programs monitoring/acting on it for changes.

Ill have to stick with it though, as the only option for the highest speed.
That Edit buffer was a hopeful alternative,
and sped through things lots faster then even managing the MS Clipboard.
its too bad its not more useful universally. ⋆Sigh⋆

Return to “Gaming Help (v1)”

Who is online

Users browsing this forum: No registered users and 135 guests