Jump to content

Recommended Posts

Posted

I have a multi-line textbox that I need to interact with. How do I control the control the caret position without using mouse clicks? Part of the reason I can't use mouse clicks is the window I'm interfacing with will be minimized at times, and can't be maximized/restored.

I need to use EditPaste, and possibly GetCurrentLine.

What I really need is the ability to set it based on line number, or to a corresponding string that I search for. Is this possible?

Posted

Using straight AutoIt3 (I'm not familiar with EditPaste and GetCurrentLine) I think you could:

- use ControlGetText to read in the entire string

- then as you suggest, parse it yourself and transform the string

- use ControlSetText to "write" it back out to the control

Posted

Problem there is that the contents of the text box are updated quite rapidly at times. This method could cause new text to be lost.

If I could just say SetCaretPos ("AppName", "", "Class", "Line#") that would be perfect!

Posted

Problem there is that the contents of the text box are updated quite rapidly at times.  This method could cause new text to be lost.

If I could just say SetCaretPos ("AppName", "", "Class", "Line#") that would be perfect!

<{POST_SNAPBACK}>

Try if you can read the position with ControlCommand and GetCurrentLine/Col, calculate the difference to the position you want and then you could ControlSend the cursor movements to position the cursor.
Posted

Cyberslug wrote an applet that included this: But I can't remember if it was a text-editor or a context sensitive tooltip displayer (a universal syntax tooltip feature).

Check his posts in Scripts and Scraps, or his library of projects.

Posted

Cyberslug wrote an applet that included this: But I can't remember if it was a text-editor or a context sensitive tooltip displayer (a universal syntax tooltip feature).

Check his posts in Scripts and Scraps, or his library of projects.

<{POST_SNAPBACK}>

The closest code I found is this old MetaPad helper util
Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!
Posted

It was just before the GUI development.

I seem to recall an applet that Cyberslug wrote which "looked over your shoulder" while typing into notepad, so that it could popup the syntax of the function you just typed into a script.

So as for interacting with non-active (minimised) windows, I'm not sure. But it might have some ideas for you.

hth :ph34r:

  • 2 weeks later...
Posted

So has anyone had any ideas?

I need the ability to control the Caret position and with so many "caret position" dependant functions, there must be a way to control it. No?

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...