January 29, 200818 yr I have created a button on my layout and when the user hits it, it will bring them to Preview Mode. Now i want to put a script on that button so once hit, it will bring them to Preview Mode and Pause so the user can see the records etc. in Preview Mode. If the user wants to exit from Preview Mode, i would like them to be able to hit the ESC Key in Windows to return to the Browse Layout etc. as i don't want the user to see the Status Area etc. My current script is the following: Enter Preview Mode [] Print Setup [Restore; No dialog] Pause/Resume Script [indefiniely] I have tried to put in Allow User Abort [On] like below but this has not worked for me. Maybe i am placing it in the wrong part of the script. Enter Preview Mode [] Print Setup [Restore; No dialog] Pause/Resume Script [indefiniely] Allow User Abort [On] Enter Browse Mode[] Any help with this would be appreciated.
January 29, 200818 yr it is usually good practice to show the status area when in preview mode. How about modifying the script as follows: Allow User Abort [Off] Go to layout ["Print"] Show/Hide Status Area [show] Enter Preview Mode [] Print Setup [Restore; No dialog] Pause/Resume Script [indefinitely] Allow User Abort [On] Enter Browse Mode[] Show/Hide Status Area [Hide] Go to layout [original layout] NOTE: even when status area is hidden, when user hits the "enter" or "Return" key, the script will resume. Edited January 29, 200818 yr by Guest
January 29, 200818 yr The Esc key is not easily used in this manner. The Shift, Ctrl, Alt/Option, and Apple keys are more easily recognized using the Get(ActiveModifierKeys) function. Even better IMHO, would be to use Custom Menus. Change the menu item for File-->Close to run a script that will take you to Browse mode. That way a user can click on the close button to get the result you want.
January 29, 200818 yr Author Hi, I'm only a novice at this so don't really understand your answer. I have got the following to work which shows the Preview Mode for 3 seconds and then returns to the orginal layout. I would like the user to stay for whatever time they require in Preview Mode and not only for 3 seconds with a way for them to exit and return to Browse Mode. Is this not possible? Enter Preview Mode[] Print Setup [Restore; No dialog] Pause/Resume Script [Duration (seconds) 3] Go to Layout ["Report"] Enter Browse Mode[]
January 29, 200818 yr Instead of using Esc as you special key, use Shift instead. This script is a little clunky, but I think it's pretty understandable for a novice. Allow User Abort[Off] Enter Preview Mode Print Setup[Restore; No dialog] # Loop Pause/Resume Script[Duration(seconds); 1] Exit Loop If[Get(ActiveModifierKeys] = 1 End Loop # Enter Browse Mode Go To Layout[Report]
January 29, 200818 yr Author Thanks guys. This is great. I just have one more question. If i hide the Status Area in Preview Mode, can the user still skip through pages of records with the arrow keys perhaps or are they stuck with the first preview page?
January 29, 200818 yr This is easily testable. Hide the Status Area and press some keys! You can hide the status area quickly using the shortcuts on the bottom left corner of the window.
January 29, 200818 yr Author CTRL UP and DOWN will leave you navigate between pages. Pity the Up and Down arrow would not work.
Create an account or sign in to comment