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

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

Recommended Posts

Posted

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.

Posted (edited)

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 by Guest
Posted

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.

Posted

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[]

Posted

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]

Posted

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?

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