bigred Posted September 12, 2004 Share Posted September 12, 2004 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? Link to comment Share on other sites More sharing options...
Billy Posted September 13, 2004 Share Posted September 13, 2004 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 Link to comment Share on other sites More sharing options...
bigred Posted September 13, 2004 Author Share Posted September 13, 2004 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! Link to comment Share on other sites More sharing options...
sugi Posted September 13, 2004 Share Posted September 13, 2004 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. Link to comment Share on other sites More sharing options...
trids Posted September 13, 2004 Share Posted September 13, 2004 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. Link to comment Share on other sites More sharing options...
bigred Posted September 13, 2004 Author Share Posted September 13, 2004 Trids I'm not sure which post you're talking about. I searched and found these two threads.http://www.autoitscript.com/forum/index.php?showtopic=2307http://www.autoitscript.com/forum/index.php?showtopic=3027Were you replying to sugi's post? If so, I'm not sure his method will work because I can't do mouse clicks. I need the window to be minimized when I set the caret position. Link to comment Share on other sites More sharing options...
CyberSlug Posted September 13, 2004 Share Posted September 13, 2004 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! Link to comment Share on other sites More sharing options...
trids Posted September 14, 2004 Share Posted September 14, 2004 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 Link to comment Share on other sites More sharing options...
bigred Posted September 23, 2004 Author Share Posted September 23, 2004 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? 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