Called Macro drops last 2 characters (CRLF) of parameter

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
evangelmike
Pro Scripter
Posts: 56
Joined: Sun May 11, 2008 9:39 pm

Called Macro drops last 2 characters (CRLF) of parameter

Post by evangelmike » Tue Sep 30, 2008 12:50 am

Greetings! This one took me two hours to find. When a string whose last two characters are CRLF, is passed by one macro as a value to a second called macro, the CRLF characters are dropped from the string. Only the string is passed. CRLF is discarded. This can be verified by running CallingMacro and placing your mouse cursor after the last character of the message displayed by MessageModal. If the last two characters are CRLF, and you press the right arrow, you will be taken to the next line. If the CRLF characters have been dropped, when you press the right arrow, the cursor won't move; there is no next line. The strangest thing is that if two strings are passed to a called macro, CRLF is only dropped from the first string. The second string is handled correctly (i.e., CRLF is not dropped). I am hoping this bug can be fixed quickly. May you have a blessed day.

Code: Select all

// CallingMacro

// NOTE: CallingMacro calls CalledMacro with parameter SSIssuerToScoreResult

//////////////////////////////////////////////////////////////////
Let>SSIssuerToScoreResult={"COMPANY"+%CRLF%}
MessageModal>CallingMacro SSIssuerToScoreResult = %SSIssuerToScoreResult%

// NOTE: Both SSIssuerToScore and SSIssuerToScoreResult have CRLF as last 2chars
MessageModal>CallingMacro SSIssuerToScore1 before call = %SSIssuerToScoreResult%

Macro>%SCRIPT_DIR%\CalledMacro.scp /SSIssuerToScore=%SSIssuerToScoreResult%

MessageModal>CallingMacro SSIssuerToScore after call = %SSIssuerToScoreResult%

===============================================
// CalledMacro
// Called by CallingMacro with parameter SSIssuerToScore

MessageModal>CalledMacro SSIssuerToScore = %SSIssuerToScore%[code:1:bd8baa5910]
[/code:1:bd8baa5910]
May you have a blessed day!

Michael D Fitzpatrick
Reg. US Patent Agent

Post Reply
cron
Sign up to our newsletter for free automation tips, tricks & discounts