• 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
puzzling Safari
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

puzzling Safari


  • Subject: puzzling Safari
  • From: "koenig.yvan" <email@hidden>
  • Date: Thu, 26 Dec 2013 11:41:56 +0100

Hello

A user which just switched from Snow Leopard to Mavericks asked me about an odd behavior.

He said that for years he used this piece of code :

set p2Documents to path to documents folder as text

tell application "Safari"
activate
save front document in file (p2Documents & "xx.html")
end tell

Alas, when he try to use it under Mavericks (behave the same under 10.8.5), he get :
(*
Le document « Getting a value from one Filemaker DB and see if it exists in another. » n’a pas pu être exporté sous le nom « xx.html ». 

error "Erreur dans Safari : Le gestionnaire AppleEvent a échoué." number -10000
*)

I made different attempts with no success — same behavior in Smile but correct one under Script Debugger — so I guess that there is an heavy smell of bug.

At this time my workaround is GUI Scripting :

activate application "Safari"
tell application "System Events" to tell (first process whose frontmost is true)
keystroke "s" using {command down}
delay 0.1
keystroke "d" using {command down} # pour enregistrer sur le bureau
keystroke return
end tell

but the asker is reluctant to use it.

Am I missing something ?

Yvan KOENIG (VALLAURIS, France) jeudi 26 décembre 2013 11:41:48





 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

  • Follow-Ups:
    • Re: puzzling Safari
      • From: Shane Stanley <email@hidden>
  • Prev by Date: Re: syntax used by Contacts
  • Next by Date: Re: puzzling Safari
  • Previous by thread: Final Cut Pro X
  • Next by thread: Re: puzzling Safari
  • Index(es):
    • Date
    • Thread