Closed workflowsguy closed 7 years ago
Open the debugger, and post the output.
adding a directory with "Add to TemplatesManager":
[2017-06-10 18:41:40][trigger.action] Processing output of 'action.script' with arg '/Users/stefan/Eingang/Test-Templatedirectory'
trying to create an instance of an existing document with "tml":
[2017-06-10 18:44:01][input.scriptfilter] <?xml version='1.0'?><items>
<item uuid='0' arg='0' valid='yes'>
<title><![CDATA[LibreOffice-Tabelle.ods]]></title>
<icon>icon.png</icon>
</item>
</items>
[2017-06-10 18:44:04][input.scriptfilter] Processing output of 'action.script' with arg '0'
[2017-06-10 18:44:04][ERROR: action.script] osascript: no such component "JavaScript".
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/fileutils.rb:1375:in `initialize': No such file or directory - (Errno::ENOENT)
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/fileutils.rb:1375:in `open'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/fileutils.rb:1375:in `block in copy_file'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/fileutils.rb:1374:in `open'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/fileutils.rb:1374:in `copy_file'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/fileutils.rb:1342:in `copy'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/fileutils.rb:463:in `block in copy_entry'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/fileutils.rb:1479:in `call'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/fileutils.rb:1479:in `wrap_traverse'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/fileutils.rb:460:in `copy_entry'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/fileutils.rb:435:in `block in cp_r'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/fileutils.rb:1552:in `block in fu_each_src_dest'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/fileutils.rb:1568:in `fu_each_src_dest0'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/fileutils.rb:1550:in `fu_each_src_dest'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/fileutils.rb:434:in `cp_r'
from /Users/stefan/Library/Application Support/Alfred 3/Alfred.alfredpreferences/workflows/user.workflow.A7E879B0-F84D-44F7-9ED5-C4A2651F17B0/tmfunctions.rb:142:in `local_put'
from -e:3:in `<main>'
[2017-06-10 18:44:04][action.script] Processing output of 'action.script' with arg ''
What’s your macOS version?
10.9.5
That’s three major versions behind. JXA wasn’t yet supported, hence the error.
Download this older version. You’ll not have newer features such as PathFinder support, set a custom templates directory, or the new icon, but basic functionality should work fine.
After you install delete the OneUpdater
node (the pink one) so it doesn’t check for updates.
Meanwhile, I have upgraded to 10.11.6. Adding and instantiating templates itself seems to work correctly now, but when adding a file or directory, an alert box with the error message:
Error on line 6: SyntaxError: Unexpected identifier "i". Expected either "in" or "of" in enumeration syntax.
shows up. When i press "Edit", the Script Editor opens Notificator.app on line 6.
Change the let
in that line to var
, and it’ll work.
I have changed the line, the error still shows up.
for (var i = 0; i < argc; i++) { argv.push(ObjC.unwrap(args.objectAtIndex(i))) }
I have changed the line, the error still shows up.
for (var i = 0; i < argc; i++) { argv.push(ObjC.unwrap(args.objectAtIndex(i))) }
Did you save it? It makes no sense the error would still show up or that it’d be the same. Someone else had the exact same issue on exactly the same macOS version and it was fixed like this.
I was not aware that clicking "Translate script" in the script editor is not enough for changes to take. After saving the script, this works now.
Hello,
I installed TemplatesManager yesterday. in my first tests, I could successfully add a directory structure.
But now, when trying to add a file or folder as template with "Add to TemplatesManager", simply nothing happens. "tml" shows "You have to add some local templates first".
Also, when i manually put a file in the templates directory and then do "tml", the file shows up, but pressing "enter" does not copy it to the current directory.
I tried this both from "Path Finder" (my regular file manager) and Finder.
Alfred: v3.3.2 TemplatesManager: v1.5.0
Thanks!