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

Safari Nastiness


  • Subject: Safari Nastiness
  • From: Christopher Stone <email@hidden>
  • Date: Wed, 30 Jun 2004 17:55:15 -0500

If a non-document window is frontmost this gets snippy. The first script craps out in the 'if; because the 'docFlag' variable has just vanished.

tell application "Safari"
set docFlag to false
set docFlag to document of front window
if docFlag is false then
beep
end if
end tell

You've got to write it like this to make it work.

tell application "Safari"
document of front window
try
set docFlag to result
on error
set docFlag to false
end try
end tell


Best Regards,

Chris
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.


  • Prev by Date: Re: Sum of list?
  • Next by Date: Re: two files...
  • Previous by thread: Re: Read / Write with Files
  • Next by thread: Re: two files...
  • Index(es):
    • Date
    • Thread