Javascript within and applescript
Javascript within and applescript
- Subject: Javascript within and applescript
- From: "Patrik B." <email@hidden>
- Date: Tue, 16 Jan 2007 12:46:31 -0800
Dear Stan,
Thanks for the info. I actually got the code the way you intended the first
time. This wasn't the problem. So what I did I tried it on another G5 and it
works just fine. For some reason I get this error only on my machine and it
is really annoying. It won't recognize the code properly and just give me a
compile error on the quotes. I checked if I had the applescripts default
delimiter set wrong or if something like this could cause it but no.
The only difference I can see of the cuff is that I have some more scripting
additions on my MAC such as ACME Script Widgets.osax and
QXPScrptingAdditions.osax. But also when I just took them out of the folder
it did't want to compile on my G5 10.3.9. Both G5s have the same OS and the
same Applescript editor. Anyway if you have any ideas on how I could make it
work on mine too that would help. At this point it does not seem to be the
code but the compiler.
Best, Patrik
> >
> > Best, Patrik
>
> Looks like there may have been a text-wrapping problem, so I¹ve switched
> this email to
> HTML format to preserve the code. Here it is again.
>
> tell application "InDesign CS"
> do script file "G5:Cleanup.js" language javascript
> end tell
>
> tell application "InDesign CS"
> -- FYI, the javascript below does nothing but assign a variable
> do script "// this is a comment
> var thisString = \"Hello, World.\"" language javascript
> end tell
>
> Keep in mind that the above code is for executing javascript that is
> specifically written
> for InDesign CS only, which it appeared you¹re trying to do, and
> works only within an InDesign CS tell block. I use this approach all
> the time with Photoshop CS2, when some function is available only
> using javascript, but not AppleScript.
>
> If you are trying to execute javascript in a non-InDesign
> environment, then this method won¹t do the job and what you need
> falls outside my experience.
>
> Stan C.
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: http://lists.apple.com/mailman/private/applescript-
users/attachments/20070115/f159f550/attachment.html
>
>
_______________________________________________
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