Jump to content



Photo

Line problem


  • Please log in to reply
5 replies to this topic

#1 Klark67

Klark67

    Seeker

  • Active Members
  • 7 posts

Posted 27 February 2012 - 01:12 AM

Local $sString =
("
line1
line2
")

can I divide it like list(with lines) ?







#2 water

water

    ?

  • MVPs
  • 10,696 posts

Posted 27 February 2012 - 01:17 AM

You have already asked a similar question here. Please open only one thread per question.
And the answer is: No, you can't.
You can either have a string and concatenate the content with operator "&" or an array.
It depends on the program you want to automate and the way it expects data.

UDFs:

Active Directory (2012-10-12 - Version 1.3.0.0 released) - Download - General Help & Support - Example Scripts - Wiki

OutlookEX (2012-10-07 - Version 0.9.0.0 released) - Download - General Help & Support - Example Scripts - Wiki

ExcelChart (2013-01-21 - Version 0.3.1.1 released) - Download - General Help & Support - Example Scripts

WordEX (2012-12-29 - Version 1.3 released) - Download

ExcelEX (2013-05-11 - Alpha 4 released) - Download


#3 Klark67

Klark67

    Seeker

  • Active Members
  • 7 posts

Posted 27 February 2012 - 01:54 AM

mmm. Im sorry about that , I understand . it is impossible :oops:

#4 JLogan3o13

JLogan3o13

    Down to 98

  • MVPs
  • 2,114 posts

Posted 27 February 2012 - 03:04 PM

You'd have to use the & _ as Water mentioned, but you could do something like this I guess (not sure why you'd want to).


Local $String = "line1 " & _                 "line2 " & _                 "line3 " MsgBox(0, "", $String)

Edited by JLogan3o13, 27 February 2012 - 03:05 PM.

J.I spent 10 minutes reviewing code and thinking "What kind of drugs is this guy on?" before realizing it was something I wrote.My Scripts:Include Source with Compiled Script, Disk Maintenance for Windows XP, "Deal-A-Day" Sites, SCCM 2007 Front End, Windows Firewall UDF

#5 water

water

    ?

  • MVPs
  • 10,696 posts

Posted 27 February 2012 - 03:06 PM

But that's not what the OP needs. He's looking for a way to have a NewLine character in his data.

UDFs:

Active Directory (2012-10-12 - Version 1.3.0.0 released) - Download - General Help & Support - Example Scripts - Wiki

OutlookEX (2012-10-07 - Version 0.9.0.0 released) - Download - General Help & Support - Example Scripts - Wiki

ExcelChart (2013-01-21 - Version 0.3.1.1 released) - Download - General Help & Support - Example Scripts

WordEX (2012-12-29 - Version 1.3 released) - Download

ExcelEX (2013-05-11 - Alpha 4 released) - Download


#6 JohnQSmith

JohnQSmith

    Polymath

  • Active Members
  • PipPipPipPip
  • 226 posts

Posted 27 February 2012 - 03:48 PM

Then, how about

Local $sString = ( _ "line1" & @CRLF & _ "line2" & @CRLF _ )

Edited by JohnQSmith, 27 February 2012 - 03:50 PM.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users