Converting old Quark applescript to InDesign - problems

Hello
I'm converting an old Quark applescript to InDesign CS3 finally. I'm having a problem with placing, scaling and adjusting images.
Here's how it works ... a user fills out a Microsoft Word form, which a designer unlocks and pastes into the layout, and then runs the script. The image frames are all labeled, and that's how I'd like to call them.
Here's a snippet of the Quark portion that I'm having a problem with ...
set Todayicon to item (offset from list Dayicons of Todayval) of DayIconEPS
set Todayiconpath to (OPIpath and Todayicon as string)
set Todayicon to item 1 of Todayiconpath
set scale of Todayicon to {"65","65"}
set offset of Todayicon to {"-1p2","0p5"}
And here's what I'm thinking I need to do in InDesign CS3 ...
set Todayicon to item (offset from list Dayicons of Todayval) of DayIconEPS
set Todayiconpath to (OPIpath and Todayicon as string)
set Todayicon to item 1 of Todayiconpath
set TodayiconTransformationMatrix to make transformation matrix with properties {horizontal scale factor:0.65, vertical scale factor:0.65, geometric bounds:[-14,-5]
transform Todayicon in inner coordinates with matrix TodayiconTransformationMatrix
Unfortunately, the script errors out when it tries to make the transformation matrix, even though I'm following the examples in the Working with Tranformations in Applescript pdf.
Any ideas? I guess I can put dummy images in the layout and call a "Place" to override the dummy images, which should keep the scale, but it doesn't help me when I need to offset the images sometimes.

Philip Regan wrote: "The new scripting model with all of its touted advantaged is really poorly executed."
While I didn't design the scripting model for transformations, and disagree with some of the decisions made in the design, I understand that InDesign's transformations architecture had to be rewritten for CS3. There were too many cases in CS2 where objects could not be returned to their original coordinates after transformation. The scripting implementation pretty much had to go along with the change in the underlying architecture.
If you'd rather things work the way they worked in CS2, why not use the set of transform "wrappers" that I wrote and included in the transform tutorial? With those functions, you don't really need to worry about the new model.
Thanks,
Ole

Similar Messages

  • [AS] Beast of a script needs help converting from Quark 8 to InDesign CS5

    First off, THANK YOU for even reading this post. Here's the dilema. I work in a publishing company that used an AppleScript from Quark 8 to automate our pagination from set text we pull from our sales reps worksheets. About 8 months ago we switched fully to InDesign CS5, but have had to hold onto Quark 8 to be able to keep running our pagination. I'd like to see if the geniuses (yes, I've been trolling these forums looking to solve this myself and seen some great problems fixed) on these forums can help me figure out the proper conversion I would need to be able to leave Quark 8 in the rearview.
    Here's our current code... (I warned you it was a beast)
    set Ad_Props to {¬
         {Ad_Label:"SPREAD – ", Ad_Width:2.495, Ad_Height:1.62, Ad_Text_Angle:0}, ¬
         {Ad_Label:"FULL – ", Ad_Width:1.225, Ad_Height:1.62, Ad_Text_Angle:0}, ¬
         {Ad_Label:"SPREAD – ", Ad_Width:2.495, Ad_Height:1.62, Ad_Text_Angle:0}, ¬
         {Ad_Label:"JUNIOR – ", Ad_Width:0.90625, Ad_Height:1.62, Ad_Text_Angle:0}, ¬
         {Ad_Label:"1/2H – ", Ad_Width:1.225, Ad_Height:0.785, Ad_Text_Angle:0}, ¬
         {Ad_Label:"1/2V – ", Ad_Width:0.5875, Ad_Height:1.62, Ad_Text_Angle:90}, ¬
         {Ad_Label:"1/3V – ", Ad_Width:0.5875, Ad_Height:1.2025, Ad_Text_Angle:90}, ¬
         {Ad_Label:"1/4 – ", Ad_Width:0.5875, Ad_Height:0.785, Ad_Text_Angle:0}, ¬
         {Ad_Label:"1/4 Strip – ", Ad_Width:0.26875, Ad_Height:1.62, Ad_Text_Angle:90}, ¬
         {Ad_Label:"1/8H – ", Ad_Width:0.5875, Ad_Height:0.3675, Ad_Text_Angle:0}, ¬
         {Ad_Label:"1/8V – ", Ad_Width:0.26875, Ad_Height:0.785, Ad_Text_Angle:90}, ¬
         {Ad_Label:"Junior (GOLF) – ", Ad_Width:0.8, Ad_Height:1.62, Ad_Text_Angle:0}, ¬
         {Ad_Label:"1/3V (GOLF) – ", Ad_Width:0.375, Ad_Height:1.62, Ad_Text_Angle:90}, ¬
         {Ad_Label:"1/3sq. (GOLF) – ", Ad_Width:0.8, Ad_Height:0.785, Ad_Text_Angle:0}, ¬
         {Ad_Label:"1/6V (GOLF) – ", Ad_Width:0.375, Ad_Height:0.785, Ad_Text_Angle:90}, ¬
         {Ad_Label:"Directory Listing Only – ", Ad_Width:0.3, Ad_Height:0.3, Ad_Text_Angle:0}, ¬
         {Ad_Label:"INSERT (# in notes) – ", Ad_Width:0.3, Ad_Height:0.3, Ad_Text_Angle:0}, ¬
         {Ad_Label:"Other (See Notes) – ", Ad_Width:0.3, Ad_Height:0.3, Ad_Text_Angle:0}, ¬
         {Ad_Label:"------------ – ", Ad_Width:0.3, Ad_Height:0.3, Ad_Text_Angle:0}}
    set Position_Width to number
    set Position_Width to 11.375
    set Position_Height to number
    set Position_Height to 1.875
    set Jump_Height to number
    set Jump_Height to 0
    set Variable_Count to number
    set Variable_Count to 0
    set Variable_Height to number
    set Variable_Height to (1.875 + (1.62 * Variable_Count))
    set Last_Ad to number
    set Last_Ad to 0
    tell application "QuarkXPress"
         activate
         try
              display dialog "WARNING: This version of 'Dummy Square Maker' runs much slower than the last version, a confirmation will tell you when you are finished. Please be patient." & return & return & "Make sure to have the text box selected" buttons {"Cancel", "Accept"} default button 2 with icon caution
              set ThisBox to object reference of current box
              tell story 1 of ThisBox
                   set (every paragraph where it is return) to ""
                   set style sheet of every text to null
                   set style sheet of every text to "DUMMY TEXTS"
                   repeat with i from 1 to (count of paragraphs)
                        try
                             tell paragraph i
                                  set ThePage to my get_CurrentPage()
                                  try
                                       if it contains " – " then
                                            set style sheet to "AD SIZE"
                                            set Ad_Size to contents
                                            set {This_Width, This_Height, this_angle} to {"", "", ""}
                                            repeat with This_Ad in Ad_Props
                                                 if Ad_Size contains (Ad_Label of This_Ad) then
                                                      set This_Width to Ad_Width of This_Ad
                                                      set This_Height to Ad_Height of This_Ad
                                                      set this_angle to Ad_Text_Angle of This_Ad
                                                      exit repeat
                                                 end if
                                            end repeat
                                            set Ad_Box to my Make_Box(ThePage, {1.875, 10.875, This_Height + 1.875, This_Width + 10.875}, this_angle)
                                            duplicate contents to (end of Ad_Box)
                                       else if it contains "—" then
                                            set style sheet to "AD REP/PLACEMENT"
                                            duplicate contents to (end of Ad_Box)
                                       else if it starts with "©" then
                                            set style sheet to "AD REP/PLACEMENT"
                                            delete (character 1)
                                            duplicate contents to end of Ad_Box
                                            if Position_Width ≤ 19.75 then
                                                 set Jump_Height to Jump_Height + This_Height
                                                 (*_________________This is where Ad Boxes Stack_________________*)
                                                 if (Jump_Height ≤ 1.62) then
                                                      set origin of bounds of Ad_Box to {Position_Height, Position_Width}
                                                      set Position_Height to Position_Height + This_Height
                                                      (*_________________This is where Ad Boxes more right_________________*)
                                                 else
                                                      set Position_Height to Variable_Height
                                                      (*set Position_Width to Position_Width + This_Width + 0.05*)
                                                      set Position_Width to Position_Width + Last_Ad + 0.05
                                                      set origin of bounds of Ad_Box to {Position_Height, Position_Width}
                                                      set Jump_Height to This_Height
                                                      set Position_Height to Variable_Height + This_Height
                                                 end if
                                                 set Last_Ad to This_Width
                                                 (*_________________This is where New Row appears_________________*)
                                            else
                                                 set Position_Width to 11.375
                                                 set Variable_Count to Variable_Count + 1
                                                 set Variable_Height to (1.875 + (1.62 * Variable_Count))
                                                 set Position_Height to Variable_Height
                                                 set origin of bounds of Ad_Box to {Position_Height, Position_Width}
                                                 set Position_Height to Position_Height + This_Height
                                                 set Jump_Height to This_Height
                                                 set Last_Ad to This_Width
                                            end if
                                       else
                                            duplicate contents to (end of Ad_Box)
                                       end if
                                  end try
                             end tell
                        on error errmsg number errnum
                             display dialog "There has been an error " & "[" & i & "] (" & errmsg & " [" & errnum & "])" buttons {"Okay"} default button 1 with icon stop
                        end try
                   end repeat
                   delete contents
                   set style sheet of every text to null
              end tell
              beep 2
              display dialog "Automation Finished" & return & return & "IMPORTANT NOTE: Color your Ad Squares according to Sales Rep, and select them all and 'BRING TO FRONT [F5]', this is VITAL." buttons {"Okay"} default button 1 with icon stop
         on error errmsg number errnum
              beep 3
              if errnum ≠ -128 then
                   beep
                   display dialog errmsg & " [" & errnum & "]" buttons {"OK"} default button 1 with icon stop
              end if
         end try
    end tell
    on Make_Box(ThePage, TheBounds, this_angle)
         local ThePage, TheBounds, this_angle
         tell application "QuarkXPress"
              tell page ThePage of document 1
                   set Ad_Box to make new text box at end with properties {bounds:TheBounds, vertical justification:centered, color:"Rep_Other", shade:100, opacity:10, text angle:this_angle, frame:{style:solid line, color:"Black", shade:60, width:0.1}}
              end tell
         end tell
         (*end tell*)
         return Ad_Box
    end Make_Box
    on get_CurrentPage()
         tell application "QuarkXPress"
              tell document 1
                   return page number of current page
              end tell
         end tell
    end get_CurrentPage

    Hi,
    I think with this, you can already make good progress in your work.
    Good luck!
    global mydocument
    tell application "Adobe InDesign CS5.5"
         set mydocument to active document
         tell mydocument
              set myParaStyle to paragraph style "DUMMY TEXTS"
              tell page 1
                   set TheBounds to {0, 0, 20, 50}
                   set Ad_Box to make text frame
                   tell Ad_Box
                        set geometric bounds to TheBounds
                        set vertical justification of text frame preferences to center align
                        set contents to "This is the contents"
                   end tell
                   set myStory to parent story of Ad_Box
                   set applied paragraph style of every paragraph of myStory to myParaStyle
              end tell
         end tell
    end tell
    Your two handlers then look like this:
    on Make_Box(ThePage, TheBounds, this_angle)
         local ThePage, TheBounds, this_angle
         tell application "Adobe InDesign CS5.5"
              tell page ThePage of mydocument
                   set Ad_Box to make text frame
                   tell Ad_Box
                        set geometric bounds to TheBounds
                        set vertical justification of text frame preferences to center align
                   end tell
              end tell
         end tell
         return Ad_Box
    end Make_Box
    on get_CurrentPage(CurrentTextFrame)
         tell application "Adobe InDesign CS5.5"
              tell mydocument
                   return name of parent page of parent page of CurrentTextFrame
              end tell
         end tell
    end get_CurrentPage
    Shorter version:
    on get_CurrentPage(CurrentTextFrame)
         tell mydocument of application "Adobe InDesign CS5.5"
              return name of parent page of parent page of CurrentTextFrame
         end tell
    end get_CurrentPage
    Ce message a été modifié par: OlivierBerquin

  • Old Quark files converted to Unix Executable

    I am trying to open an old Quark file saved on a CD from 2004 and it shows up as a Unix Executable file. I changed the suffix to .indd and .qxd and it says "It is missing a plug-in" or InDesign "may not support the file format." Any ideas on how to restore this to a Quark or, preferably, and InDesign file? Thanks!

    The Unix icon only shows up if you don't have a copy of QX on your HD if I'm not mistaken. I don't have Quark on my imac and I see the Unix exe icon myself. Bringing the file over to my machine with Q2ID and QX to see if I can open it. Back in a flash.
    I'm back. The icon showed up correctly on my other mac but I only have QX6 and file is QX8. I couldn't open the file. Q2ID wouldn't open it either but it's been several years since I updated the plug in. I only have 2 clients with QX and I showed them both how to export to PDF correctly so I don't use QX at all.
    So if you buy the most recent Q2ID you should be good to go.

  • Converting Quark Files to InDesign CS3

    Currently have had problems converting a Quark 5.0 file into ID CS3 Windows platform. It is my understanding that ID CS3 only accepts Quark 4.1 and under...is there anyway around this? The person with the Quark 5.0 file is not able to 'Save As' a 4.1 or lower version; the software doesn't allow it. Any suggestions?
    Thanks!

    Email it to me and I'll convert it for you. If you get a lot of these,
    you might want to invest in Q2ID from Markzware.
    Click my name, go to my website and you'll find contact info there.
    Bob

  • What is the best software/plugin for converting Quark files to Indesign?

    What is the best software/plugin for converting Quark files to Indesign?
    I don't want to upgrade to the latest Quark now i've got CC so going to make the leap to indesign only. Does Indesign auto convert or do I need anything else?

    ID does not load QXD files. There is a respective commercial third-party plug-in to that effect, but it's rather pricey and I'm not up to speed which versions of Quark and ID it supports and which features come over. Inquire in the ID forum.
    Mylenium

  • 10.2 crashes when I try to convert old libraries for use in the new software. Is there a workaround for this? Or will i have to continue using the previous version to complete older projects?

    Final Cut Pro X 10.2 crashes when I try to convert old libraries for use in the new software. Is there a workaround for this? Or will I have to continue using the previous version to complete older projects? the only foreseeable solution is to begin any new projects on 10.2 or importing footage on 10.2 and starting form scratch--which is something i definitely don't want to do or have time to do. ANY advice, thoughts, or opinions would be greatly appreciated! Thank you!
    Running 10.10.3 // MacBook Pro (Retina, 15-inch, Early 2013) // 2.4 GHz Intel Core i7 // 8 GB 1600 MHz DDR3

    Exactly the same problem with me.
    Some other threads advice to remove fonts, clean the caches, remove add ins but nothing works consistenty, for some it looks like it works, for me it failed.
    What I did not try yet, was to move the Render files out of the malicious library to trash.

  • Converting old analog video with maximum resoultion for archieving and eventual use in iMovie

    There seems to be a lot of information on converting old (amatuer) analog video media to a digital format, and which one is best to preserve the maximum amount of data.  I have already imported old VHS, analog 8, hi8, and dv into iMovie interations from iMovie 6 and forward.  The later versions seem to convert the older files to their own format, I suspect, with a loss of data.  I want to reimport the old media to create masters in the best digital format for eventual editing by iMovie 11, or whatever iMovie comes after that. 
    I have the following formats:  VHS, super VHS, 8MM, Hi8, DV, and a memory card (from a camera which is not directly compatible with iMovie 11)
    I have the following equimpent:
    SONY dual deck VHS DVD.  This allows me to convert VHS directly to DVD.  I can later decode using Handbreak, and import etc. but it seems I would be losing quality.
    SONY Digital 8 handicam.  This will play analog tape and output a digital file.  I do not know the quality of the output.
    Canon VIXIA HFS100, HD camcorder.  This uses memory cards.  It is NOT compatible with iMovie 11, which I should have checked before I bought it.  I have played around with the memory card and have been able to import video but, I do not know the quality, and I've forgotten how I did it.
    MacBook Pro, about 4 years old, with a 2Ghz Intel core duo processor and 2GHz Ram.  This is obviously not state of the art.  I am willing to upgrade within the Mac family but I don't what to upgrade to for my purposes
    Canopus ADVC 110. This as DV out via a firewire port, and a DV in/out.  It also has svideo in, and composit in.
    I have the following software:
    iMovie 6, iMovie 9, and iMovie 11.  I am fairly comfortable with each version.
    Final Cut Express, circa 2006.  I would have to learn this.
    Handbreak.  I use this to rip the DVDs I made with SONY deck.  It outputs all kinds of video codecs but is obviously working with compressed imput files.  I don't know if I could get it to accept input directly from one of the cameras or the Canopus.
    Audacity.  I'm using this to combine audio tracks from various sources to add commentary to silent videos, which i would like to add as a voice over track to my iMovies
    Toast.  I think this can convert files of one video format to another in the process of copying.
    Thanks for any advice on any part of this question.
    Steve B

    Yes
    I found a program but am experiencing lots of trouble with it. I was hoping that others could give me a better suggestion.
    I've actually downloaded and installed ffmpeg but the problem I'm experiencing now is that the videos do not convert. The program starts to work and then three seconds later I get the dialog box that says everything has been converted but the file created is 0KB and of course will not open.
    Any ideas about what could be going wrong? I've attempted to convert the files to different formats and try converting different files as well. I still have the problem.

  • Quark files to InDesign

    I have InDesign CS2. Can I open an old quark file? I thought I read somewhere that I can. do I need CS3?

    To open QuarkXPress 5, 6 or 7, you need to purchase Q2ID from Markzware, which is an InDesign plug-in:
    http://www.markzware.com/q2id/

  • Just upgraded to MacBook Pro running 10.8.4.  Want to convert old movie files to put in Itunes.  Can't upgrade QT player preinstalled, so downloaded QT Player 7 and purchased QTPlayer 7 Pro registration code.  Can not get it to upgrade.  Called Apple 2x.

    Just upgraded to MacBook Pro running 10.8.4.  Want to convert old movie files to put in Itunes.  Can't upgrade QT player preinstalled, so downloaded QT Player 7 and purchased QTPlayer 7 Pro registration code.  Can not get it to upgrade.  Called Apple 2x.  If you have a fix, you can email me direct at [email protected]

    Want to convert old movie files to put in Itunes.
    What does "old movies" mean to you? File type, audio and/or video compression format(s)?
    Can't upgrade QT player preinstalled, so downloaded QT Player 7 and purchased QTPlayer 7 Pro registration code.  Can not get it to upgrade.
    Did you follow the instructions found here?
    If you have a fix, you can email me direct at [email protected]
    To which fix do you refer? Activatng QT 7 Pro or converting the files? Even with QT 7 Pro activated you may need to modify your QT codec component configuration depending on the file type and compression formats used to encode your "old movies." There may be many different problems here with each having one or more "fixes." Please try to be more specific regarding your questions. Converting a muxed VOB MPEG2/AC3 file would be very different different from converting an AVI DivX5/MP3 file depending on which application you are attempting to use.

  • Is it possible to convert from Quark 9 to ID 5.5

    I would like to be able to convert from Quark 9 to ID 5.5 an vice versa, but the Markzware program Q2id is not competable with ID 5.5. Is there another sollution?
    I have seen sollutions like saving it as a Quark 4 project, but that is not possible in Quark 9. Lowest possebility is saving it as quark project 8. But that wil not open in ID 5.5.
    So if there is anybody who knows an sollution, please share it. : )

    You may post your question in the forum for InDesign.

  • "line over/under text" from old Quark doc - how to get rid of them?

    "line over/under text" from old Quark doc - how to get rid of them?
    Can´t seem to finde this and deadline is coming for this project..
    Thanks!
    G.

    I actually found it by myself. But thanks for your response. Not having used my danish version of Quark for 5 years makes finding options i dont usually use in indesign kind of hard. I won´t ever miss danish quark.

  • My itunes wont auto sync my iphone 4 after i connect it to itunes. But it can auto sync when i connect it to my old laptop. what's the problem that it can't auto sync and when i did a backup in my new laptop, it was corrupted the next day.

    But it can auto sync when i connect it to my old laptop. what's the problem that it can't auto sync and when i did a backup in my new laptop, it was corrupted the next day and i was forced to use back a backup which i did in my old laptop 4 months ago. do i have to reinstall the itunes? will my backups be corrupted after i sync again? pls guide.
    P.S/ its the latest version of the itunes whenever i did the backups.

    iPod touches or any iDevices from Apple sync only to one computer. If you sync to a different computer, all your music will be replace with the music from the new computer's iTunes. If the music were purchased from iTunes, you can re-download them again otherwise the music on iPod touch will be deleted. Do you have iTunes backup? 

  • I'm having a billing issue with my apple id. I got my first iPhone today and I've signe din etc however before i can download any apps etc i need to resolve an old payment apparently. The problem is i cant enter my new card details because no longer in US

    I'm having a billing issue with my apple id. I got my first iPhone today and I've signe din etc however before i can download any apps etc i need to resolve an old payment apparently. The problem is i cant enter my new card details because the issue is registered to when i was in America and i require to pay the funds from an American source. Any ideas how i can resolve this? It wont accept my new card detail as im back in the UK. I think i have posted this in the wrong area but anyone got any ideas?
    I have managed to change the rest of my accoutn being registered to the UK i think except this

    Hi..
    You can email Apple for help but the link is for the iTunes store not the Mac App Store. You've inadvertently poasted in the Using Mac App Store forum but that's ok. Billing issues are the same for the iTunes Store.
    Click here > Apple - Support - iTunes Store - Contact Us
    It wont accept my new card detail as im back in the UK
    Your credit or debit card credentials must be associated with the same country where you reside.
    "Although you can browse the iTunes Store in any country without being signed in, you can only purchase content from the iTunes Store for your own country. This is enforced via the billing address associated with your credit card or other payment method that you use with the iTunes Store, rather than your actual geographic location."
    From here >  The Complete Guide to Using the iTunes Store | iLounge Article

  • Is there a way to convert the wireframes created in InDesign to a clickable prototype?

    I have created wireframes in InDesign and trying to convert to a clickable and working prototype. Is there a way to convert the wireframes created in InDesign to a working prototype as HTML or clickable PDF?

    Yes, there are ways (read: you can find ways) to accomplish that, but it isn't really an intended workflow, so nothing about it is "automatic." In the time it will take to make a functional wireframe prototype with InDesign, you could be building the actual site. The features you need for rapid prototyping are found in Fireworks.

  • Converting a PDF into an Indesign doc.

    Hello everybody,
    Is it possible to convert a PDF into an Indesign File?  I am using Indesign CS5.5
    Thanks in advance for the help!
    QntaDesign

    No you can´t.
    There´s couple of thing you can try, but I´m afraif none of them are quite perfect...
    1) Open you PDF into Illustrator and copy/paste or drag&drop the content of the page into InDesign from there. Cons are; you can do only one page at the time and your text will be converted to outlines during the process
    2) Save your PDF as RTF or Word document from Acrobat Professional and place resulting file to InDesign with File>Place commans. You probably have to redo most of the layout, but with correct settings you may be able to preserve text as editable mode and have some styles and graphic elements still after placing....
    Steve´s suggestion is only deasent way to do that.

Maybe you are looking for

  • Purchased track has a part of another track

    The purchased track has a part of the next track at the end, a second or so. As it is rather annoying, I'd like to erase the end. What programme should I use? And will the track play normally in iTunes library after that?

  • Numbers - Printing Table Formatting Help?

    For the past few months, I've been transitioning my MS Office Access databases over to Numbers on my new MBPro - one database is 'Wine Recommendations' which I keep tract of possible purchases from several publications that I receive - the attached s

  • Relay pane. What should I put?

    Im confused. What should I put to the Relay pane of the Mail configuration on Leopard Server? Should I put my LAN's subnet? Should I put my loopback address? What exactly is this pane used for? Thanks

  • Diskwizard (os9) needs to run on Intel Mac Pro

    I have a new mac pro at my work and everyone else has powerpcs so they can run os9. The program only runs in os9 so i need to find a replacement or an application that can import the files. Any Suggestions?

  • Translate HTTPService request to the plain URI

    I'm using following AS code in Flex to get a person's profile: var httpService:HTTPService = new HTTPService(); httpService.url="http://xyz.com/php/profile.php"; httpService.useProxy=false; httpService.method="POST"; httpService.resultFormat="e4x"; h