EliTe_ThuT Posted May 6, 2007 Posted May 6, 2007 Hey, I would like to know how we can send "enter" to an edit control. I'm using this to send new text to display in another window ControlSetText("Window", "", "Edit1", $text) But the text is all on one line...how can we send line breaks?? Thx
alex OF DEATH Posted May 6, 2007 Posted May 6, 2007 I am under the impression that ControlSetText changes the text in the title of a window. Meaning you /cant/ add breaks. I don't know what an 'edit control' is, so I don't know what you're talking about, so I probably don't know what I'm talking about.
herewasplato Posted May 6, 2007 Posted May 6, 2007 ,,,...how can we send line breaks??...$text2set = "This is sample text to be sent to notepad." & @CRLF & _ "This is a second line to be set." & @CRLF & _ "...and a third line." Run("notepad") WinWait("Untitled - Notepad") WinActivate("Untitled - Notepad") WinWaitActive("Untitled - Notepad") ControlSetText("Untitled - Notepad", "", "Edit1", $text2set) [size="1"][font="Arial"].[u].[/u][/font][/size]
herewasplato Posted May 6, 2007 Posted May 6, 2007 I am under the impression that ControlSetText changes the text in the title of a window...That is done with WinSetTitle (). [size="1"][font="Arial"].[u].[/u][/font][/size]
EliTe_ThuT Posted May 6, 2007 Author Posted May 6, 2007 $text2set = "This is sample text to be sent to notepad." & @CRLF & _ "This is a second line to be set." & @CRLF & _ "...and a third line." Run("notepad") WinWait("Untitled - Notepad") WinActivate("Untitled - Notepad") WinWaitActive("Untitled - Notepad") ControlSetText("Untitled - Notepad", "", "Edit1", $text2set) lol....thx...I had tryed @CR and @LF but not @CRLF...
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