vilem Posted December 1, 2004 Posted December 1, 2004 My Go Back script attached to my back button is almost working as intended, thanks to everyone here who helped me. The only problem is the Layout [color:"purple"] mode . If I am on a layout in preview mode then go to a layout in browse mode, when I hit my back button, it brings me back to the appropriate layout but it stays in browse mode. I have a globallayoutmode field (Global number), inserted in the appropriate layout change scripts [color:"purple"]Set Field ["globallayoutmode", "Status(CurrentMode)"]. And here's the script attached to my back button: [color:"blue"] Go to Layout ["globallayoutnumber"] If ["globallayoutmode = 0"] Enter Browse Mode[] Else If ["globallayoutmode = 1"] Enter Find Mode [Restore, Pause] End if If ["globallayoutmode = 2"] Enter Preview Mode[Pause] End if End if I'm seriously puzzled at the moment. Is there anyone that can see what's wrong?
-Queue- Posted December 1, 2004 Posted December 1, 2004 I don't think that this would have a major impact on your script, but I would move the first End If to the pair of End Ifs and put an Else step in its place. So it looks like If Else If Else If End If End If End If Also, you should know that the Restore option on Enter Find Mode will not restore the most recent request(s) but the request performed just prior to the creation of the script, or the request performed just prior to opening the created script and opting to Replace the find request(s) after clicking OK. So I wouldn't use the Restore option with your back button, since it may serve to only confuse your users when a request appears that they didn't create. Regarding your globallayoutmode, are you setting it before changing modes, when you move to a different layout?
vilem Posted December 1, 2004 Author Posted December 1, 2004 Thanks -Queue- Regarding my globallayoutmode, I have tried setting it before AND after changing modes but it doesn't change, it doesn't work.
-Queue- Posted December 1, 2004 Posted December 1, 2004 Put your globallayoutmode field on the layout, delete any number that may be in it, and check its value after the script step has been performed. Does it contain the correct number now?
vilem Posted December 2, 2004 Author Posted December 2, 2004 HA!! No, the value in it is always 0 This might explains why my back button always returns me to a page in browse mode. Do you have any idea where I should check first for errors?
vilem Posted December 2, 2004 Author Posted December 2, 2004 I think I'm getting there, Im toying around with the order of the commands in my scripts and now I get the right layout mode number Thanks a whole lot
vilem Posted December 2, 2004 Author Posted December 2, 2004 Allright I thought I knew what was wrong but I guess *I* was wrong I am pretty sure my problem is in the order of my script, but I've tried just about every order possible to no avail... Here's the script: [color:"red"] Enter Browse Mode [] Set Field ["globallayoutnumber", "Status(CurrentLayoutNumber)"] Allow User Abort [Off] Print setup [Restore, No dialog] Go To layout ["Labels"] Enter Preview Mode [Pause] Set Field ["globallayoutmode", "Status(CurrentMode)"] //---This is the line that I think is at the wrong place---// Go To Layout [original layout] Enter Browse Mode [] Edit: I forgot to specify, my problem is still that my globallayoutmode doesn't work.
-Queue- Posted December 2, 2004 Posted December 2, 2004 The result with your script should be a 2 in globallayoutmode. I just tested it and it worked. Are you certain that globallayoutmode is defined as a global? Could you zip and attach the problem file?
vilem Posted December 2, 2004 Author Posted December 2, 2004 Yes Queue, it's defined as a global, I tested it and the number 2 appears in the field, I seriously dont know whats wrong. I'd rather e-mail you the file directly though, I'm not sure my bosses would approve of me posting their project on a message board
vilem Posted December 6, 2004 Author Posted December 6, 2004 Ok I finally corrected it. Instead of placing a global for the layout mode, I only placed a global for the layout number, which was working correctly and attached subscripts to my back button ie: If globallayoutnumber = 3 perform script: go to labels Everything is working fine now, many thanks to all of you who helped me!
Recommended Posts
This topic is 7295 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