• 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: kai <email@hidden>
  • Date: Thu, 9 Feb 2006 17:41:03 +0000


On 9 Feb 2006, at 09:50, Yvan KOENIG wrote:

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.

Yes, Yvan. I fully anticipated that you'd have to make some modifications - to deal with both localization and version variations. (I believe that, last time we looked at something together, you were on Mac OS X 10.3.9.) As mentioned, I was merely trying to help you get started...


- 2 - it seems that you made a typo.

Nope (not in this case, at any rate). ;-)

As I said, the code I posted works fine here (AppleWorks 6.2.9, Mac OS X 10.4.4).

In the Save/Enregistrer window, UI element 9 is not the choose format menu but the Cancel/Annuler button

That may well be the case with your configuration. Here, however, the File Format menu is:


pop up button 1 of UI element 1 of UI element 1 of UI element 9 of window "Save: AppleWorks 6" of application process "AppleWorks 6" of application "System Events"

... while the Cancel button is a direct element of the Save window itself:

----------------

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
		button 5
	end tell
end tell

--> button "Cancel" of window "Save: AppleWorks 6" of application process "AppleWorks 6" of application "System Events"

----------------

GUI scripting can be incredibly useful for situations like this, where a target application offers certain manual features that are not reflected in its AppleScript implementation. However, the very nature of the approach makes it more sensitive to localization issues and UI structural variations between different software releases. Producing more portable code therefore requires a greater investment in terms of research, coding and testing - something that's not always practicable when offering brief suggestions in a forum like this.

Anyway, I'm pleased to hear that you now have a solution. :-)

---
kai


_______________________________________________ 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:
    • system events ?
      • From: Christian Vinaa <email@hidden>
References: 
 >[AS] saving as AppleWorks 5 (From: Yvan KOENIG <email@hidden>)
 >Re: [AS] saving as AppleWorks 5 (From: kai <email@hidden>)
 >Re: [AS] saving as AppleWorks 5 (From: Yvan KOENIG <email@hidden>)

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