Closed rborn closed 9 years ago
Hi, I'm trying to open a file dialog, but when I choose the file I get an error
var osascript = require('node-osascript'); osascript.execute('set new_file to choose file', function(err, result, raw){ if (err) return console.error(err) console.log(result, raw) });
Result:
{ [SyntaxError: Expected "false", "true", "{", date, end of input, number or string but "a" found.] message: 'Expected "false", "true", "{", date, end of input, number or string but "a" found.', expected: [ { type: 'literal', value: 'false', description: '"false"' }, { type: 'literal', value: 'true', description: '"true"' }, { type: 'literal', value: '{', description: '"{"' }, { type: 'other', description: 'date' }, { type: 'end', description: 'end of input' }, { type: 'other', description: 'number' }, { type: 'other', description: 'string' } ], found: 'a', offset: 0, line: 1, column: 1, name: 'SyntaxError' }
However, the native script works just fine:
$ osascript -e 'set new_file to choose file' alias SSD:Users:Dan:Documents:avva_60.jpg
Am I doing something wrong? :blush:
Thank you
Will be fixed in 1.0.2 Thanks for reporting.
1.0.2
Great, thank you for the fast reply :)
Hi, I'm trying to open a file dialog, but when I choose the file I get an error
Result:
However, the native script works just fine:
Am I doing something wrong? :blush:
Thank you