Jump to content

line breaks handled incorrectly


This topic is 3923 days old. Please don't post here. Open a new topic instead.

Recommended Posts

ScriptMaster 4.205 seems to handle line breaks incorrectly. If you send a ScriptMaster module a standard line break char(13), it is converted to char(10) before the ScriptMaster module get's it.

 

For example, if you run the following ScriptMaster module with ¶ as a parameter, it will return 10.

RegisterGroovy( "testparam( param )" ; "param.codePointAt(0)" )

The impact this has is the "Call Script Immediately" module is not sending the exact parameter to the script that I passed to the module. My script is doing a substitute based on ¶ in the script parameter, but since ¶ is converted into code(10) by ScriptMaster, the script doesn't work.

 

My workaround is to use this code for the Call Script Immediately function:

if (param) {
	param = param.replace("n","r")
}
fmpro.performScript(fileName, scriptName, param);
return true;

FYI: basic info on line breaks:

code(13) = ¶ = Carriage return = CR
code(10) = Line feed = LF

note: I only tested this on Windows

Link to comment
Share on other sites

This topic is 3923 days old. Please don't post here. Open a new topic instead.

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
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.