• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Page Setup
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Page Setup


  • Subject: Re: Page Setup
  • From: CYB <email@hidden>
  • Date: Tue, 31 May 2005 14:13:45 -0500

Title: Re: Page Setup
I just read your post about the page setup and GUI scripting.
I think that maybe my script help you, is not page set up but is about Printing in Photoshop using GUI, so is very similar.
Anyway I post my code, because maybe help you and when I look for help whit this problem I couldn’t found anything about it, nor in the lists, nor in the AS sessions at Monterey last may 2-7
This is my first contribution to this list, because I’m starting in this world of AS, so by the way hello to everybody from Mexico.
----------The code--------
-- Subrutin for print
on Print_poster(PictForPrint)
    try
       activate application "Adobe Photoshop CS"
        tell application "Adobe Photoshop CS" --this is just a resume about how many print will be done
            display dialog "Voy a imprimir de \"" & NombreProducto & "\"" & return & return & CantidadImpresosPoster & " Posters 16x20\"" & return & return & "Con las siguientes fechas de validez " & return & return & TextoParaImpresiones buttons {"Cancel", "OK"} default button "OK" with icon note with title "RESUMEN DE IMPRESOS" giving up after 4
        end tell --Aviso de impresiones
--this is the real process
       tell application "System Events"
            tell process "Photoshop"
                click menu item "Print..." of menu of menu bar item "File" of menu bar 1
                click pop up button 2 of window "Print" --reselecciona el presset actual
               delay 0.5
                keystroke (ASCII character 3) -- enter key
               repeat
                   set Preset to get value of pop up button 2 of window "Print"
                    if Preset is equal to "AA Kodak luster rollo250 720dpi" then
                       exit repeat
                   else
                       if Preset is equal to "Standard" then
                           click pop up button 2 of window "Print" --abre de nuevo el menu "Pressets"
                           delay 0.5
                            keystroke (ASCII character 31) -- down arrow key
                           delay 0.5
                            keystroke (ASCII character 3) -- enter key
                           delay 0.5
                            exit repeat
                       else
                           click pop up button 2 of window "Print" --abre de nuevo el menu "Pressets"
                           delay 0.5
                            keystroke (ASCII character 30) -- up arrow key
                           delay 0.5
                            keystroke (ASCII character 3) -- enter key
                           delay 0.5
                        end if
                   end if
               end repeat
               delay 0.5
                keystroke CantidadImpresosPoster
               click button "Print" of UI element 5 of window "Print" --da la orden de imprimir
               delay 20
            end tell
       end tell
   on error errMsg number errNum
       if errNum is not -128 then
           beep
           tell application "SystemUIServer"
                display alert "ERROR EN EL PROCESO DE IMPRESION AUTOMATICA" message "Lo lamento, Intenta imprimir manualmente"
            end tell --"SystemUIServer"
           return
       end if
   end try
   tell application "Adobe Photoshop CS"
        close document midocumento saving no
   end tell
end
Imprimir_Poster
--------------End of code-----------------

Carlos Ysunza
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Prev by Date: Re: Do Shell Script and MS SQL
  • Next by Date: Re: Filemaker Pro chokes on Find command
  • Previous by thread: Re: Page Setup
  • Next by thread: Services Menu Access
  • Index(es):
    • Date
    • Thread