Optimized print code for OSX

charles61 cszasz at mac.com
Fri Jun 25 16:44:45 EDT 2010


I have the following script that I am using to print a card. I have
incorporated some scripts to hide buttons and some edit boxes and to show
label fields instead of edit boxes. The code seems slow in executing when I
click on Preview in the OSX print dialog. Aside from using the printing off
the card technique, is there anyway that this code can be optimized?

Here is my code:

if the platform is "macos"
   then
      select empty
      set the printPaperOrientation to "portrait"
      set the printmargins to 36,108,36,72
      set the printScale to .8738
      
      open printing with dialog as sheet 

      if the result = "cancel" then exit to top ----> This cancels printing
if the user selects Cancel in print dialog
      hideStuff
      set the backgroundColor of this stack to 255,255,255
      set the hiliteColor of this stack to 255,255,255
      
      select empty
      print card id 1060
      
      close printing
      
      set the hiliteColor of this stack to 126,188,237
      set the backgroundColor of this stack to 237,239,217
      set the backgroundcolor of this stack to empty  
      showStuff
      unlock screen
   end if
-- 
View this message in context: http://runtime-revolution.278305.n4.nabble.com/Optimized-print-code-for-OSX-tp2268942p2268942.html
Sent from the Revolution - User mailing list archive at Nabble.com.



More information about the use-livecode mailing list