FWeinb / node-osascript

Use AppleScript from node
68 stars 9 forks source link

Syntax Error: Expected End Of Line #13

Closed FMCalisto closed 6 years ago

FMCalisto commented 6 years ago

We are trying to use the node-osascript as you have in your documentation:

var osascript = require('node-osascript');

osascript.executeFile('scripts/trash-back.scpt', { varName : 'value'}, function(err, result, raw){
  if (err) return console.error(err)
    console.log(result, raw)
});

Our simple AppleScript:

display dialog "Welcome to AppleScript."

However, when we run:

npm start

The following error message appears:

> trash-back@1.0.0 start /Users/Francisco/Git/trash-back
> node src/index.js

Error: 32:37: syntax error: Expected end of line, etc. but found real number. (-2741)

    at ChildProcess.<anonymous> (/Users/Francisco/Git/trash-back/node_modules/node-osascript/lib/index.js:39:12)
    at ChildProcess.emit (events.js:159:13)
    at maybeClose (internal/child_process.js:943:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:220:5)

What are we doing wrong?

FMCalisto commented 6 years ago

The issue is solved.

rendertom commented 6 years ago

How did you solve the issue? I am getting same error message. Thank you.

dfrank43 commented 4 years ago

How did you solve the issue Im getting the same one too?