Jump to content

Formating Question - Notepad [Solved]


Recommended Posts

Run("notepad.exe")

GLOBAL $One = ('Line1' & _
    'Line2' & _
    'Line3' & _
    'Line4' & _
    'Line5')



      ClipPut($One)

      $Notepad = WinWait("[CLASS:Notepad]", "", 10)
      ControlSend("Untitled - Notepad", "", "", ("^v"))

Instead of having this paste as Line1Line2Line3Line4Line5

How can I make it paste it into notepad as (without double spacing.)

Line1

Line2

Line3

Line4

Line5

Edited by SkysLastChance

You miss 100% of the shots you don't take. -Wayne Gretzky -Michael Scott

Link to comment
Share on other sites

Thank you for the quick response. 

Run("notepad.exe")

GLOBAL $One = ('Line1' & _
      @CRLF
    'Line2' & _
      @CRLF
    'Line3' & _
      @CRLF
    'Line4' & _
      @CRLF
    'Line5')



      ClipPut($One)

      $Notepad = WinWait("[CLASS:Notepad]", "", 10)
      ControlSend("Untitled - Notepad", "", "", ("^v"))

Like this?

I am getting this error. 

>"J:\Temporary Files\\AutoIt\AutoIt\AutoIt\SciTe\..\autoit3.exe" /ErrorStdOut "C:\Users\\Desktop\test.au3"    
"C:\Users\\Desktop\test.au3" (3) : ==> Missing right bracket ')' in expression.:
GLOBAL $One = ('Line1' & @CRLF
GLOBAL $One = ^ ERROR
>Exit code: 1    Time: 0.2167

 

You miss 100% of the shots you don't take. -Wayne Gretzky -Michael Scott

Link to comment
Share on other sites

That did the trick thank you!

 

Run("notepad.exe")

GLOBAL $One = ('Line1' & @CRLF & _
    'Line2' & @CRLF & _
    'Line3' & @CRLF & _
    'Line4' & @CRLF & _
    'Line5')



      ClipPut($One)

      $Notepad = WinWait("[CLASS:Notepad]", "", 10)
      ControlSend("Untitled - Notepad", "", "", ("^v"))

 

You miss 100% of the shots you don't take. -Wayne Gretzky -Michael Scott

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

×
×
  • Create New...