Applescript to change Pages underline to italic

I need to scan 85,000 words in a Pages document and change all underlined words to italic.  I have the following code:
tell application "Pages" to tell front document
          repeat with i from 1 to (count every word)
                    tell word i
                              if underline type is in {single underline, double underline} then set properties to {underline type:none, italic:true}
                    end tell
         end repeat
end tell
This works great as far as it goes.  The only problem is that this changes only the words in the document, but not the spaces between them.  So it will turn this: (The quick brown fox)  into this: (The_quick_brown_fox).  But what I want is this: (The quick brown fox).
So how would this Applescript need to look to change the formatting of the space after the word, as well as the formatting of the word itself?  Or maybe the code should add a delete and space after each changed word?  I'm not sure.
Any help is HUGELY appreciated!

I need an Applescript to change the desktop picture using a file on the web.
You can't do this directly - the OS won't use an internet-based image for your desktop picture (think about it - what would it do if your machine were offline?)
All is not lost, though - all you need to do is download the image to your machine first, then you can set it as your desktop image:
tell application "URL Access Scripting"
  download "http://www.geekpedia.com/gallery/fullsize/apple-pink-blue-wallpaper.jpg" to file (path to desktop as text) & "wallpaper.jpg"
end tell
Now you have a file wallpaper.jpg on your desktop (adjust the file name/path as you like), which you can use before your existing code to set it as your desktop.

