• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: [AS] saving as AppleWorks 5
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [AS] saving as AppleWorks 5


  • Subject: Re: [AS] saving as AppleWorks 5
  • From: Yvan KOENIG <email@hidden>
  • Date: Thu, 9 Feb 2006 10:50:44 +0100


Le 9 févr. 2006, à 02:54, kai a écrit :


set fileName to "Test.cwk" tell application "System Events" to tell process "AppleWorks 6" set frontmost to true keystroke "s" using {shift down, command down} tell window "Save: AppleWorks 6" repeat until exists delay 0.2 end repeat set value of text field 1 to fileName tell pop up button 1 of UI element 1 of UI element 1 of UI element 9 click tell menu item "AppleWorks 5.0" of menu 1 repeat until exists delay 0.2 end repeat click end tell end tell click button "Save" end tell end tell


Thanks Kai but …

- 1 - you are using an english version so I had to make some changes to be able to test on french version.

property myApp : "AppleWorks 6 US" (it's the name of my US version)

set fileName to "Test.cwk"
tell application myApp
activate
set v to version as text
end tell
if "6." is in v then
tell application myApp
set nw to (name of menu item 6 of menu 2) as text
end tell
tell application "System Events" to tell process "AppleWorks 6"
set frontmost to true
keystroke "s" using {shift down, command down}
if nw is "Enregistrer" then
set nw2 to nw & " " (* I don't know if other versions put this space here *)
else
set nw2 to nw
end if
tell window (nw2 & ": AppleWorks 6")
repeat until exists
delay 0.2
end repeat
set value of text field 1 to fileName
get properties of every UI element

-- CAUTION, 9 is button "Cancel/Annuler"
tell pop up button 1 of UI element 1 of UI element 1 of UI element 9

tell menu item "AppleWorks 5.0" of menu 1
repeat until exists
delay 0.2
end repeat
click
end tell -- menu item
end tell -- popup
click button nw --"Save"
end tell -- window

end tell
end if -- if "6."


- 2 - it seems that you made a typo.
In the Save/Enregistrer window, UI element 9 is not the choose format menu but the Cancel/Annuler button


Yvan KOENIG

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: [AS] saving as AppleWorks 5
      • From: kai <email@hidden>
References: 
 >[AS] saving as AppleWorks 5 (From: Yvan KOENIG <email@hidden>)
 >Re: [AS] saving as AppleWorks 5 (From: kai <email@hidden>)

  • Prev by Date: Re: Determining the Default Mail App
  • Next by Date: Re: [AS] saving as AppleWorks 5
  • Previous by thread: Re: [AS] saving as AppleWorks 5
  • Next by thread: Re: [AS] saving as AppleWorks 5
  • Index(es):
    • Date
    • Thread