Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

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

Recommended Posts

Posted

Ok I would like a custom dialogue comming up with a question and depending on the button pressed run either script 1 or script 2

however there does not seem to be a way of running a script from custom dialogue : which can't be right....

Posted

The custom dialog would be called from within a script. Then the button choice would branch the script to the appropriate subscript using Get(LastMessageChoice).

Posted (edited)

The pseudo code for the script should be along the lines of

Show custom dialog (with your question, and the answer to perform script 1 should be the defaullt button. Button 2 should be the naswer for script 2 to be done)

If [Get{Last message choice) = 1]

Perform script [1]

else

Perform script [2]

Edited by Guest
Posted

somehow the show custom dialogue with the IF statement seems to break a local variable I created to create the file name and path to save the file...

so the variable is not recognised :?

What could be going wrong there :)

Posted

It seems my variable for setting the file name and saving to the temp path is not working with a double script like this it does work when I just have a simple script with no IF statements etc....

I have

Set Variable [$$filepath; Value: Get ( TemporaryPath ) & $fieldname & ".pdf"]

which works for a simple script to print out a load of layouts at once and name the file with a pre determined name.

However when I put in a dialogue box and a IF statement the filee name is not remembered and cannot be used for saving the file.

You get this error...

"$$filepath" could not be created on this disk. Use a different name, make more room on the disk, unlock it or use a different disk.

Posted

Yes. Check out Help for Creating File Paths

Also, the reason that you've been instructed to use a global variable is bcs it seems that you are passing $filepath to another script and local variables only exist in the script that creates them. You could also use a scriptparameter.

Posted (edited)

Post the file, please. Also, now you're going from one script to another. Any local variables do not carry over to another script.

Since I've never seen your original script, all I can do is guess.

When is $fieldname set?

Edited by Guest

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