Similar Messages

  • Applescript to change Page setup in PowerPoint for Mac

    Very new to AppleScript.    I'd like to change the Page Setup to "On-screen show (16:9)".  Within PowerPoint it is under File>Page Setup>Size>Slides sized for : On-screen Show (16:9).    I did find within AppleScript that the Slide Size is a Property of the Page Setup Class within the Microsoft PowerPoint Suite.  It is also listed under the Application Class >Command Bar Class>Command Bar Control.  The Page Setup inherits it's properties from Base Object.
    I tried to manually record the process of opening a PPT file and choosing File>Page Setup>Size>On-screen show (16:9) but it only recorded the process to activate PPT and open the file.
    I wrote this script:
    tell application "Microsoft PowerPoint"
         activate
         open {file"MacBook Pro Hard Drive:Users:Patrick:Desktop:AppScript.pptx"}
    set slide size to "on-screen show"
    end
    I get the error "Syntax Error :  A property can't go after this identifier" and "slide size" is highlighted.
    I'm stuck......Slide Size is a property of the Page Setup Class.  How should I write this ?
    Script Editor V. 2.7(176) and PowerPoint for Mac 2011

    http://answers.microsoft.com/en-us/mac/forum/macpowerpoint?tm=1366105550521.
    That's where the PowerPoint experts hang out...
    Clinton

  • Create an Applescript to change focus order in browser

    Hey all,
    I'm curious if it is possible to create an Applescript to change the order focus within a browser.
    I have a bulk of data that needs to be entered into a database online.
    The focus order of the website design is not logical hence pressing tab to move from one field to the next results in confusion.
    (It includes buttons in headers, footers and empty fields making this extremely frustrating as I have to continuously use the mouse)
    Google search has not really given me any results, so I was hoping to build one.
    Thanks,
    Cheebs

    I think it is unlikely that you will get far with AppleScript as this normally involves reverse engineering the web page HTML/JavaScript and perhaps having a modified local copy of some or all of it.
    Are you able to paste the URL here without security implications?
    You could try looking at the source HTML of the web page.
    I am not sure if anybody makes a special web page viewer which has more control than a standard browser.

  • Applescript to change image resolution using image events

    Does anyone have an applescript to change image resolution using image events in OSX? I want to optimize my images for iWeb. I want to use a shell script in an applescript as a droplet or as a service in Automator. I'd like to leave the original intact.

    For what type of use in iWeb are these photos intended? If it's for adding to a page (not a photo or album page) iWeb does a great job of optimizing. See my post in this topic: Re: Photo Resolution in iWeb.
    You can optimize an entire site with an application like Web Site Maestro. It can reduce the site's size by up to 49%. Here's the settings available for the optimization:
    Click to view full size
    It's very effective.
    OT

  • ORA-06502 on "Help Text" region when changing pages on a tabular form

    Hello everybody,
    We are developing an application on Apex 4.1.0.00.32. This application have some pages with tabular forms and these pages uses a page zero as template. In this page zero, we have added two sidebar regions: a list region to navigate on the application and a help text to describe how to use our application.
    The problem occurs when the tabular split the records into pages (since it has more records that it can show on a single page). When the user clicks to change to another page, Apex raises an ORA-06502: PL/SQL: numeric or value error as described below:
    Erro ao renderizar a região "Ajuda". ORA-06502: PL/SQL: erro: erro de conversão de caractere em número numérico ou de valor
    Informações Técnicas (visível somente para desenvolvedores)
    is_internal_error: true
    apex_error_code: APEX.REGION.UNHANDLED_ERROR
    ora_sqlcode: -6502
    ora_sqlerrm: ORA-06502: PL/SQL: erro: erro de conversão de caractere em número numérico ou de valor
    component.type: APEX_APPLICATION_PAGE_REGIONS
    component.id: 2
    component.name: Ajuda
    error_backtrace:
    ORA-06512: em "APEX_040100.WWV_FLOW_DISP_PAGE_PLUGS", line 3654
    ORA-06512: em "APEX_040100.WWV_FLOW_DISP_PAGE_PLUGS", line 4204
    Obs: Our database is in Brazilian Portuguese, so I guess it will be hard for some people to understand the first two lines! :)
    We have tried to change the pagination style of the tabular form and change the region model of the help text but the problem still happens.
    Does anyone an ideia about what this may be?
    Thanks in advance!

    I am getting the exact same message, to the line number, also in APEX 4.1.0.0.32.
    Occurs when changing pages in a classic report, Standard region template, select list pagination, when selecting a different pagination set.
    In English:
    Error during rendering of region "Matched Participants Help & Hints".
    ORA-06502: PL/SQL: numeric or value error: character to number conversion error
    Technical Info (only visible for developers)
    is_internal_error: true
    apex_error_code: APEX.REGION.UNHANDLED_ERROR
    ora_sqlcode: -6502
    ora_sqlerrm: ORA-06502: PL/SQL: numeric or value error: character to number conversion error
    component.type: APEX_APPLICATION_PAGE_REGIONS
    component.id: 2
    component.name: <strong>Matched Participants</strong> Help & Hints
    error_backtrace:
    ORA-06512: at "APEX_040100.WWV_FLOW_DISP_PAGE_PLUGS", line 3654
    ORA-06512: at "APEX_040100.WWV_FLOW_DISP_PAGE_PLUGS", line 4204
    There are no conditions on the region, and no date string within the Help text. Some HTML <strong> tags, that's it.
    The Help region renders fine the first time.
    The Debug info does not help any:
    3.798360.00062Computation point: After Box Body4
    0
    3.798990.00081Processes - point: AFTER_BOX_BODY4
    0
    3.799790.00068Region: <strong>Matched Participants</strong> Help & Hints4
    0
    3.800470.00213Region rendered dynamically because request was not null4
    0
    3.802590.00096Add error onto error stack4
    0
    3.803550.00084...Error data:4
    0
    3.804400.00084......message: Error during rendering of region "<strong>Matched Participants</strong> Help & Hints".4
    0
    3.805240.00084......additional_info: ORA-06502: PL/SQL: numeric or value error: character to number conversion error4
    0
    3.806080.00081......display_location: ON_ERROR_PAGE4
    0
    3.806890.00081......is_internal_error: true4
    0
    3.807700.00084......apex_error_code: APEX.REGION.UNHANDLED_ERROR4
    0
    3.808540.00082......ora_sqlcode: -65024
    0
    3.809350.00234......ora_sqlerrm: ORA-06502: PL/SQL: numeric or value error: character to number conversion error4
    0
    3.811700.00082......error_backtrace: ORA-06512: at "APEX_040100.WWV_FLOW_DISP_PAGE_PLUGS", line 3654 ORA-06512: at "APEX_040100.WWV_FLOW_DISP_PAGE_PLUGS", line 4204 4
    0
    3.812510.00081......component.type: APEX_APPLICATION_PAGE_REGIONS4
    0
    3.813310.00110......component.id: 24
    0
    3.814420.00099......component.name: <strong>Matched Participants</strong> Help & Hints4
    0
    3.815400.00076...Show Error on Error Page4
    0
    3.816160.00344......Performing rollback4
    0
    3.819610.00225Processes - point: AFTER_ERROR_HEADER4
    0
    3.821850.00268Processes - point: BEFORE_ERROR_FOOTER4
    0
    3.82453-End Page Rendering
    Any thoughts on where to poke around for this one?
    Thanks - Karen

  • How do I change page order on a document created in Pages 5.1?

    After reading some of the posts about the lack of ability to change page order in Pages 5.1, I decided to re-install Pages 09 from the DVD that came with my computer because some posts said it was a better program. After inserting the disc and responding to all the prompts it seemed to download everything but I can't find Pages 09, I only seem to have 5.1.
    I will take a solution to either problem, but all I really want to do is change the order of 2 pages on a 9 page document created using 5.1.

    It is in your Applications/iWork folder.
    Make sure you update it to the latest v4.3:
    http://www.freeforum101.com/iworktipsntrick/viewtopic.php?t=432&sid=f793ea2968cc 7f8ffa338ab5171d1d5d&mforum=iworktipsntrick
    Peter

  • Printing only changed pages

    In my department, we produce large technical manuals that are distributed to users around the world.  When small changes are made to the manuals, we only distribute the changed pages (including the back side of the changed page since the documents are printed double-sided).  Is there an automated way to only print the changed pages with the necessary back pages?

    Rick Quatro at http://www.frameexpert.com has a plugin that will print only changed pages; I don't see it listed on his website at the moment, but if you contact him he'll be able to give you more details.
    Rick's very, very familiar with the complications of dealing with changed pages in FM.

  • Mac OSX10.4.11 & Firefox3.6.19 - How do I make beeps stop on changing pages w/in a site?

    I'd been able to access the site (a part of the following site: http://www.govhs.org/) without beeps until yesterday. Unfortunately, it's a password-protected part of the site that I must deal with.
    Is there ANY chance you can tell me why my laptop started to beep when I change pages within that site? If not, can you confirm that THEY must have changed something?

    Oh, I didn't notice that it was another example of the most recurring question on Java GUI! Here's the idiom:
    private void runButtonActionPerformed(java.awt.event.ActionEvent evt) {
      final List<ResultLine> res;
      resultArea.setText("");
      cancelButton.setEnabled(true);
      if (targetField.getText().isEmpty()){
        targetField.setText("localhost");
      Thread t = new Thread(new Runnable(){
        public void run(){
          String str = "";
          res = TR.traceroute
           (targetField.getText(), Settings.hops, Settings.waitTime);
          if (res == null){
            str = "Error";
          else{
            StringBuilder s = new StringBuilder();
            for (ResultLine r : res){
              s.append(r.toString());
              s.append("\n");
            str = s.toString();
          SwingUtilities.invokeLater(new Runnable(){
            public void run(){
              resultArea.setText(str);
              cancelButton.setEnabled(false);
      t.start();
    }

  • Won't open new page when I click bookmark, instead changes pages EVEN THO PREFERENCES SET TO OPEN NEW PAGES

    Firefox keeps on changing pages, even yanking minimized pages back onto the screen and changing them, even though I have Firefox preferences set to always open new pages to accommodate links on a page or bookmarks.
    I don't want Firefox to tamper with any pages, period. If I have a pages minimized, no way should Firefox be yanking that page up back onto the screen because it's "too lazy" to open up a new page to accommodate a bookmark or link clicked on.
    It's extremely aggravating to click a link on a page, get a new page then, when I click the page to close it I find no page underneath, indicating that Firefox had changed the original page rather than open up a new page automatically to accommodate the link, etc.
    What's the point of me in Firefox preferences setting it up for Firefox to open up new pages automatically when afterwards it doesn't?

    Perhaps try the add-on Tab Mix Plus. It has a feature that you can force every link to open in a new tab if you like:
    * http://tmp.garyr.net/help/#Links (description of options - see "Force to open in new tab")
    * https://addons.mozilla.org/en-us/firefox/addon/tab-mix-plus/ (install page)
    I don't know whether it has any effect on bookmarks. You can open those in a new window by holding Shift or in a new tab by holding Ctrl when clicking.

  • Cannot change page size with acrobat

    I am able to convert my manuscript in Mac word(2011) to adobe acrobat (XI); unfortunately the 6 X 9 " page size does not convert. I spent a few hours on the phone with adobe support and the final resolution was to upload the file to them and they converted it for me. however, they used distiller which reduced the file size and appears to have affected the many images. Does anyone have any advice? The best I have been able to glean online is work with inDesign to change page size.

    Thanks.
    The problem was with the paper size. In addition to change the page size I needed to change the paper size in the print option before selecting save Adobe PDF.
    From Word go to File> Print
    Open the Copies & Pages dropdown
    Select Paper Handling
    Check the Scale to fit paper size box
    Open the Destination Paper Size list
    Select your custom 6x9 Preset
    Click the PDF button
    Select either Save as PDF or Save as Adobe PDF
    The unfortunate thing is that I was able to do this initially, but when I went back to replicate it adobe is creating 2 files one with my cover page and the rest to the manuscript. Luckily my initial copy was good. Thanks again for your help.

  • Change page size in Acrobat Pro 6.0

    Hello, I'm wondering if there's a way to change page sizes in Acrobat Pro 6.0 for Windows. We are receiving manuscripts which have been assembled from various documents. They're going to be printed at 8.5 x 11, but sometimes some of the pages are 7 x 10. Is there an automated way to change all the 7 x 10 pages to 8.5 x 11? We don't want to have to do each page individually because there are too many of them.
    Many thanks,
    Coral

    You could try printing to a new PDF with the PDF printer, setting the page size to 8.5 x 11 and setting the page scaling option to 'Fit to Printable Area'.  This will hopefully leave the existing 8.5 x 11 ones about the same size (it may shrink them slightly) and scale the other sizes.

  • How to change page order in Acrobat Porfolio?

    How to change page order in Acrobat Porfolio? In older versions it use to be much easier to drag and drop the page order. I don't see any menu options on arranging the pag order. Any ideas? Thanks.
    I would post a screenshot but they have been disabled on these forums.

    You should ask in the Reader forum. But my guess is that Reader there is nothing you can do. Acrobat allows you to move pages around, but not Reader.

  • Introduce left/top margin: Change Page Size ignored

    I have a vector drawing of a technical schematic in PDF.  The drawing is an extract of a much larger schematic, so it is very small: 2.2" by 1.648".  However, when I print it out, it is resized to fill up a Letter size paper (8.5" by 11") and the size is then perfect for viewing.  Also, the PDF has no white space around the edges, so the same PDF is perfect for importing into documentation packages.
    However, for hard copy printing, depending on the exact aspect ratio of the drawing, I will sometimes want to introduce white space along one edge for hole-punching purposes.  I am opening the PDF and printing it from Acrobat 8 Professional.  I cannot use Document->Cropping because I am trying to introduce a margin rather reduce an existing margin.  I tried using the Change Page Size controls in the cropping dialog panel.  Originally, it was set to Fixed Sizes and Page Sizes was set to None.  I selected Custom instead of Fixed Sizes, then I entered in the Width and Height in inches, with the Height being about 0.5" more than the original 1.648" (it's landscape, so the holes will be at the top).  However, the illustrative diagram does not change, and neither do the dimensions shown on it.  I click OK and the PDF as viewed did not change -- no white space.  When I go back into the Change Paper Size dialog, all the size data that I entered is gone and the control have reverted back to Fixed Size with a Page Size of None.  I explored the dropdown list for Page Sizes, and none of them are appropriate for such a small diagram.
    What I'm trying to achieve is a pretty simple effect, and I thought it would be straightforward.  It has to be *very* simple as I expect to do this regularly.  Is there actually a way?  Ideally, it doesn't involve calculating all sorts of bounding boxes and offsets.  Who knows what the assumed reference points for those are.  In fact, the most direct way would be to enter a negative Margin Controls in the Crop Margins region of the dialog.  That is not possible, of course.

    Actually, I found a way.  The reason why the page size was being ignored is because the numbers were too small.  If I enter a big enough number, it sticks.  It would be nice to get a message to that effect though.......sigh.
    I can then adjust the cropping margins to get the gutter.
    Thanks.

  • XI Pro: How to change page size?

    I have a letter-sized document where each page has extremely large margins and text in a tiny font size. Can I use the 'Remove White Margins' function (Crop pages > Set Page Boxes) to remove the large margins and then resize what remains back to 8.5" x11" using the 'Change Page Size' function?
    When I try this, I can do the first step and I'm left with pages about 5.5"x8". But the Change Page Size function does not allow me to resize the page.
    It this possible?

    Hi J Kart,
    Please refer the doc: https://acrobatusers.com/tutorials/how-to-resize-pages-in-a-pdf-file
    Regards,
    Rave

  • How We Can Change Page Size During Report Run Time

    Hello !
    How We Can Change Page Size During Report Run Time .
    How can we stop to change the column name when we amend a sql in report data model.
    Thanks !
    null

    hello sohail
    1. question - i'm afraid this cannot be done ... bit in report 6 and newer you have posibility to divide your report in 3 parts (former header, body, trailor) and each part can have diferent page siz, orientation , ...
    2. question - best is give each column in your statements in one report diferent alias. when you have to chnge something, alias will remain same ...
    try this: select 1 as fist_column, 1 as second_column from dual
    hope this helsp

Maybe you are looking for

  • Does anyone else have problems with retina screens? My eyes are constantly hurting and my eyesight is getting worse in a short period of time.

    I've been using high quality retina screens for about nine months now and my vision has gone downhill quickly. I got my first ever prescription for eye glasses and my eyes are constantly strained. High resolution screens also cause other problems wit

  • BW Upgrade from 3.x to 7.0

    Folks, We are planning to upgrade from BW 3.x to BI 7.0, Is it a direct update process or is it in 2 step process? And also I was reading some of the posts its says there are some issues to upgrade from 2004 to 2004s? Can some one point out those iss

  • Aspect Ratio of Letterboxed DVX100 Footage

    I'm wondering if anyone knows what the exact aspect ratio would be of DVX100 footage with the widescreen matte turned on. In trying to measure it in Final Cut, applying the 1.66:1 and 1.70:1 mattes don't do anything, but the 1.78:1 matte crops off a

  • CD import stopped iTunes cold

    Imported a CD and now iTunes plays nothing. The slider looks like it's playing, but nothing happens on any tune in the library. All sound selections are selected correctly and work fine, including system sounds, and I get audio through Internet conne

  • "Updated" Firefox and all my bookmarks are gone

    I've already clicked on "show all bookmarks"-- but the library's empty. So I clicked on Import and Backup, and Restore the previous bookmarks to earlier today (and yesterday and the day before and...), and after being told this will replace the curre