How do I loop through Indesign Button behaviors?
How do I loop through Indesign Button behaviors?
- Subject: How do I loop through Indesign Button behaviors?
- From: "Patrik B." <email@hidden>
- Date: Sat, 9 Sep 2006 11:15:26 -0700
Hi,
Thanks for any help on this! I actually found a different solution. By
simply generating a simple javascript that gets added to the finished pdf
buttons to change the Acrobat reader preferences to open Cross-referenced
files in a new window on default. Now I can do all my linking in indesign
using the scripts I made.
The javascript code that I found is "app.openInPlace=false;" and it does the
trick.
The only thing I could not find in Acrobat 7 is a document wide script that
executes when you open a pdf so I simply had to add it to each button a
person would click on first. Any ideas were document wide scripts get stored
in Acrobat Pro 7?
Best, Patrik
On Sat, 9 Sep 2006 08:01:13 -0700 (PDT), applescript-users-request wrote
> Send Applescript-users mailing list submissions to
> email@hidden
>
> To subscribe or unsubscribe via the World Wide Web, visit
> http://lists.apple.com/mailman/listinfo/applescript-users
> or, via email, send a message with subject or body 'help' to
> email@hidden
>
> You can reach the person managing the list at
> email@hidden
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of Applescript-users digest..."
>
> Today's Topics:
>
> 1. How to compile script in OSX (Jon Lesher)
> 2. How do I loop through Indesign Button behaviors? (Patrik B.)
> 3. Indesign CS / Acrobat opening window behavior (Patrik B.)
> 4. Re: How to compile script in OSX (Michelle Steiner)
> 5. Re: Importing/parsing CSV files (Malcolm Fitzgerald)
> 6. Re: How to compile script in OSX (email@hidden)
> 7. Re: How to compile script in OSX (Michelle Steiner)
> 8. Re: 10.4 Print Options (Save as PDF) (Carlos Ysunza)
> 9. [ANN] MBS Plug-in For Filemaker (Todd Geist)
> 10. Re: How to compile script in OSX (dev_sleidy)
> 11. Question regarding audio file type "protected mpeg-4" and
> mp3's (Jim Weisbin)
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Fri, 08 Sep 2006 14:33:30 -0600
> From: Jon Lesher <email@hidden>
> Subject: How to compile script in OSX
> To: <email@hidden>
> Message-ID: <C1272FBA.11040%email@hidden>
> Content-Type: text/plain; charset="US-ASCII"
>
> Hi,
>
> I have a script written with Script Editor in OSX. I simply want to
> compile this script. In Script Editor there is a "Compile" item in the
> Script menu. This menu item is active, but when I select it, nothing
> happens. There is also a compile button in the Script Editor
> window. It is active, but when I click it, again nothing happens.
>
> The script executes correctly when clicking the "run" button in Script
> Editor.
>
> I have looked at the Apple website Applescript info and I can not find
> instructions on how to compile a script in OSX with Script Editor.
>
> I have written and compiled scripts in OS 9 with Script Editor.
> This is my first script using OSX.
>
> I'm using Script Editor 2.0(v43) on a eMac running OSX(10.3.9).
>
> I would like to create a compiled script that can be executed by double
> clicking. I guess a "droplet" script would also work.
>
> thank you,
>
> Jon Lesher
> Conley Publishing
>
> ------------------------------
>
> Message: 2
> Date: Fri, 8 Sep 2006 12:48:42 -0700
> From: "Patrik B." <email@hidden>
> Subject: How do I loop through Indesign Button behaviors?
> To: email@hidden
> Message-ID: <email@hidden>
> Content-Type: text/plain; charset=iso-8859-1
>
> Thanks Shane for the input below. Your variation worked just fine. I
> have been able to save hours so far.
>
> One other thing that I was trying to do but didn't seem to be able
> to get the path of an image link of a button.
>
> Basically I drop the pdfs that my menu links to into an indesign
> file and then have to generate the buttons that link to the very
> pdfs I dropped in..
>
> I was hoping that the is a way of just selecting the images and
> converting them with a script to buttons and with the same script
> linking to that very pdf. So when I then make an interactive pdf I
> could just click on the button. No luck so far I have not been able
> to figure out how you get to the image path of a graphic dropped
> into a button. If I could read that I could use it to redirect the button.
>
> So far I basically made a sample button to a template file and then
> have a script that change the paths of the templates to the specific
> language - I managed to that much with your help below. Anyway more
> data you have on the button object and its links attributes would help.
>
> Best, Patrik
>
> >> > any ideas?
> >
> > Where is your script failing? I'd be more inclined to try something like
> > (untested):
> >
> > Tell app "Indesign CS"
> > set myselections to selection of document 1 -- I have 10 buttons selected
> > repeat with i from 1 to count of items of myselections
> > repeat with j from 1 to count of behaviors of item i of myselections
> > set mybehavior to properties of behavior j of item i of myselections
> > --then I will add a handler here that changes the existing path mine
> > tell behavior j of item i of myselections
> > set properties to {file path:mynewpath}--mynewpath is defined in the
> > handler end repeat end repeat end tell
> >
> > --
> > Shane Stanley <email@hidden>
>
> ------------------------------
>
> Message: 3
> Date: Fri, 8 Sep 2006 13:08:31 -0700
> From: "Patrik B." <email@hidden>
> Subject: Indesign CS / Acrobat opening window behavior
> To: email@hidden
> Message-ID: <email@hidden>
> Content-Type: text/plain; charset=iso-8859-1
>
> Hi,
>
> I am generating interactive pdfs from within Indesign CS and have
> run into the problem that I can't define the button to open external
> pdfs that then open in Acrobat Reader in a new window - so far
> Indesign just sets it to "users default".
>
> As my main pdf that contains all the buttons is my "menu" which then
> links to a whole bunch of other externally located single pdfs on a
> CD I want a user to click on the buttons and the get "external" pdfs
> to always open in a "new window" without closing the "menu". By
> manually linking in Acrobat you can define this at the time of
> making the link. (users default, existing window or new window)
>
> I have gone over the Acrobat Pro 7 dictionairy but not been able to
> find any objects for this option.
>
> I have two possibilities here either I manually relink all 360
> buttons and set this preference by hand. (This would take approx 25
> seconds per link ->
> 2.5 hours). Or better be able to write a script that changes any
> link option to an external pdf to open automatically in a new
> window. Is this possible from Acrobat or even Indesign CS? If so
> what is the object name and command for it in either? Any ideas
> would help.
>
> Best, Patrik
>
> ------------------------------
>
> Message: 4
> Date: Fri, 8 Sep 2006 13:00:21 -0700
> From: Michelle Steiner <email@hidden>
> Subject: Re: How to compile script in OSX
> To: Applescript Users <email@hidden>
> Message-ID: <email@hidden>
> Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed
>
> On Sep 8, 2006, at 1:33 PM, Jon Lesher wrote:
>
> > I have a script written with Script Editor in OSX. I simply want to
> > compile this script. In Script Editor there is a "Compile" item in
> > the
> > Script menu. This menu item is active, but when I select it, nothing
> > happens. There is also a compile button in the Script Editor
> > window. It is
> > active, but when I click it, again nothing happens.
>
> You are confusing "compile" with "save". If you want to create a
> file containing your script, you have to save it, just like you save
> any other file in an application. Choose "Save" from the File menu
> or press Command-S.
>
> -- Michelle
>
> --
> Never forget that only dead fish swim with the stream
>
> ------------------------------
>
> Message: 5
> Date: Sat, 9 Sep 2006 06:12:31 +1000
> From: Malcolm Fitzgerald <email@hidden>
> Subject: Re: Importing/parsing CSV files
> To: applescript users <email@hidden>
> Message-ID: <email@hidden>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>
> Hi Mark,
>
> I think Doug's advice to generate a parser for each data source is sage.
>
> I'm feeling pernickity today, so I'll take up your response.
>
> I said to Tom: "If you are going to go ahead there are some givens,
> aren't there?" Then followed up with some things (which he probably
> already knew) aimed at helping him to consider the problem he
> presented.
>
> >> each row must have a delimiter
> >
> > Not if there's only one value in that row.
>
> A row has to be defined even when it is empty. No delimiter: no row.
>
>
> >> each row must have the same number of columns
> >
> > Nope. It's a spreadsheet format. Different rows can have different
> > numbers of cells.
>
> It may not have them in fact, but conceptually you are handling an
> array which has x rows of y cols. This understanding can help to
> solve the problem. If the machine outputting the data drops empty
> cells then that is making the job of reconstruction harder.
>
> >> If the number of columns is less than expected then the next row must
> >> be considered.
> >
> > Nope. Newline outside of quotation marks terminates the row always.
>
> Yes, OK. But I didn't say anything about newline outside of
> quotation marks. You did. In a few lines you'll use the example of a
> newline within quotation marks yourself. Treat this as a possible
> example of a newline within quotation marks and we'll be working together.
>
> In the example sent to us several rows had some sort of new line
> marker in the street addresses that caused a single record to run
> over several rows. So a single row is not necessarily a single
> record. The number of columns present in a row could indicate this.
>
> >> The existence of ," or ", in a row demands a corresponding closing
> >> quote
> >
> > ...which may be on the next line because of an embedded newline.
>
> My point exactly. We are having to work with a format which allows a
> record to run over several rows. So when there is no corresponding
> closing quote on a line we have definitely got a multi-row record.
> Keep looking for the closing quote!
>
> We'll that's about it for this nit-picker.
>
> malcolm
>
> ------------------------------
>
> Message: 6
> Date: Fri, 8 Sep 2006 22:27:33 +0100
> From: email@hidden
> Subject: Re: How to compile script in OSX
> To: Applescript Users <email@hidden>
> Message-ID: <email@hidden>
> Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed
>
> > You are confusing "compile" with "save". If you want to create a
> > file containing your script, you have to save it, just like you
> > save any other file in an application. Choose "Save" from the File
> > menu or press Command-S.
>
> Script Editor does indeed compile on save, but if you ever work in
> Xcode, remember it doesn't compile when saving. I got into the
> habit of saving a file to save and compile it, instead of just
> compiling it. Moved to Xcode and kept writing code that wouldn't
> compile, but wouldn't realise until I tried to build it because it
> was being saved un-compiled.
>
> Caius
> ____________________________________
>
> Caius Durling
> UK Resident
> tel: +44 (0) 7746 746039
> email: email@hidden
> email@hidden
> web: http://caius.name/
> http://qwert.us/
> ____________________________________
>
> ------------------------------
>
> Message: 7
> Date: Fri, 8 Sep 2006 14:37:37 -0700
> From: Michelle Steiner <email@hidden>
> Subject: Re: How to compile script in OSX
> To: Applescript Users <email@hidden>
> Message-ID: <email@hidden>
> Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed
>
> On Sep 8, 2006, at 2:27 PM, email@hidden wrote:
>
> >> You are confusing "compile" with "save". If you want to create a
> >> file containing your script, you have to save it, just like you
> >> save any other file in an application. Choose "Save" from the
> >> File menu or press Command-S.
> >
> > Script Editor does indeed compile on save,
>
> But it doesn't save on compile. He was trying to compile and was
> apparently frustrated because it wasn't saving too.
>
> -- Michelle
>
> --
> "As democracy is perfected, the office of president represents, more
> and more closely, the inner soul of the people. On some great and
> glorious day the plain folks of the land will reach their heart's
> desire at last and the White House will be adorned by a downright moron."
>
> ..... H.L. Mencken ...
>
> ------------------------------
>
> Message: 8
> Date: Fri, 08 Sep 2006 17:28:23 -0500
> From: Carlos Ysunza <email@hidden>
> Subject: Re: 10.4 Print Options (Save as PDF)
> To: Kevin Dolan <email@hidden>
> Cc: email@hidden
> Message-ID: <C12758B7.25C3%email@hidden>
> Content-Type: text/plain; charset=ISO-8859-1
>
> Kevin,
>
> I found very easy to install a virtual printer that always save as
> PDF http://www.codepoetry.net/2006/05/28/cups_pdf_2_4_0_posted
>
> In that page it's the installer, is free and very useful, so install
> it and then make a routine in AppleScript telling the "Printer Setup
> Utility" to select this printer, and then just print.
>
> I have a handler that I use normally:
>
> on Seleciona_Impresora()
> tell application "Printer Setup Utility"
> set printerlist to name of printers
> if printerlist contains "Stylus Pro 4000(FW:Roll Paper)" then
> set printerchoice to "Stylus Pro 4000(FW:Roll Paper)"
> set myprinter to printer (printerchoice as string)
> set current printer to myprinter
> else
> set oldprinter to name of current printer
> set printerchoice to (choose from list printerlist with
> prompt ¬ "Selecciona la impresora \"Stylus Pro
> 4000(FW:Roll Paper)\"" default items oldprinter) set
> myprinter to printer (printerchoice as string) set
> current printer to myprinter end if end tell end
Seleciona_Impresora
>
> Just substitute the reference to Stylus 400o to your choice
>
> When you print to this virtual printer you'll get a folder in your desktop
> with the "prints" inside
>
> I hope this help
>
> Carlos Ysunza B.
> Director
> Ysunza/Santiago
> Visual Communication Automation
> Tel. (52)55 5256-0336
> email@hidden
>
> http://www.ysunzasantiago.com
> http://www.thesecretmexico.com
> http://www.softrobot.com.mx
>
> > From: Kevin Dolan <email@hidden>
> > Date: Thu, 07 Sep 2006 12:05:08 -0700
> > To: <email@hidden>
> > Subject: 10.4 Print Options (Save as PDF)
> >
> > Hello,
> > I am trying to get a FileMaker Pro database to print a report as a
pdf
> > by automating the ³PDF Services² options. I¹ve searched Apple¹s
> > documentation and other links on the web but only found how to add
scripts
> > to the PDF Services menu not how to automate a (print with options ³Save
as
> > PDF²) solution. Has anyone found a solution to automating the (command
+ P)
> > options?
> >
> > Thank you in advance for any suggestions.
> >
> > __________________________
> >
> > Kevin Dolan | Schawk, Inc.
> > IT Manager
> > 653 Front Street | San Francisco, CA 94111-1913
> > Ph. (415) 438-6706 | Fax (415) 391-6050 | Cell (415) 225-3807
> >
> > www.schawk.com | NYSE: SGK
> >
> >
> > This e-mail is intended only for the use of the individual or entity to
> > which it is addressed and may contain information
> > that is privileged, confidential and exempt from disclosure under
applicable
> > law. If the reader of this e-mail message is
> > not the intended recipient, or the employee or agent responsible for
> > delivery of the message to the intended recipient,
> > you are hereby notified that any dissemination, distribution or copying
of
> > this communication is prohibited. If you have
> > received this e-mail in error, please notify us immediately by telephone
at
> > (847) 827-9494 and also indicate the sender's name.
> > Thank you.
> >
> >
> >
>
> ------------------------------
>
> Message: 9
> Date: Fri, 8 Sep 2006 17:25:05 -0700
> From: Todd Geist <email@hidden>
> Subject: [ANN] MBS Plug-in For Filemaker
> To: email@hidden
> Message-ID:
> <email@hidden>
> Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed
>
> September 9, 2006.
> MonkeyBreadSoftware and geist interactive, release Version 1.0 of
> the MBS plug-in for FileMaker
>
> And for the serious FileMaker Applescripter!
>
> - Run Applescripts from FileMaker Calculations!
> - Compile Applescripts and run them at a later time.
>
> MonkeyBreadSoftware (http://www.monkeybreadsoftware.de ), maker of
> the popular MBS Plug-in for RealBasic and geist interactive (http://
> www.geistinteractive.com) have teamed up to bring the extensive MBS
> function library to FileMaker. The MBS RealBasic plug-in contains
> over 10000 functions, and this release represents the first step in
> a project to bring as many of those functions to FileMaker as make
> sense. Many many more features to com in the future.
>
> The plug-in is available for FileMaker 8 and 8.5. It is available
> for Windows XP and as Universal Binary for Mac OS X. There is a
> Developer Tool available to help you get started quickly with
> documentation and Calculation builder. Demos are available on the
> website, along with license and purchasing information.
>
> more info: http://www.geistinteractive.com/mbs/
> download: http://www.monkeybreadsoftware.de/filemaker/download.cgi
>
> Press Contact
> Todd Geist, geist interactive
> mailto:email@hidden
>
> ------------------------------
>
> Message: 10
> Date: Sat, 9 Sep 2006 08:19:07 -0400
> From: dev_sleidy <email@hidden>
> Subject: Re: How to compile script in OSX
> To: applescript-users <email@hidden>
> Message-ID: <p06240404c1285bf0fc8b@[192.168.0.2]>
> Content-Type: text/plain; charset="us-ascii" ; format="flowed"
>
> >I simply want to compile this script. In Script Editor there is a
> >"Compile" item in the Script menu. This menu item is active, but
> >when I select it, nothing happens. There is also a compile button
> >in the Script Editor window. It is active, but when I click it,
> >again nothing happens.
>
> Selecting 'Script Editor's 'Script, Compile' menu item, or clicking
> a 'Script Editor's window's 'Compile' toolbar icon button - perform
> the same function. That function is to verify the syntax of the code
> you entered. If you entered improper code and selected, either the
> 'Compile' menu item or clicked on the 'Compile' toolbar icon button -
> a drop down sheet with error information would be displayed. If you
> entered proper code - the commands, variables, etc. would change
> color - as per the preferences settings of 'Script Editor'.
>
> If you did not do either of the above; but, selected, either the
> 'Run' menu item or clicked on the 'Run' toolbar icon button -
> 'Script Editor' performs a 'Compile' check. If the code was
> incorrect a drop down error sheet would appear. If the code was
> entered correctly, it would be executed.
>
> Selecting the 'Compile' menu item, or clicking the 'Compile' toolbar
> icon button, does not compile the code to a file.
>
> > I would like to create a compiled script that can be executed by
> >double clicking.
>
> To create a double click-able 'application' (what you describe as a
> 'compiled script that can be executed') - when you create any code
> and select 'Script Editor's 'File, Save' (or 'File, Save As...')
> menu item - select 'Application' from the 'File Format:' popup button.
>
> > I guess a "droplet" script would also work.
>
> To allow the application to accept dragged on items, then you must
> include ...
>
> on open dragged_Items
> ....
> end
>
> or
>
> on open (dragged_Items)
> ....
> end
>
> .... where 'dragged_Items' (above) is just a variable - and may be
> any name you prefer. Below is an example of how to use 'on open'.
>
> on open (dragged_Items)
> repeat with i in dragged_items
> display dialog (i as string)
> end
> end
>
> Copy the above code into a 'Script Editor' window, and save it as an
> 'Application' (via the 'File Format:' popup menu). Now drag any
> number of files (document and / or application), folders, or files
> and folders - onto the applet (when you save code as an
> 'Application' in 'Script Editor' it is called an 'applet').
>
> ------------------------------
>
> Message: 11
> Date: Sat, 9 Sep 2006 11:00:04 -0400
> From: Jim Weisbin <email@hidden>
> Subject: Question regarding audio file type "protected mpeg-4" and
> mp3's
> To: email@hidden
> Message-ID: <email@hidden>
> Content-Type: text/plain; charset="iso-8859-1"
>
> I wrote a script which opens a folder of audio files, opens each one
> in Quicktime, gets the running time of each, and then copies all of
> that information to the clipboard. After reading Matt Neuberg's
> excellent book, I found that I could do the same thing with System
> Events, without having to open each file in QT. The following
> scripts works great in most cases, but fails in a few. By the way,
> I limit the number of items processed to max_number for internal reasons.
>
> - Certain mp3 files fail to be detected even though they have the
> correct type and creator codes and full read/write access. I can't
> figure out why.
>
> - If I add the protected mpeg-4 type "M4P " to the extension list,
> those types are still not detected. Anyone know why?
>
> - Why is it that one can say "set f to audio file f", but cannot say,
> for example "set f to every audio file of this folder"?
>
> property extension_list : {"AIFF", "MPG3", "WAVE", "Mp3 "}
> property max_number : 30
> tell application "Finder"
> set mylist to ""
> set this_folder to choose folder with prompt ¬
> "Choose a folder to list:"
> set folder_items to every file of this_folder whose ¬
> (file type is in extension_list)
> set found_items to count of folder_items
> if found_items > 0 then --- don't bother if list is empty
> if found_items > max_number then
> set folder_items to items 1 through 30 of
folder_items
> set found_items to 30 --- no need to recount, we
know it's 30
> end if
> repeat with mycount from 1 to found_items
> set f to item mycount of folder_items as string
> tell application "System Events"
> try
> set f to audio file f
> on error
> error "Not an audio file."
> end try
> tell (get contents of f)
> set n to name of f
> set t to (its duration) / (its time
scale)
> set hr to text 2 thru 3 of ((100 + t
div hours) as string)
> set min to text 2 thru 3 of ((100 +
t mod hours div minutes) as
> string) set sec to text 2 thru 3 of
((100 + t mod minutes div
> 1) as string) set frm to text 2
thru 3 of ((100 + t mod 1 * 30)
> as string) set d to ""
if (hr is not equal to "00") then
> set d to hr & ":"
end if
> --- use this one if you want frames
displayed after a decimal
> point:
> --- set d to d & min & ":" & sec
& "." & frm
> --- use this one if you want no
frames displayed:
> set d to d & min & ":" & sec
> end tell
> end tell
> set mylist to mylist & mycount & tab & n & tab & d &
tab & return
> end repeat
> set the clipboard to «class ktxt» of ((the mylist as text) ¬
> as record)
> else
> set the clipboard to ""
> end if
> end tell
>
> Jim Weisbin
> human
> 138 5th avenue. 3rd floor, nyc, ny 10011
> telephone 212 352 0211
> facsimile 212 352 0210
> <email@hidden>
> http://www.humanworldwide.com
>
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: http://lists.apple.com/mailman/private/applescript-
users/attachments/20060909/31f25c01/attachment.html
>
> ------------------------------
>
> _______________________________________________
> Applescript-users mailing list
> email@hidden
> http://lists.apple.com/mailman/listinfo/applescript-users
>
> End of Applescript-users Digest, Vol 3, Issue 440
> *************************************************
_______________________________________________
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