PDA

View Full Version : Inserting New Line in Parameter to subroutine


Kerfufl
04-04-2005, 03:10 PM
I'm trying to insert a new line in a parameter i'm passing to a subroutine. The subroutine calls Copy Files with this parameter and i'd like to have a list of files to be copied (each file will need to be seperated by a newline).

Is it possible?

I found the post below that seems like it was saying i could but when i hit ctrl-enter in the parameter edit box the dialog is dismissed.

http://www.kinook.com/Forum/showthread.php?s=&threadid=48&highlight=newline

kinook
04-05-2005, 06:16 AM
That trick only works for multi-line edit controls. Some ways to do this:

1) Use a Set Macro action to assign the macro value instead of as a parameter of the Subroutine Call step.

2) Store the multi-line value in a project macro, and reference that macro from the parameter value field of the Subroutine Call step.

3) Use script code in the parameter value to insert newlines. If VBScript is your default script language:
first line[vbCrLf]second line...

Kerfufl
04-05-2005, 07:52 AM
Perfect! Suggestion #3 worked flawlessly. I suspected it'd be possible just wasn't sure how to do it. Thanks for the quick reply.