bmohnsen Posted July 26, 2005 Posted July 26, 2005 I have a file with quite a few layouts - they will typically be viewed in order. I want to create a prev and next button - the prev button does a go to previous layout and the next button does a go to next layout - what is the easiest way to do this with scripting?
sbg2 Posted July 27, 2005 Posted July 27, 2005 From the help file: Go to Layout [""] Options Specify lets you choose the target layout. For Specify, you can: choose the original layout. The original layout is the active layout when the script is initiated. choose a specific layout by name from the list of layouts you've defined in your file. choose Layout Name by calculation, and use the Specify Calculation dialog box to create a formula whose result is a valid layout name. choose Layout Number by calculation, and use the Specify Calculation dialog box to create a formula whose result is a valid layout number. (Layout numbers correspond to the order of the layouts in the file.) So you need a way to track which layout the user is on (global number field) and add or subtract 1 when the user clicks next or previous button respectively (meaning create a script to trigger for each button). You also want to check if the value is greater than the highest layout number or lower than the lowest layout number and adjust accordingly. So three scripts: Next - adds 1 to the global field Previous - subtracts one from global field ShowLayout - goes to layout by number = MyGlobalLayoutNumberField
VICH Posted July 28, 2005 Posted July 28, 2005 i figured i'd give my 2 cents in to the mix and fyi if you want you could jus use buttons and specify them to "gotolayout" and just put "<<", "previous", ">>", "next" as the text for hte button, that way you don't junk up your script menu with minor tasks
Recommended Posts
This topic is 7059 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 accountSign in
Already have an account? Sign in here.
Sign In Now