Red Code Posted July 11, 2006 Share Posted July 11, 2006 When I am in a web site screen, I can send ("{TAB}") s to navigate about the screen. The mouse position stays unchanged. But there is a vertical bar symbol indicting where the current input or selectable field is that I have tabbed to, the one that will be used in the next send(...) command. But I can not find any function that will tell me where that position on the screen is. I thought it would be the get caret function, but that does not do it. Nor is there a function to move the mouse pointer to that position. Is there a function I have not noticed in there somewhere? I am using Mozilla Firefox. Each {TAB} operation updates the Status Bar, but I can't find a way to read that, either.... Help? Link to comment Share on other sites More sharing options...
jvanegmond Posted July 11, 2006 Share Posted July 11, 2006 You should actually better be working with Internet Explorer than Mozilla. This makes things a lot easier. Furthermore, i have no idea what you are talking about. github.com/jvanegmond Link to comment Share on other sites More sharing options...
/dev/null Posted July 11, 2006 Share Posted July 11, 2006 (edited) why does WinGetCaretPos() not work for you? See example in help file. Cheers Kurt Edited July 11, 2006 by /dev/null __________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf * Link to comment Share on other sites More sharing options...
Red Code Posted July 12, 2006 Author Share Posted July 12, 2006 why does WinGetCaretPos() not work for you? See example in help file. Cheers Kurt Here is an example. Using this thread as an example, if you keep hitting the TAB key, you will see a series of clickable items highlighted, from "My Controls" to "View New Posts" to "My Assistant" etc If I send {TAB} at this screen, it will jump from one field to the next. But I want to read back from the screen which field it is sitting on. That is NOT the same as the Caret. By clicking within the text box, I can position the caret there. In IE, the code will detect and report the location of that caret. (It works for me in IE, but fails in Mozilla Firefox. So I have two questions - 1, How do I know where I have tabbed to on the screen 2. Why does caret detection work in IE but not Firefox? To illustrate, here is sample code. It will continue running until you cancel it from the icon. It uses this thread as a test. Press the tab key and observe the results, both in IE and in Firefox Opt("CaretCoordMode", 0) ;relative mode WinWait("Locating", "", 30) ; this thread WinActivate("Locating") WHILE 1 $c = WinGetCaretPos() If IsArray($c) then MsgBox(0, "Caret Position", $c[0] & "-" & $c[1], 2) sleep(3000) EndIf WEND In Firefox I get 4 - 26 at all times. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now