Click & input on Screen Desktop
-
Hi.
Can I follow the attached picture?
I want to click on my desktop screen and enter some input values.
I have little skill make and zaper skills.
But I don't know if triggercmd has this function or not.
Or do you have any other suggestions?
Thank a lot. -
@pongsatonn-siripet, for that, I would write an AutoIT script that clicks specific coordinates on that program window, then types your input values.
When you install AutoIt, it will come with this "AutoIt Window Info" tool. If you drag the little Finder Tool to a spot on your program window, it will give you coordinates. You can write a script that clicks those coordinates, then types something. I set the AutoIt Window Info Coord Mode to Window so the coordinates it's giving me are relative to the upper left cornder of the window. The windows screenshot tool removed it but I've got that finder tool target dragged to the upper-left of my calculator window, that's why you see low numbers for the "ControlClick Coords" are 2,7 and Mouse Position is 10,8. If the target was further down and to the right, those numbers would be higher. Anyway, you can give those as your inputs to the script to pick a place for your AutoIt script to "click" before typing your input values. Good luck. I recommend trying the built-in AI Script Assistant if you're subscribed, or you could use ChatGPT to write the script.
I got this output from ChatGPT with this prompt:
autoit script to click a coordinate on a specific window, and type something.
; Specify the title of the window you want to target Local $windowTitle = "Your Window Title" ; Activate the window If Not WinActivate($windowTitle) Then MsgBox(0, "Error", "Window not found!") Exit EndIf ; Wait for the window to be active WinWaitActive($windowTitle) ; Specify the coordinates where you want to click (relative to the window) Local $x = 100 ; X coordinate Local $y = 200 ; Y coordinate ; Click the specified coordinates MouseClick("left", $x, $y) ; Sleep for a short duration to ensure the click is registered Sleep(100) ; Type the text you want Send("Hello, this is a test!") ; Optionally, you can send an ENTER key or other keys ; Send("{ENTER}")
One cool thing about AutoIt is it can produce a Windows .exe. Then you can run the .exe as a TRIGGERcmd command.
-
@Russ
I'll try doing what you suggested.
I will update it later.
Thank a lots.