1 2 3 4 5 Previous Next 66 Replies Latest reply: May 3, 2009 6:07 AM by lbrookins Go to original post
  • 15. Re: AppleWorks drawings to Pages.
    woodsbr3 Level 1 Level 1 (0 points)
    Hi again

    I've put these files from the updated download into the places stated:
    "HD:Users:YourUsername:Library:Scripts:My Progress Bar script.scpt"
    "HD:Applications:Utilities:My Progress Bar.app:"

    I then double clicked the file draw2pages.aplescript, went to File - chose Save as and chose Application bundle and its then when I click on save that the syntax error happens. No doubt I'm making some simple mistake somewhere??
  • 16. Re: AppleWorks drawings to Pages.
    Level 8 Level 8 (41,760 points)




    If the script doesn't appear 'styled' in the Script Editor window but looks like:


    It's because one component is missing.

    My guess is that you are trying to save the version designed for both operating systems.
    AppleScript is unable to guess what you want to do.

    When a script (like the original one) contains calls to different applications, (here "Extra Suites.app" and "My Progress Bar.app") it refuses to compile if one of them is unavailable.
    This is why I built OS specific versions which are now available on my iDisk.

    Yvan KOENIG (from FRANCE mardi 14 avril 2009 14:00:03)
  • 17. Re: AppleWorks drawings to Pages.
    woodsbr3 Level 1 Level 1 (0 points)
    Hi

    Everything is exactly where it should be as per your screenshots. Yes - my problem is that it doesn't look "styled" . The file I downloaded from your idisk was "AWdraw2iWork.zip". I then copied from the "for MacOS X 1056" folder both the my progress bar script and the my progress bar app to the correct places. I opened up the my progress bar script to make sure that is styled and my applescript is working properly - by the way my applescript editor version is 2.2.1, and the script is styled properly. I then opened the draw2pages script (from the 10.5.6 folder) and when it is opened, it's not 'styled' as you suspected. The script file itself does say "The version is dedicated to MacOs X 10.5.6 and higher" so I'm opening the correct one - even double checked my OS was 10.5.6 on my Mac as well so I'm really at a complete loss.

    Brian
  • 18. Re: AppleWorks drawings to Pages.
    Level 8 Level 8 (41,760 points)
    What are you getting if you click the button "Compile", the one with the Hammer ?

    I wish to add that
    (1) I discovered that I erroneously swapped instructions setting the paper size.
    (2) I was able to build a MacOS X 10.5.6… version using a single auxiliary tool.
    So a new archive is available on my iDisk.

    Yvan KOENIG (from FRANCE mercredi 15 avril 2009 11:58:47)
  • 19. Re: AppleWorks drawings to Pages.
    woodsbr3 Level 1 Level 1 (0 points)
    Hi

    When I click on Compile, an error message comes up saying "Syntax Error Expected end of line but found property". It highlights the word 'version' that I've highlighted below. If I delete out the script this section about an old version of appleworks, the syntax error then happens again further down in some same sort of thing ie version warning. I deleted that again to see if it would clear the problem but then got another syntax error saying "Expected "given","with","without", other parameter name, etc. but found identifier. It highlight the word "objects" as I highlighted below in my second copy/paste from the script.

    tell preferences
    set oldVersionWarning to old version warning
    end tell
    -----------------------------
    On groupe tous les objets pour les copier en une seule fois *)
    select document nomDuFichierGR
    tell document nomDuFichierGR
    set coGo to count of graphic objects
  • 20. Re: AppleWorks drawings to Pages.
    Level 8 Level 8 (41,760 points)
    Are you sure that AppleWorks is installed on your machine ?

    Yvan KOENIG (from FRANCE vendredi 17 avril 2009 09:44:07)
  • 21. Re: AppleWorks drawings to Pages.
    fruhulda Level 6 Level 6 (15,110 points)
    To me it is new news! Thank you! I had tried but always got the inedible version in Pages.
  • 22. Re: AppleWorks drawings to Pages.
    Level 8 Level 8 (41,760 points)
    Hi, it seems that there is a typo so I don't understand what you wrote:

    To me it is new news! Thank you! I had tried but always got the inedible version in Pages.


    To help those which aren't accustomed to AppleScript, I put a new archive with pre-compiled scripts in my iDisk.
    <http://idisk.me.com/koenigyvan-Public?view=web>

    Download:
    For_iWork:iWork '09:AWdraw2iWork_Compiled.zip

    Yvan KOENIG (from FRANCE samedi 18 avril 2009 17:42:43)
  • 23. Re: AppleWorks drawings to Pages.
    fruhulda Level 6 Level 6 (15,110 points)
    Yvan, I answered to the first post in the thread. I was only very late to do it! I didn't comment your scripts.
  • 24. Re: AppleWorks drawings to Pages.
    Roger Wilmut1 Level 9 Level 9 (65,525 points)
    Trying to save either script as an Application Bundle I get:

    Syntax Error
    The || handler is specified more than once.
  • 25. Re: AppleWorks drawings to Pages.
    Level 8 Level 8 (41,760 points)
    Hi Roger

    Happily, my iMac "Intel inside" which was out of my home is back.
    I just discovered an oddity with scripts compiled on the PPC then open on the intel inside. I get also the error message.
    I knew that I had a serious reason to post only text versions but I didn't remember which it was.
    Now, I know.
    Good news, when I compile on the imac, the compiled scripts behave flawlessly on the G5 so, I will replace the archive by one created with scripts compiled on the imac.
    This version is now available !

    Yvan KOENIG (from FRANCE dimanche 19 avril 2009 19:52:57)
  • 26. Re: AppleWorks drawings to Pages.
    Roger Wilmut1 Level 9 Level 9 (65,525 points)
    Thanks: I can't look at it until Tuesday but I'll try to do so then.My iWork trial version expires on Wednesday and I haven't yet decided whether to buy it or not. I managed to get all my spreadsheets working in Numbers versions (though I was irritated to discover that there is no AppleScript for copy or paste so I had to use a System Events handler, and no 'select document 2' to change from one sheet to another - as you can do in AW - so I had to use QuicKeys). I'm still struggling with a couple or peculiarities in Pages: the real problem of course is the database one, as I don't really want to have to buy FileMaker Pro while AW still works.
  • 27. Re: AppleWorks drawings to Pages.
    Level 8 Level 8 (41,760 points)
    Roger Wilmut1 wrote:
    Thanks: I can't look at it until Tuesday but I'll try to do so then.My iWork trial version expires on Wednesday and I haven't yet decided whether to buy it or not. I managed to get all my spreadsheets working in Numbers versions (though I was irritated to discover that there is no AppleScript for copy or paste so I had to use a System Events handler, and no 'select document 2' to change from one sheet to another


    I don't understand.


    Tell application "Numbers"
    tell document "nameOfAdocument"
    --
    end tell
    tell document "nameOfAnOtherDocument"
    --
    end tell
    tell document "nameOfAdocument"
    --
    end tell
    tell document "nameOfAnOtherDocument"
    --
    end tell
    end tell


    works flawlessly.

    For the copy, paste…

    the easier soluce which I found is:


    tell application "Pages"
    tell document "theDoc"
    --
    my shortcut("Pages","ac") (*Select All, Copy)
    --
    end tell
    end

    tell application "Numbers"
    tell document _NumbersDoc to tell sheet _Sheet to tell table _Table to set selection range to range _Range

    --
    my shortcut("Pages","v") (* Paste *)
    --
    end tell

    --=====

    on shortCut(a, t)
    tell application a to activate
    tell application "System Events" to tell application process a
    repeat with i from 1 to count of t
    keystroke ((character i of t) as text) using {command down}
    end repeat
    end tell
    end shortCut

    --=====


    Yvan KOENIG (from FRANCE lundi 20 avril 2009 12:12:56)
  • 28. Re: AppleWorks drawings to Pages.
    Roger Wilmut1 Level 9 Level 9 (65,525 points)
    The first script won't work because I need to switch between two open documents which will have different names each time the script is run (making a new monthly accounts page, then copying info from previous month, so the two documents are different each month). In AppleWorks 'select document 2' brought the document behind to the front. I handle it by using QuicKeys to click in the appropriate places to operate the menu.

    The copy script: I'm doing this from memory (it's on the other machine which is currently off) but, having selected a cell in numbers, it's something like

    tell application "System Events"
    tell application "Numbers"
    keystroke "v" using {command down}
    end tell
  • 29. Re: AppleWorks drawings to Pages.
    Level 8 Level 8 (41,760 points)

    Tell application "Numbers"
    set document1 to name of document 1
    set document2 to name of document 2
    tell document document1
    --
    end tell
    tell document document2
    --
    end tell
    tell document document1
    --
    end tell
    tell document document2
    --
    end tell
    end tell


    For copy/paste/cut …
    I use the handler entitled shortCut so it may be called by every application for every function linked to a shortcut of the kind command_key + one_key.
    The one which you ^posted is not a 'copy' one but its 'paste' brother

    Yvan KOENIG (from FRANCE lundi 20 avril 2009 16:48:49)