• 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: Running JavaScript via AppleScript Problems
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Running JavaScript via AppleScript Problems


  • Subject: Re: Running JavaScript via AppleScript Problems
  • From: Emmanuel <email@hidden>
  • Date: Fri, 17 Nov 2006 20:20:10 +0100

At 6:30 PM +0000 11/17/06, Mark Thomas wrote:
(gdb) print scriptText
$1 = 0x5bcd10 "tell application \"Safari\"\n do JavaScript \"var where; if
(typeof(IBISmain)!='undefined') where=IBISmain; else where=window;
where.onStatusDone(0, 'my result is \\\"Yes\\\" \\\n.');\" in document 1\n
end tell"

Maybe this is no good because the javascript ends with two newlines in the middle, look at your actual javascript:


var where; if
(typeof(IBISmain)!='undefined') where=IBISmain; else where=window;
where.onStatusDone(0, 'my result is "Yes" .');

(gdb) print scriptText
$1 = 0x5bca90 "tell application \"Safari\"\n do JavaScript \"var where; if
(typeof(IBISmain)!='undefined') where=IBISmain; else where=window;
where.onStatusDone(0, 'my result is \"Yes\" \n.');\" in document 1\n end
tell"


This is completely no good because the \" thing before Yes is ending the string that you pass to do Javascript.


If you used a modern and productive environment like Smile (but not everybody knows about Smile) you would probably not spend your time (and have others spend theirs to help) on such issues. But that's another story ...

Emmanuel
_______________________________________________
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/mailman//archives/applescript-users

This email sent to email@hidden
  • Follow-Ups:
    • Re: Running JavaScript via AppleScript Problems
      • From: Emmanuel <email@hidden>
References: 
 >Running JavaScript via AppleScript Problems (From: Mark Thomas <email@hidden>)

  • Prev by Date: Running JavaScript via AppleScript Problems
  • Next by Date: Re: Running JavaScript via AppleScript Problems
  • Previous by thread: Running JavaScript via AppleScript Problems
  • Next by thread: Re: Running JavaScript via AppleScript Problems
  • Index(es):
    • Date
    • Thread