Get bounds of document using applescript

I am after getting the bounds of the document in Pages.  I am aware one can use the window object to get the bounds of the window but I am after the bounds of the document  itself.  This can obviously vary when the 'Notes' pane is open etc so I can't just use the bounds of the window.
Any ideas?
Thanks in advance, Andy

Hi Andy,
Are you looking for the paper size? Then the following code should do the trick:
tell application "Pages"
    set {theWidth, theHeight} to {width, height} of page of front document
end tell
{item 1 of theWidth, item 1 of theHeight} --> {8.5, 11.0} for instance

Similar Messages

  • How do I copy/duplicate a photoshop layer from one document to another document using AppleScript?

    Most likely I don't have the syntax correct. My task is to copy a layer in an existing Photoshop CC document (with a button, for example) to a new photoshop document. Just a simple working example should get me going on the right track. Do I use "duplicate" or copy? Thank you.

    Thank you so much for your reply Peter
    I have no idea what those brackets meant, I've followed your recommendation and my problem is fixed now.
    Kind regards
    Mariano

  • Get Hardware (Mac) Address through Applescript

    Hi All,
    How can I get Hardware (Mac) Address using applescript. Please tell me how can I do it. I have searched in the dictionary but I found nothing there.
    Why I need it, I have developed some tool for InDesign & Quark User. I want to add the mentioned module in my application, so that as user will run the tool it will first validate the Hardware address, and if it match then application will run otherwise it will show a piracy message.
    Thanks
    Rajeev

    >get if addr en0 failed, (os/kern) failure
    Then you don't have an active interface. You can't use ipconfig to query an interface that isn't up.
    You need to decide how you want to deal with this - you won't know in advance what interfaces the user may have active. For this reason, relying on the MAC address is inherently problematic. You might be better off using the system's serial number (which is less likely to change anyway):
    <pre class=command>set serialNum to do shell script "system_profiler SPHardwareDataType| awk -F: '/Serial/ {print $2}'"</pre>

  • Using applescript to get iCal to open a file

    I'm trying to use AppleScript to get iCal to open a Word doc at a specified date/time.
    As a complete novice to AppleScript, I'm sure I have misunderstood how the syntax and grammar of the language work. Would you please advise me how to change this script --
    set filepath to POSIX path of "Microsoft Word:Users:mtmanner:Documents:Family JY & Friends:Craig:Craigs Goals:Socializing:Being with people.doc"
    try
              set command to "open Users/mtmanner/Documents/Family JY & Friends:Craig/Craigs Goals/Socializing/Being with people.doc"
    do shell script command
    end try
    Thanks for your help.

    There is a useful book called 'AppleScript for Dummies'. Don't be put of by the irritating title: it's actually quite sensibly written and informative (just ignore the occasional facetiousness designed not to frighten nervous readers off). When I was looking for a manual the other books available were much more expensive; I've found this one covers most requirements.
    We had three weeks of heatwave: not it's gone unsettled again with rain (which we needed) and temperatures up and down loke the proverbial yo-yo - typical British summer, in other words.

  • Posting period 011 2013 is not open while posting the document using F-02 getting the error

    Hi SAP Captains,
    Pls help me here.
    While posting the document using T-code F-02 getting the error "Posting period 011 2013 is not open.
    Please help me how to do, can you provide step by step.
    Rgds..Suresh

    Hi Suresh,
    You can search google and will get number of posts on this. This will lead to duplication of similar posts on forum.
    The message says "FI posting period is closed for 11th period of 2013". In which period you are trying to post the transaction?
    If it is past, open the FI posting periods in OB52.
    BR, Srinivas Salpala

  • How do I get the actual signature to show in a document using XI?

    Been using Adobe for years and with the new update to XI I am having a heck of a time getting the signature to show in the document.  To check this I opened another document and was easily able to grab my signature and place it where I want.
    For some reason the document I was sent allow for me to sign electronically, but when I choose to do so, I'm asked first to draw a box to where the signature is to be placed, then another dialog box opens asking for the file.  I was not able to find a place to add a new signature by using the methods used previously.  I have a signature in a file and has been used many times for other .pdf docs with zero issues.
    Not sure why this doc is giving me issues.  The document sent to me is showing its from Adobe 7.x! Not sure if that is the issue, as it could be the problem placing the signature.
    Please advise to try and get this resolved.

    Hi,
    I assume when you say "another pop up" you really mean that your seeing this dialog...
    Let's start with some nomenclature so we are on the same page. What you are trying to do is create a "digital signature" and in order to do that you need a "digital ID". To think of this in physical world terms, the PDF file is a piece of paper, the digital ID is the pen and the digital signature is, well the signature. In order to create a digital signature you must have something to sign with, and that something is a public-key based digital ID. This digital ID can reside in several places. It can be in a password protected file and the file would have either P12 or PFX as the file extension to the file name. The digital ID could be locked onto a token or smart card, in which case you would get access to it using a PIN instead of a password. It could also be locked into the Operating System. On Windows that would be the Windows Certificate Store (think of "store" in this case as storage, not a market place), and on the Mac it would be the Keychain Access application.
    So the question is, do you currently have a valid digital ID (they do expire) or do you need to procure one? My guess is you need to procure a new digital ID and this is where you are being tripped up.
    If you do need to procure a new digital ID, the next question is, do you need to get a high assurance digital ID from a trusted 3rd-party Certificate Authority (you, as the signature creator are the 1st party, and whomever you send the signed PDF file to is both the signature recipient, and also the 2nd party). The thing that makes a Certificate Authority (CA) trusted is because they will do identity vetting in order to ensure that you are who you say you are before they issue you a digital ID. When you get a digital ID from a CA you can think of it as a drivers license or password, not for what they allow you to do (drive a car or cross a border), but rather as a trusted and generally accepted piece of identification. Yes, a digital ID issued to you from a CA allows you to sign data just like a pen, but more importantly it acts as a trusted piece of identification. All that said, if you don't need a high assurance digital ID that proves you are who you say you are, then you can create your own digital ID. In that case the digital ID is really just a pen for signing and does not provide any trust regarding your identity. The advantage to creating your own digital ID is it's quick, easy, and free. The downside to getting a digital ID from a CA is it is time consuming and not free.
    Since your have started down the path of creating your own digital ID already let's finish with that workflow and leave it for later to see if that meets the identity requirements of whomever you are sharing the signed file with. If you are seeing the dialog above select the bottom radio button next to "A new digital ID I want to create now", and then click the Next button. The contents of the next dialog you see is as dependent on whether you are on Mac or Windows. On Windows the next dialog asks you where you want to save the digital ID, either in a password protected file, or in the Windows Certificate Store. If you select the File option you will be asked to provide the password every time you sign a PDF file, whereas with the Windows option when you log into Window that provides the authentication to access the private key in the digital ID and thus when you sign a PDF file you won't be asked to provide a password. If you are on a Mac since saving the digital to a file is the only possible option this dialog is skipped. The next dialog is where you enter the information that you want contained in the digital ID that identifies you as the signer. If you've already filled out the Identity panel on the Preferences dialog then that data will be pulled in, but if not you you are going to need to add at a minimum a Name and an Email address, and then click the Next button. If you are saving the digital ID in a file, the next order of business is to pick a location where you want to save the file you are about to create and assign it a password to protect the private key from unauthorized access.  You're now on the last dialog for digital ID creation so you can click the Finish button.
    This takes you to the Sign dialog. If you already had a valid digital ID to sign with you would have seen this dialog right after you inscribed the signature field and would have shipped all of the digital ID creation dialogs. If you saved your new digital ID in a file the Sign dialog will ask you to provide the password you just used (don't forget this password because you'll need it when you want to sign files at some later date). Enter the password and click the sign button. You'll be asked where you want to save the signed file (you can overwrite the existing file if you like, or you can save it as a new file), and once you've done that you'll have a digitally signed PDF file.
    Steve

  • I can not open documents using adobe reader because I have to accept "end user agreement".  How do I get to agreement?

    I can not open documents using adobe reader because I have to accept "end user agreement".  How do I get to agreement?

    thx but the only thing that happens when I open Adobe Reader is that a small icon appears in the bottom-line. There is no dialogue box where I can accept!

  • How to get the active document file name using illustrator CS2 plugin code?

    I wanna take file name from active document using illustrator plugin CS2. Plz anybody help me..
    Thanks in advance..

    AIDocumentSuite::GetDocumentFileSpecification() should get you that information. Note that it will only work properly if you've already saved the document (or opened it from a file). I'm not sure what the result looks like if you're calling that on a new, unsaved file.

  • How do i get my team to all see the same say, ID, document using the cloud?

    how do i get my team to all see the same say, ID, document using the cloud?

    Adobe Max was a smoke and mirror show and they demonstrated "Folder Sharing" so we bought into it. Myself and 7 of my clients. After the Max show they turned it off like nobody would notice. Two weeks after they stopped the folder sharing feature they put a little notice that they had did this. Nice how they treat their loyal customers. Every month they charged us an extra $20 over a single account without the folder sharing. What good is "team work" if you can't share a folder of files. Sharing a single file at a time is a waste of time.
    After a year still no folder sharing but the same old story of "soon". Adobe is using the extra money they are "stealing" from paying clients to pay for this development. We are being forced to pay the extra money again for another year as there is no way to downgrade to a single user account. Adobe likes to use this as an excuse to continue to rob and steal from loyal user that have no choice but to deal with these crooks.
    My only suggestion is for new users not to buy the team account package. There marketing material is filled with misleading statements that gives the potential new customer the impression that they can work in teams, as if a team can  work sharing single files. This is a sign that Adobe is about the cash grab and not about the quality of software and the end user experience.

  • How to get Folder or document service permissions  by using  KM API's

    Hi,
    Any help how to get Folder or document service permissions  by using  KM API's  
    Any help or hint is greatly appreciated.
    Thanks,
    Costa.

    Hi,
    I have tested it here and it works for me (this code lists the service permissions settings for folder /documents/temp/):
        RID rid = RID.getRID("/documents/temp");
        try {
          IUser user = (IUser) request.getUser().getUser();
          IResourceContext context = new ResourceContext(user);
          IResource res = ResourceFactory.getInstance().getResource(rid, context);
          IResourceFactory resourceFactory = ResourceFactory.getInstance();
          IRepositoryServiceFactory serviceFactory = resourceFactory.getServiceFactory();
          IAclService aclService = (IAclService) serviceFactory.getRepositoryService(res, IWcmConst.ACL_SERVICE);
          IResourceAclManager aclResourceManager = aclService.getAclManager();
          IResourceAcl resourceAcl = aclResourceManager.getAcl(res);
          boolean inheritedAcl = false;
          if (resourceAcl == null) {
            resourceAcl = aclResourceManager.getInheritedAcl(res);
            inheritedAcl = true;
          response.write("<strong>SERVICE PERMISSION OWNERS</strong><br>");
          IUMPrincipalList ownerList = resourceAcl.getOwners();
          IUMPrincipalListIterator ownerListIt = ownerList.iterator();
          while (ownerListIt.hasNext()) {
            IUMPrincipal ownerPrincipal = ownerListIt.next();
            String strPrincipal = ownerPrincipal.getId();
            response.write(strPrincipal + "<br/>");
          response.write("<br><strong>SERVICE PERMISSIONS</strong><br>");
          IResourceAclEntryList el = resourceAcl.getEntries();
          IResourceAclEntryListIterator it = el.iterator();
          while (it.hasNext()) {
            IResourceAclEntry entry = it.next();
            String strEntryPerm = entry.getPermission().getDescription();
            String strPrincipal = entry.getPrincipal().getId();
            response.write("<strong>" + strEntryPerm + "</strong> - principal: " + strPrincipal + "<br/>");
            IAclPermissionList plList = entry.getPermission().getMembers();
            IAclPermissionListIterator plListIterator = plList.iterator();
            while (plListIterator.hasNext()) {
              IAclPermission perm = plListIterator.next();
              response.write(perm.getDescription() + "<br/>");
        } catch (Exception e) {
          response.write(LogWriter.extractCallStack(e));
          LogWriter.traceSevere(LogWrapper.trace, e, LogWriter.extractCallStack(e), true);
    Romano

  • Getting errors while updating links in Indesign document using javascript

    Hi,
    We are updating the links in InDesign document using javascript. After running the script, we are getting the below errors in Adobe InDesign CC debug.
    When closing the document for first time we are getting the below mentioned errors,
    ASSERT 'fRefCount == 0' in c:\development\citius\source\components\database3\revisioneddatabase\SaLRICache.tpp at line 230 failed.
    Erased item list not empty at block delete time
    blockUID = 10486786 not freed
    Internal error: 904 items were leaked!
    After that we are opening the same document for second time, then we are getting the below mentioned errors,
    ASSERT 'ts_DBPubFile->PlacementUIDIsAvailable(uid)' in c:\development\citius\source\components\database3\revisioneddatabase\SaLRIUtils.tpp at line 195 failed.
    DB failed to create UID!
    ASSERT 'this->FindInIDRangeList(fLastCreatedBlockUID) >= 0' in c:\development\citius\source\components\database3\revisioneddatabase\SaLRICache.tpp at line 476 failed.
    ASSERT 'fLastCreatedBlockUID != kInvalidUID && fLastCreatedItemID != 0' in c:\development\citius\source\components\database3\revisioneddatabase\SaLRICache.tpp at line 467 failed.
    ASSERT '(SaLRIUtils<SnapshotID , SnapshotInfo>::ts_DB)->IsValidUID(itemUID)' in ..\..\..\source\components\database3\revisioneddatabase\SnapshotCache.cpp at line 55 failed.
    Please help us to solve this error in InDesign debug.
    Thanks,
    Vimala L

    You're probably better off raising this in the SDK forum.

  • How to: Close "Getting Playlist" using applescript ?

    Hi *,
    How is it possible to close the iTunes "Getting Playlist" Pop-up window using applescript ?
    Take a look at --> http://www.cronomik.org/t1.jpg
    I have tried to do the following, but iTunes doesn't act.
    tell application "System Events"
    tell application "iTunes" to key code 53
    end tell
    Any ideas of how to fix my question ?
    Stefan

    I have got it working with this script.
    If iTunes Pop-up a message, I press a key on my remote control and the Pop-up message / Box disappears.
    tell application "System Events"
    tell process "iTunes"
    -- get the front window's name
    -- get the name of the front window
    set whichWindow to (get the name of the front window)
    -- Ergebnis: "Getting Playlist"
    -- display dialog result
    -- display dialog whichWindow
    -- Ergebnis: {button returned:"OK"}
    set whichButton to (get the name of the front window's button)
    -- Ergebnis: {"Stop"}
    tell whichButton of window whichWindow to key code 53
    -- set the contents of the button to key code 53
    end tell
    end tell
    In a terminal I have typed in "while true; do ./diut.app; sleep 2; done" to see what happend, if iTunes is front most and an iTunes message Pop-up.
    Solved by myself.

  • Albe to get a script working on a local machine. Can't on a Remote Mac using AppleScript

    Ok I was able to get the following code to work on a local Mac
    tell application "FileMaker Pro"
    name of every database
    end tell
    But when I tried to run it on a remote Mac using Applescript
    I got a syntax error of: "Expected class name but found identifier"
    I tried the following
    set RemMac to "eppc://10.1.2.3.4"
    set remoteApp to application "FileMaker Pro" of machine RemMac
    tell remoteApp
    name of every database
    end tell
    That didn't work, any ideas how I can use 1 Mac to check on another Mac's FileMaker's list of open databases
    Thanks

    Thanks Sherry, 
    This looks like it works perfectly
    I am just trying to understand how the times work.
    This is the snippet for a two hour maintenance window
     $a = Set-WmiInstance -Class CCM_ServiceWindow -Namespace 'ROOT\ccm\Policy\Machine\RequestedConfig' -PutType 'CreateOnly' ` -argument  @{PolicySource = 'LOCAL'; PolicyRuleID = 'NONE';  PolicyVersion = '1.0';  Schedules = '1D529B0010080000';  ServiceWindowType = 1;  ServiceWindowID = '8fa8c041-b6fc-4e3a-bd91-494af0e7f20d';  PolicyID = '8fa8c041-b6fc-4e3a-bd91-494af0e7f20d'; ` PolicyInstanceID = '8fa8c041-b6fc-4e3a-bd91-494af0e7f20d'}; $a.ServiceWindowID get-wmiobject -query "SELECT * FROM CCM_ServiceWindow" -namespace "ROOT\ccm\Policy\Machine\RequestedConfig"
    The things change are 'schedules','ServiceWindowID' , 'PolicyID' and 'PolicyInstanceID' and they seem to change, even when the same time is set e.g. create a 2, 3 hour service windows 
    Whilst getting the string is easy to work out using client centre. I am really curios to find out how these values translate to 1,2 and 3 hour service windows. The SDK doesn't shed a great deal of light on the subject (well not that I could find)
    Regards, Martin

  • Getting Error:Digitally Signing documents using Acrobat SDK

    I am using following API's to digitally sign a document using Acrobat SDK but getting error(return code -2) while making a call to folllowing API DigSigCommitSigRefDict(ASAtomFromString("DocMDP"), tempDict, &pOutRefDict);
    What am i missing?
    Here's my code.
        CosObj sigDict = CosNewDict(cosDoc, true, 1L);                         //Signature Dictionary Cos Object
        CosObj  sigRefDict= CosNewDict(cosDoc, true, 1L);                    //Signature Reference Dictionary Cos Object
        CosDictPut(sigRefDict, ASAtomFromString("TransformMethod"), CosNewName(cosDoc, false, ASAtomFromString("DocMDP")));
        CosDictPut(sigRefDict, ASAtomFromString("Type"), CosNewName(cosDoc, false, ASAtomFromString("SigRef")));
        refArrayObj = CosNewArray(cosDoc, false, 1L);                         //Reference array object inside signature dictionary
        CosArrayInsert(refArrayObj,1, sigRefDict);
        CosDictPut(sigDict, ASAtomFromString("Reference"), refArrayObj);
        CosDictPut(sigDict, ASAtomFromString("Type"), CosNewName(cosDoc, false, ASAtomFromString("Sig")));  
        CosDictPut(sigField, ASAtomFromString("V"), sigDict);               //SigField is an AcroForm object
        DSSigRefDictParamsRec myDSSigRefDictParams;
        myDSSigRefDictParams.size = sizeof(DSSigRefDictParamsRec);
        myDSSigRefDictParams.cosDoc  = PDDocGetCosDoc(pdDoc);
        myDSSigRefDictParams.rootObj   = cRoot;
        myDSSigRefDictParams.sigDict   = sigDict ;
        myDSSigRefDictParams.transformMethod   = ASAtomFromString("DocMDP");
        //myDSSigRefDictParams->transformParams   =
        myDSSigRefDictParams.bIndirect    = true;
        DSSigRefDictErrParams errParams;
        DSRetCode retCode = DigSigNewSigRefDict(&myDSSigRefDictParams,errParams);
        CosObj pOutRefDict;
        retCode = DigSigCommitSigRefDict(ASAtomFromString("DocMDP"),sigDict , &pOutRefDict);
        retCode = DigSigFinishSigRefDict(ASAtomFromString("DocMDP"), sigDict , pOutRefDict,errParams);
    -amit

    Thanks for the tip George. I'm using Acrobat Pro X to create a form. Can you tell me how to make the form reader-enabled so that it can be digitally signed?
    Josh

  • Getting Selected Project in Aperture using AppleScript

    Is it possible to get a reference to the currently selected project in Aperture using AppleScript? In other words, is it possible to get the project containing the currently selected image (which I can get by using "selection")? If possible, how can I do it?

    GIve this a try:
    tell application "Aperture"
    set x to selection
    set x to item 1 of x
    tell library 1
    get value of other tag "MasterLocation" of x
    end tell
    end tell
    One thing that helps to answer similar questions is to ask for properties of objects. That can reveal more about an object. Another way to help answer these kinds of questions is to ask for available tags in Exif, IPTC, and "other tags" of a particular image version. That will tell you all the available tags that have values assigned for a particular image version. You can then explore those tags to see if what you are looking for is available.
    Hope that helps.
    Message was edited by: lenny

Maybe you are looking for

  • Flex 3: DataGrid Column width on resize

    Hello experts, I am facing an issue with width of DataGrid columns. We are using Flex 3.2. I am setting the widths for columns in creationComplete handler of DataGrid. When the browser window is resized, say restore down and then maximize, the column

  • New T-code For GL posting(F110)

    Hello All, There is a Tcode F110 for Payment proposals (Accounts Receivables, Accounts Payable, Treasury modules) for old GL posting. Now SAP had introduce a new T-Code for NEW GL (General Ledger) posting. Can any one Tell me the New T-code. It's Ver

  • Commitment carry forward

    hi gurus we just entered a new fiscal year and when we try to change orders created in the old fiscal year we get an error saying "Old FM line items 0010124941/00001 could not be found'. please advice.

  • Authorization group in Gl account

    Hi friends, In Control tab in FS00 there is a field called Authorzation group which i think restrict the users for the GL Account. where i can create this group and how can i assign this group to a particular user to restrict a particular user from u

  • Problem Please open the Vi named popup

    Hello I have a problem opening a certain vi when I open a vi lets say "Main.vi" labview popsup a "Please select the vi named: Main.vi" this is a little strange for me. normaly you gets this message if a certain subvi or control cannot be findt in the