Re: Javascript for automation quastions
Re: Javascript for automation quastions
- Subject: Re: Javascript for automation quastions
- From: Deivy Petrescu <email@hidden>
- Date: Sat, 13 Dec 2014 09:28:40 -0500
>
> Hello
>
> As I am curious, I pasted this code in Script Editor for see.
>
> The Events log was :
>
> app = Application("Éditeur de script")
> app.sysodsct("Application(\"Mail\").activate()", {scsy:"JavaScript"})
> app.earsffdr("desk")
> app.sysodsct(Path("/Users/yvankoenig/Desktop/foo.scpt"))
> no end loop
>
> (1) it appears that when we run JavaScript non ASCII characters aren't displayed correctly. So we are back several years in the past.
> (2) with foo.scpt being a simple AppleScript :
> display dialog "I am the foo"
> the execution enter a loop with no end so that I was forced to apply Force quit to the editor.
>
> What am'I doing wrongly ?
>
> Yvan KOENIG (VALLAURIS, France) samedi 13 décembre 2014 14:49:24
>
Yvan,
I run the following:
app = Application.currentApplication()
app.includeStandardAdditions = true
// Turn off parameter type checking
app.strictParameterType = false
// Run script text
scriptText = 'Application("Mail").activate()'
app.runScript(scriptText, { in: 'JavaScript' })
The Event Log is:
app = Application("Script Editor")
app.runScript("Application(\"Mail\").activate()", {in:"JavaScript"})
Result:
true
So, may be it is a problem in the French System.
I’ll try that later to see if I can reproduce it.
Deivy Petrescu
email@hidden
_______________________________________________
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