• 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
NSReceiverEvaluationScriptError: 4 interaction with Safari
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSReceiverEvaluationScriptError: 4 interaction with Safari


  • Subject: NSReceiverEvaluationScriptError: 4 interaction with Safari
  • From: David Marshall <email@hidden>
  • Date: Tue, 5 Aug 2008 20:16:42 -0400

On Mon, 4 Aug 2008 14:44:46 -0400, Sean R. McCorkle wrote:

tell application "System Events" to tell process "Safari"

As Yvan already implied, you need to make Safari the active application before entering the System Events tell block.


And once you've done that, you don't need to point System Events at Safari at all, as long as you use

keystroke return

as suggested by Ed.

then System Events will take care of everything. (Since System Events is not talking to process "Safari" in this case, it won't understand

click button "Save" of sheet 1 of window 1

which is why you need the keystroke instead.)

- - - - -

tell application "Safari" to activate
tell application "System Events"
keystroke "s" using command down
delay 1
keystroke "d" using command down
delay 1
keystroke "c" using command down
set the clipboard to ((do shell script ("date +%Y%m%d_%H%M%S_")) & (the clipboard))
keystroke "v" using command down
delay 1
keystroke return
end tell


- - - - -

Dave
_______________________________________________
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
  • Prev by Date: Re: Class ksty
  • Next by Date: Words of Bug in Leopard (Japanese environment)
  • Previous by thread: Re: NSReceiverEvaluationScriptError: 4 interaction with Safari
  • Next by thread: Re: interaction with Safari
  • Index(es):
    • Date
    • Thread