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

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

Recommended Posts

  • Newbies
Posted

Hi,

I wanted to create a single button that toggles between the 75% and 100% zoom level values (I'm working on a Mac w/ FMP 5.0). I know that in both the Specify Button function and Scriptmaker, you can select the "Set Zoom Level" command and specify what zoom level you want the button or script to give you. But I couldn't find anything that would let you click the button once to reduce the document and then click it again to enlarge it back to 100%. I tried making up a script but up till now I've only done very basic scripts. Any suggestions?

Thanks,

Lee

Posted

To get a little technical, what you are describing is a simple state machine. A mechanism where the output depends upon the input and the present state. To know the present state...

Create a field:

gZoomLevel (global, number)

Create a script:

If ( IsEmpty(gZoomLevel) or gZoomLevel = 75)

Set Zoom Level (100%)

SetField(gZoomLevel, 100)

Else

Set Zoom Level (75%)

SetField(gZoomLevel, 75)

End If

-bd

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