Pages & AppleScript - adding content and new pages

I build iOS apps for a living and I am taking a stab at making a developer's guide for each app I create (classes and methods used, some terminology, etc.). I'm able to get a list of all my class files and methods of each class from XCode using AppleScript. What I would like to do now is bring them into a Pages document and add some styling to the text. I can get Pages to make a new document from a template but I can't seem to do anything after that - adding a page or text to the template - the template is one page with some styles and a text box placed on page 1. Here's my code for Pages:
tell application "Pages"
   make new document with properties {template name:"DeveloperGuide"}
   tell front document
       set bodyText to body text
       return bodyText
   end tell
end tell
It's been a while since I've used AppleScript and I've never scripted pages so I'm not sure if this is the right approach. It's nice to see that after two years the notoriously ill documented AppleScript dictionaries still exist. Anyway, my return from the code above is "missing value".
Any help would be appreciated.

Are you aware there are two types of templates in Pages? Word processing and pages layout?

Similar Messages

  • Prestaged Content and new Content Versions

    I have a question concerning prestaged content in an SCCM 2012 R2 Environment. I have created several prestaged content files of some very large Applikations and Software Update Packages. In the meanwhile some of the Software Update Packages
    have a new Content Version, because some expired Updates where removed from the Package.
    So, if I now extract those Update Packages on a Distribution Point, the Content is not getting registrated as successfully distributed in the Content Monitoring Workspace, because the Content Version has increased in the meantime. I can
    see that after Content is extracted successfully, the success Status Message is send to the Site Server, but the status stays on waiting for prestaged content.
    I can’t sent a new USB Stick with the newer Version of those files to those offices and I can’t send the whole new Package via WAN to those office. I there a way to only create something like a delta prestaged content file or send only
    the delta via WAN to those distribution point ?

    See scenario #3 here: http://blogs.technet.com/b/configmgrdogs/archive/2015/03/11/different-scenarios-for-using-prestaged-content.aspx
    Torsten Meringer | http://www.mssccmfaq.de

  • I added content to a document in Pages on my Mac last night, which was saved to icloud and this morning it was gone. Can I get my precious work back? Thanks

    Hello
    I added content to a document in Pages on my Mac last night, which was saved to icloud and this morning the additions were gone. Can I get my precious work back? Thanks

    Just thought I'd add my solution, I decided to go with WebDAV and I think it actually works better than the iTunes way, the steps are pretty much the same but avoiding the iTunes interface just makes things easier and faster.
    I followed this guide but it does have a small mistake in the httpd-dav.conf file, on line 2, where it's WebServer/WebDAV">, it should be <Directory "/Library/WebServer/WebDAV">.
    The tricky part is setting permissions which if wrong will give you errors when connecting with the iPad, I opted to set all to Read&Write since my home network has a hardware firewall. Another convenience was to add an alias to the webdav share on the Desktop.
    I'm still expecting the call from Apple but even if they fix the iTunes I'm sticking with WebDAV, atleast until I see what's new with iOS5 and iCloud this fall which should bring true sync for documents (I'm hoping that they will offer encryption with my own keys, if not, then I'll probably keep using WebDAV).

  • Why page is being unpublished when moving from Manage Content and Structure ?

    Hello,
    I am getting strange behavior in Manage Content and Structure as below :
    when I move published pages from site 1 to site 2 , all moved pages in
    site 2 are being unpublished !!
    and mention below status :
    Status: Checked in and viewable by authorized users.  
    how to move pages from
    Manage Content and Structure so that I don't need to publish the moved pages manually ?
    Thanks and Regards,
    Dipti
    Dipti Chhatrapati

    http://www.dotnetspark.com/links/28950-move-page-site-content-and-structure-alters.aspx
    http://social.technet.microsoft.com/Forums/en-US/c614408f-d6cf-4d8a-9ab0-46b2ef405824/move-page-in-site-content-and-structure-alters-revision-history-and-makes-old-content-available?forum=sharepointadminlegacy
    This is a default behavior as a new content is added to site 2 with a different metadata so it is marked as unpublished

  • Content And Structure Page Missing Content And Structure Report Views

    Hello,
    In our Sharepoint 2013 farm, we have a site colllection with Turkish Language Pack.
    When Farm admin displays the Content And Structure page, he has access to all
    Content And Structure Reports from the View menu.
    Howeverall other users including site collection admin
    could only access to default view from the view menu.
    Content And Structure Reports list can be displayed by those users.
    I checked the permissions, sharepoint logs with verbose level and event logs but had no clue at all.
    Is there any points that should be checked?
    Kind regards
    Serkan

    http://www.learningsharepoint.com/2014/01/28/users-only-see-default-view-in-content-and-structure-in-sharepoint/
    To resolve the issue, I started by checking the following :
    1. If the Publishing Features on the site Activated – The Publishing features were enabled on Site and Site Collection levels.
    2. Does Site Collection Admins or another user see the Options – Only Site Collection admins were seeing the extra Options. Other users like with Contribute Permissions and even Full Control would not see the Options.
    3. Lastly, I checked if the Users who are trying to Access the Views in Content and Structure tool had Contribute Permissions on the site –
    All users who were experiencing these issues had Contribute Permissions on the site.
    So after looking at the above facts, I realized that something is wrong with the permissions on the site and that is restricting these users to see all the View Options as seen by Site Collection admins.
    Solution – While checking the permissions I found out that the Top-level Site Collection had NT authenticated users added to it but with a “Limited Access” assigned to it Instead of the required “Read”. Switching the permission for NT authenticated users
    (or users who had this issue) to “Read” fixed the problem.
    So the moral here is that if in case your users are not seeing any Options other than “Default View” in Content and Structure View drop-down, try giving them at least “Read” permissions at the Site Collection or top-level to make other Options Visible.
    If this helped you resolve your issue, please mark it Answered

  • Using Site Content and Structure unable to move documents,pages and getting weird error message

    Hi ,
    earlier we are moving a page ,document from one site to another sub site with in the Site Collection.
    Now,we are getting a un-readable format error.
    After selecting the destination we are getting the error.
    and the file can't move.
    What might me be the error.
    Expecting answers related to my question.
    1.As we can do using Internet Explorer,
    2. Using Send To also we can move.
    Using this Site Content and structure we can maintain Versoining also.
    If any one face the same issue then we can easily find out the solution.
    Regards ,
    Prathap 
    SP Developer
    Specify the destination to move the items you selected.

    Hi,
    Using Site Content and Structure unable to move documents,pages and getting weird error message
    We are getting Below error:
    When Moving Document items from one site to another site in the same site collection using Site content and structure(But it's working in same site,we can move documents from one library to another library)
    1576|/wEWwwECuLLErw0Cy+nFYwK84baBAgK6zNqsAgLs0Le0BQK1s8uaCAL5qrm3CAKk7K6pDwKo9a0GArm+xr4NApKe9KUKAoajpK4CAqqU/2sChJXBtAIC052rYQKS+LTPAgLe+7uQAwLO0re/BwLgoaw2AojAlIMOApSO4JoNAuvW7MoKAojz2P4OAuOMt9EGAv/ns1wC64qI7gEC0LymmAcCro3lnQkCj7viwAsC8Met9QEC3a/DHALg4ZO6AQKAn8ebCALvr72DAwKm/NGmAgKN4aayCQLmmczsCgL+46qSAQKH7paCDgLouOHjDwKGuNCBCQKwuob2CQKP78n3BwLQ7vSYCALxlcvIBALRuajXAwK6/vr4AwKx8YasCQLti5igAQKay7JZAta625IFAuTy6rUKAvnC7eQKApvB3ugPAoTBua8BAoy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pbGsDALMtKmxBwKPpvCmBOAFHtmBuG3iNmIT9fQ8Z1TWMpjZ122|cccccccccnncnnnnn|

  • Problems using Content and Structure to move pages

    I am developing a public facing website using SharePoint 2013. The site uses the management metadata friendly URLs. The site consists of a site collection with half a dozen sub sites. I am wanting to move some pages from one sub site to another. So I have
    been using the Site Content and Structure under Site Settings. I select the pages to move and then select move and select the other sites pages library. Many times this is failing, sometimes leaving a copy of the page in both sub site's pages library, other
    times not moving the file at all. The most frustrating thing of all though is that it never fixes up the managed metadata navigation terms. So I am having to go through and move the term and all it's children that relate to the pages I have moved. Then I have
    to manually edit each one to have the URL to the correct sub site after the move!!! Occasionally doing the move seems to delete the term completely from the term store. This is so frustrating.
    The content and structure move tool at least fixes up links within the pages. But it really should fix up friendly URLs too.
    Is there something I am missing? Is there a recommended approach for moving pages from one sub site to another?

    Hi Vertigrator,
    may i know your sharepoint latest cumulative update? i would like to check if this issue only happens on the specific environment.
    please help me to confirm, if the steps, more likely:
    1. navigate to site actions->site settings-> site content and structure
    2. select the site that need to be moved, in the drop-down arrow of the site select "move" or "copy".
    3. select the destination.
    do this path are also able to give the same result as the steps? http://yoursite/_layouts/sitemanager.aspx
    and please do restart your "sharepoint server Publishing infrastructure" at the "site collection features".
    as i know, sharepoint sites are not actually moved from one location or server to another, rather they most likely backed up to a file and then the content or site is re-created from the backup file.
    example at 2010:
    http://www.coretekservices.com/2011/10/20/sharepoint-2010-how-to-move-a-subsite-to-a-different-location/
    http://blog.netnerds.net/2011/03/sharepoint-move-a-subsite-to-another-site-collection/
    Regards,
    Aries
    Microsoft Online Community Support
    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.

  • On Sympatico homepage, my local weather and news does not come up unless I refresh the page. But when I return to the homepage during the same session, local news/weather is gone again. Is this correctable?

    When I first open the browser and it goes my homepage, Sympatico.ca, there are 2 areas of the homepage you can personalize. On the left hand side "News" Column, the bottom box "Local News" allows you to select a location (Toronto, Ontario Canada for me) to display news from that area. On the far right hand column, below the advertising bar, is "Weather" where you select your city (Brantford in my case) and it will display the 4 day forecast in C or F degrees. Once you close the homepage the settings are saved. The problem is that when I leave the homepage to any other website, if I return to the homepage the weather and local news is back to the default setting of having to select the city again. I did find if I just refreshed the page, the personalized settings appear. I have Firefox 4 and it seemed to correct the problem when I installed 4 as the same problem had been occurring with my previous version of Firefox. But now it's back to having to refresh the page to get the saved location for local weather and news. My wife uses IE8 on the same PC and has not had this problem on her Sympatico homepage.

    aha!
    Wed Feb 14 12:29:16 2007
    PUSH:
    Received control message:
    'PUSH_REPLY,
    route 192.168.100.3 255.255.255.255,
    route 192.168.1.0 255.255.255.0,
    route 192.168.3.0 255.255.255.0,
    route 172.16.0.0 255.255.0.0,
    route 10.123.123.0 255.255.255.0,
    redirect-gateway,
    dhcp-option DNS 172.16.70.12,
    dhcp-option WINS 172.16.70.2,
    dhcp-option DOMAIN timberline.int,
    route-gateway 172.16.70.254,
    ping 10,ping-restart 120,
    ifconfig 172.16.70.216 255.255.255.0'
    The ifconfig line the server is pushing is not right. That is meant for a point to point connection. That is why the local client is puking on it...it is not correct. At least for a tun type device. If it was a tap, then it would be fine.
    http://openvpn.net/man.html
    (look for "--ifconfig l rn" )
    so.... change the line to dev tap, and then do this stuff..
    http://wiki.archlinux.org/index.php/OpenVPN_Bridge

  • Pass parameter through standard page "import xml content and actions"

    Dear Portal experts,
    As you know, a standard portal page is configured to allow the import of XML file. It is located in the portal in the path system admin -> transport -> xml content and actions -> import
    I configured a quick link u201Cimportu201D to the page so now the link http://myserver:port/irj/portal/import allows me to access directly to this screen.
    What I would like to do now is to pass the parameter related to u201Cfile nameu201D through this screen meaning that I would like that http://myserver:port/irj/portal/ import/filename=C:\test.xml  fills automatically the fields u201CXML fileu201D with  C:\test.xml 
    Please do you know how to achieve this ?
    Thank you very much and regards

    hi,
    @Maksim :
    When user launch an URL like http://myserver:port/irj/portal/ import/*filename=C:\test.xml, he is requested to provide username and password; as this link is a shortcut for the upload xml page, there is a check of authorization and only portal admin that have authorization and permission on this page/iview will be able to upload xml file through the URL. Hope this clarify.
    @Kumar :
    thank you for your answer. What a pity to not be able to pass parameter through standard portal page/iview particularly knowing that we can pass paramater through many kinds of iviews (transactional iview, url iview, VC iview...). I explored some option on file com.sap.portal.ivs.init.par but this was unsuccessful. However, thanks to this [link bellow|http://wiki.sdn.sap.com/wiki/display/Snippets/ComponenttouploadXMLfilewithPCD+objects], I was able to upload through URL the XML file.
    The problem is that I can upload only XML file that are stored in the server not in the local user computer. My requirement is to be able to upload local XML file stored on user's computer.
    If someone could provide and idea/solution, I would be very grateful.
    Cheers

  • I had erased all contents and settings of my iphone 3G,it had stucked on apple logo,I found that it needed to be restored,i tried to restore  but each time i try to restore,error 1015 occurs,I tried all solns in support page ?

    i had erased all contents and settings of my iphone 3G,it had stucked on apple logo,I found that it needed to be restored,i tried to restore  but each time i try to restore,error 1015 occurs,I tried all solns in support page ?

    punknotdead11 wrote:
    what if my iphone isn't  jailbroken/hacked?
    Then you will not get error 1015, the error will be some other number.
    http://support.apple.com/kb/TS3694#1015

  • HT5957 How if even poss do I go back to old pre 7 O.S. My vision is impaired and new O.S.7 is difficult at best to see clearly and now can't zoom favorite web pages!

    How if even possible do I go back to pre O.S.7 after wi-fi update? My vision is impaired and new O.S.7 is difficult to see and I can no longer zoom my fav web pages? I backed nothing up of coarse and I don't have access to my desk top not that it would run for 10 mins without crashing? Help! Going blind!!

    Sorry, you can't downgrade. Look: Settings>General>Accessibility...things like Bold Text...see if any changes here will help.

  • Yahoo is my home page and News, Sports, Business links now shows a few sentences after each main URL link. How do I put it back to show just the URL links?

    Yahoo is my home page and News, Sports, Business categories/links changed and now shows a few sentences after each main URL link/topic. How do I put it back to show just the URL links/topics without having to scroll down and down the page. All the extra sentences after the links causes too much scrolling to view the topics.

    Those steps did not solve my problem. Here is an example of what I see although it's not exact copy/paste. All I want to see are the links but I get all the verbiage after the links
    Firefox 17.0.1 version
    ''' '''Ask Stacy: How Can I Rebuild My Credit?''''''
    Here’s a question familiar to millions of Americans… Stacy, My wife and I recently filed for bankruptcy due to high medical bills we were unable to pay. We purposefully didn’t add our Wells Fargo credit ...
    Money Talks News
    '''Analysis: High stakes for Cuba in Chavez's cancer battle'''
    HAVANA (Reuters) - As Venezuelan President Hugo Chavez recovers in Havana from his fourth cancer operation, Cubans face renewed worries about their economic future if the country's top ally dies or has to step down from office. Cuba has staked its economic well-being on the success - and generosity…
    41 mins agoReuters
    [$$] Playing FICC or Treat With Bank Investors
    '''Playing FICC or Treat With Bank Investors'''
    The Wall Street Journal
    AdChoices
    '''Cybergeddon
    A digital crime thriller from Anthony E. Zuicker, the creator of CSI. Only on Yahoo!
    And here is what Internet Explore shows: All LINKS below
    '''Molten gold signals mining's return to Calif.'s Mother Lode'''
    '''Century-old fight for Budweiser name hits new snag'''
    '''NRA goes silent after Connecticut school shooting'''
    '''.Authorities: Kansas man who killed 2 cops dies'''

  • AVG tried to take over the Firefox Program. I unchecked some stuff on AVG and now Firefox doesn't lool right. There is only a bar at the top of the page with "Firefox" and "new Tab" . How do I get the Firebox homepage back?

    AVG tried to take over the Firefox Program. I unchecked some stuff on AVG and now Firefox doesn't look right. There is only a bar at the top of the page with "Firefox" and "new Tab" . How do I get the Firebox homepage back?

    Google Toolbar Options, in the Search tab, make sure that '''Enable the Google new tab page''' is check-marked. If that doesn't fix it for you, see this for support information about the Google Toolbar. <br />
    [http://www.google.com/support/toolbar/?hl=en] <br />
    Or visit the Google Toolbar forum. <br />
    [http://www.google.com/support/forum/p/Toolbar?hl=en]
    As far as your UserAgent showing Firefox 3.0.11, see this: <br />
    https://support.mozilla.com/en-US/kb/Websites+or+add-ons+incorrectly+report+incompatible+browser
    You might want to consider getting rid of that '''desktopsmiley''' program that has messed up your UserAgent, it is known as Malware.

  • Quick search and New buttons on master - detail pages

    Hi
    When I generate master-detail pages, the master has quick search and new button, but detail's doesn't. How can I generate the detail with quick search and new button options?
    Thanks in advance
    Liceth

    Liceth,
    Only one group within a page can have Quick Search functionality.
    A New button is generated for a group when insert is allowed and the layout style includes a form layout page (table-form, select-form, form or tree-form)
    Steven Davelaar,
    JHeadstart Team.

  • I'm having problems with Twitter loading up a completely blank page and no longer displaying content and with Bloomberg not playing videos

    I'm having problems with Twitter not loading up content and showing me a blank page. I've tried to empty the browser cache but it doesn't seem to work.
    I also have issues with Bloomberg not playing videos

    Try clearing cookies and cache:
    [[How to clear the cache]]
    [[Deleting cookies]]
    Otherwise use firefox in [[Safe Mode]];
    Also try [[Troubleshooting extensions and themes]]

Maybe you are looking for

  • HP 1215 Printing Problem

    I cannot get anything apart from 80gsm plain to print on my 1215 printer. As soon as I try any photo paper gloss or matt it appears to slip and slide and then gets jammed. Any ideas/help would be much appreciated

  • How to set the cookie or session of one domain to another domain

    Hi, I am using tomcat server. I am facing a issue of session lost when I am moving from one domain to another domain. e.g. http://mydomain.com/ to http://a.mydomain.com. Is there any way to set the cookie or same session to sub domain in tomcat. Plea

  • Where are the "Organizer" files from PSE 11 stored on a mac?

    I have lost all my albums from my PSE 11 (Mac, using Mountain Lion) -- the album names are there but not the files within the albums.  I tried the reconnect and the computer just went crazy.  Seeing as I did a Time Machine back up of all my files yes

  • Facelets guidance needed

    I have searched lot about facelets with eclipse . But i got application with NetBean. If any one having application or guidance. How to make web application through facelets in eclipse. Please guide me Regards Naresh Vatsal

  • PAL Presets for Blu Ray

    i have a project shot on the Sony EX1 at 1920 x 1080 p. I want to export using ADOBE MEDIA ENCODER to 1920 x 1080 progressive 25 FPS. Most options are for US standards, when I click PAL it only offers interlaced. If 1920 x 1080 Progressive 25 fps is