Jump to content

ControlSetText


Recommended Posts

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.

Link to comment
Share on other sites

,,,...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]

Link to comment
Share on other sites

$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... :)
Link to comment
Share on other sites

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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...