Jump to content
Sign in to follow this  
The Big Bear

How to Pass a script parameter?

Recommended Posts

Hi all

Trying to learn something and I am proving that I am a slow learning. I have read so many times of this forums about the script parameter function and I am trying to understand how it works. I have read and reread the FM help file a dozen times and I do not understand how to pass a parameter to a script. I have included a sample file of what I am trying to do. I have attach the script to the four buttom on the sample file and want to go to the layout as noted on the button. Could someone lead me in the right direction of how this is done.

Tanks in advance

Lionel

script_parameter.zip

Share this post


Link to post
Share on other sites

When you are selecting a script (specify script) for your button or calling a subscript, there is an option on the bottom of the window to specify a script parameter.

Share this post


Link to post
Share on other sites

John

I thanks for the information but I have one more question. How do you connect the same script to four differnet buttom to go to four different layouts?

Lionel

Share this post


Link to post
Share on other sites

If your layouts were named:

Layout_1

Layout_2

Layout_3

Layout_4

Ex. Script

If[Get(ScriptParameter) = "Layout_1"]

....Go To Layout["Layout_1"]

End If

If[Get(ScriptParameter) = "Layout_2"]

....Go To Layout["Layout_2"]

End If

If[Get(ScriptParameter) = "Layout_3"]

....Go To Layout["Layout_3"]

End If

etc...

For each button you would put the appropraite layout number in the Script Parameter box (ex. "Layout_1" quotes included). The script parameters do not have to match the layout name but it makes it easier when you need to interpret the script.

Share this post


Link to post
Share on other sites

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
Sign in to follow this  

×

Important Information

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