ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

Removed Areas > AutoHotkey

Clicking in fields

(1/2) > >>

oblivion:
I have an AHK routine that picks up some information and pastes it into an input field on a webpage.

What I'd like to be able to (but can't) is use some sort of keyboard shortcut that put the cursor into said textfield then hit ^v to paste the text. The reason I can't is, apparently, that the developer of the code for the relevant webpage wrote it in dotNet and (he says) there's no way to communicate back out of it to the host PC to set up a keyboard shortcut. So that's that, and all I can do is take advantage of the fact that the field never moves relative to its containing frame, pick an appropriate coordinate and click there.

There's a lot to go wrong with that approach. If IE develops a left-hand bar -- history, for instance -- we'll be clicking in the wrong place.

Can anyone suggest any other possible approaches?

Ath:
You can locate the position of the text label that's usually on the left side of the input, and click a few pixels right of that? AHK or AutoIt can do that for you.

skwire:
If you're using IE, you can use the COM interface available in AHK_L.

oblivion:
You can locate the position of the text label that's usually on the left side of the input, and click a few pixels right of that? AHK or AutoIt can do that for you.
-Ath (October 26, 2012, 01:08 PM)
--- End quote ---

I know what I'm looking for on the screen but I can't work out how to find it. I thought ImageSearch was going to help but that looks more like a brute-force mechanism for finding a graphic I already have in a specified area of the screen. That's not quite what I'm trying to do: I'm trying to say "please give me the coordinates in the active window of xyz bit of text or a graphic called abc.jpg"

Do I have to use, say, FileCopy to copy a nearby graphic from the webpage, then ImageSearch to locate it? That feels clunky but I can't find anything better...?  :huh:

oblivion:
If you're using IE, you can use the COM interface available in AHK_L.
-skwire (October 26, 2012, 01:29 PM)
--- End quote ---
All my "too complicated" lights have come on at once. :D

I'm not a proper programmer, honest!

Navigation

[0] Message Index

[#] Next page

Go to full version