Jump to content

Parameter passing


mfl

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

Recommended Posts

So I have this script........


Set Variable [ $filename; Value:GetValue ( Get ( ScriptParameter ); 1 ) ] 

Set Variable [ $filename; Value:Get ( ScriptParameter ) ] 

Set Variable [ $pcdesktop; Value:Case ( 

Left ( Get ( DesktopPath ) ; 2 ) = "/C" ; 

"filewin:" &  Get ( DesktopPath ) & "Style PDFS/" & $filename & "¶" & 

"filewin:" &  Get ( DesktopPath ) & $filename ; 

Left ( Get ( DesktopPath ) ; 2 ) = "/U" ; 

 Get ( DesktopPath ) & "/" & "Style PDFS/" & $filename & "¶" & 

 Get ( DesktopPath ) & "/" & $filename ; 

Left ( Get ( DesktopPath ) ; 2 ) = "/M" ; 

 Get ( DesktopPath ) & "Style PDFS/" & $filename & "¶" & Get ( DesktopPath ) & $filename ) ] 

I am only passing one parameter to this script.

What the usage difference between the first 2 lines?

As a side note how do I return the parameter $pcdesktop to the calling script?

Thanks

Michael

Edited by Guest
Link to comment
Share on other sites

If you're not passing a string with a ¶ in it, there is no difference between the first two Set Variable[].

To pass a $ variable from a script to its parent put this at the end of the child script: Exit Script[$pcdesktop] and this in the parent script: Set Variable[$pcdesktop; Get(ScriptResult)].

Link to comment
Share on other sites

This topic is 5088 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.