grumbachr Posted July 30, 2008 Posted July 30, 2008 (edited) First thing is that this script is working fine in OS X (10.5) FM 9.0v3 and fine On Vista when Script Debugger is active. It only fails to work on Vista if I let it run automatically. The issues is with setting a global field to a specific value. Here is how it supposed to work (and works most of the time). From a drop down a person chooses the name of a letter to be printed and presses a button I've defined to print. It the script sets 3 local variables $LetterName, $Contact_ID, $Researcher Opens a new window Goes to Letter Layout Sets Field for $LetterName Sets Field for $ContactID Sets Field for $Reseacher Enters Preview Mode (no automatic printing.) Once this is all done I set the global field were the letter name comes from back to a default value of "Choose Letter Name" To test I've inserted a Pause into my script right before it enters Preview Mode and for the duration of the pause things look good. But once it changes to Preview Mode somehow the Letter Name field gets set to my default value of "Choose Letter Name" But like I've said thing work perfectly on OS X and with debugger running but in vista with just FM Pro Client it fails. Any suggestions or Ideas? Below is the acutal sript code. #Prints Only the Current Record Print Setup [ Orientation: Portrait; Paper size: 8.5" x 11" ] [ Restore; No dialog ] Set Variable [ $$window_name; Value:$$Letter ] Set Variable [ $Contact_ID; Value:Contacts::Contact_ID ] Set Variable [ $FSR; Value:Axial Data::FSR_Name ] Set Variable [ $$Letter; Value:globals::zgLetterName ] New Window [ Name: $$window_name ] Go to Layout [ “Letters - Single Page” (globals) ] Set Field [ globals::zgContact_ID; $Contact_ID ] Set Field [ globals::zgLetterName; $$Letter ] Pause/Resume Script [ Duration (seconds): 2 ] Set Field [ globals::zg_FSR; $FSR ] Enter Preview Mode Show/Hide Status Area [ Hide ] Adjust Window [ Resize to Fit ] Perform Script [ “Center Window”; Parameter: "window" ] Set Field [ globals::zgLetterName; "Choose Letter" ] Edited July 30, 2008 by Guest
grumbachr Posted July 31, 2008 Author Posted July 31, 2008 I think that maybe I've found a bug. After studying my script to try and figure out the problem I think FM on OS X and Script debugger (either Win or Mac) gives me false positive. The step were I reset the global field where I've chosen which letter to print is only happening correctly in Win/Vista.
IdealData Posted July 31, 2008 Posted July 31, 2008 Are your globals really globals? Check the STORAGE options carefully.
grumbachr Posted July 31, 2008 Author Posted July 31, 2008 yeah my globals really are globals. I've fix it and everything is working for me as expected now. I've just learned a frustrating way that I need to pay close attention to what I'm doing. Cant set the global to one thing early in the script and set it to something else later in the script and expect it to work. Yet it does work in a couple places, go figure.
Recommended Posts
This topic is 5960 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