in

Quark Forums

removing hard returns

Last post 10-27-2009 10:23 AM by Scripting_Ace. 6 replies.
Page 1 of 1 (7 items)
Sort Posts: Previous Next
  • 09-24-2009 8:27 AM

    removing hard returns

    Hello Team,

    I would like to remove hard returns from my active document using script.

    can you please provide me any reference or sample for this.

     Thanks,

    Shailesh

  • 09-24-2009 8:31 AM In reply to

    • Emma
    • Top 10 Contributor
    • Joined on 07-07-2004
    • Leeds, UK
    • Posts 1,184

    Re: removing hard returns

     Sorry, I've changed Macs and lost my app that makes scripts look pretty, but copy and paste should work!

     

    --Put what you want to search for as the first parameter,
    --and what you want to replace it with as the second.
    --you can add as many of these as you like!

    SAndR(return, "")


    on SAndR(searchstring, replacestring)
        tell document 1 of application "QuarkXPress"
            -- the try...end try bit means it won't error if it doesn't find any instances of a given searchstring
            try
                set (every text of every story where it is searchstring) to replacestring
            end try
        end tell
    end SAndR



     

  • 09-24-2009 10:11 AM In reply to

    • Emma
    • Top 10 Contributor
    • Joined on 07-07-2004
    • Leeds, UK
    • Posts 1,184

    Re: removing hard returns

    Damn, just downloaded Convert to Markup Script again and all I'm getting is this (see below)! Thought I'd matched my prefs - have I missed something?

    Open the AppleScript "S&R" in a new Script Editor window.

  • 09-26-2009 1:41 PM In reply to

    • Emma
    • Top 10 Contributor
    • Joined on 07-07-2004
    • Leeds, UK
    • Posts 1,184

    Re: removing hard returns

    Er... was that any help?
  • 09-29-2009 10:17 AM In reply to

    Re: removing hard returns

    Hi There,

    I have not yet tested this. Will test this code and let you know.

    Sorry for this as i am working on another scripts.

     

    Thanks,

    Shailesh

  • 10-27-2009 7:35 AM In reply to

    • donone
    • Not Ranked
    • Joined on 10-27-2009
    • Posts 1

    Re: removing hard returns

    just use the find and replace feature in quark copy and paste a return into the first field place a space in the second field replace all. it will remove all returns and replace with a space
  • 10-27-2009 10:23 AM In reply to

    Re: removing hard returns

    donone:
    just use the find and replace feature in quark copy and paste a return into the first field place a space in the second field replace all. it will remove all returns and replace with a space
     

     This is the Applescript forum donone... your solution does not work here.

    Michel Lemieux
    Click here --> to visit my PUBLISHING & SCRIPTING FORUM

Page 1 of 1 (7 items)
Powered by Community Server (Commercial Edition), by Telligent Systems