Hi,
I just discover XToolKit, it was a kind of revelation ! Great Job. I always tought I was alone to use Javascript under Photoshop.
My only concerne is that the update of XToolkit-in.atn action file failed in the install script (it cannot load it because the loading function use DOS batch file principle). I try to update the path with a text editor directly in the action file, but Photoshop cannot load it anymore. Does anyone found a solution for that ?
Thanks
Constant
XToolKit under Mac OS X
XToolKit under Mac OS X
I'm one stop further, I the Installjs script I see that they use ChangeScriptPaths.jsx script that can update path in Action File interactivally, I modifiy it to launch it from ExtendScript, the script ask me the path of source and target Action Script and path of javascript but it faile on the following part ( between >>> <<<) without any reason ...
XMLWriter.write[DescValueType.ALIASTYPE] = function(node, key, obj) {
>>> var f = obj.getPath(key); <<<
node.addAttribute("path", decodeURI(f.absoluteURI));
return node;
};
Any idea ?
Consant
XMLWriter.write[DescValueType.ALIASTYPE] = function(node, key, obj) {
>>> var f = obj.getPath(key); <<<
node.addAttribute("path", decodeURI(f.absoluteURI));
return node;
};
Any idea ?
Consant
XToolKit under Mac OS X
macfurax wrote:Hi,
I just discover XToolKit, it was a kind of revelation ! Great Job. I always tought I was alone to use Javascript under Photoshop.
I'm glad you like it. It was a lot of work, but fun as well.
My only concerne is that the update of XToolkit-in.atn action file failed in the install script (it cannot load it because the loading function use DOS batch file principle). I try to update the path with a text editor directly in the action file, but Photoshop cannot load it anymore. Does anyone found a solution for that ?
I can give an update for Install-js that will use bash if you prefer.
I just discover XToolKit, it was a kind of revelation ! Great Job. I always tought I was alone to use Javascript under Photoshop.
I'm glad you like it. It was a lot of work, but fun as well.
My only concerne is that the update of XToolkit-in.atn action file failed in the install script (it cannot load it because the loading function use DOS batch file principle). I try to update the path with a text editor directly in the action file, but Photoshop cannot load it anymore. Does anyone found a solution for that ?
I can give an update for Install-js that will use bash if you prefer.
XToolKit under Mac OS X
macfurax wrote:I'm one stop further, I the Installjs script I see that they use ChangeScriptPaths.jsx script that can update path in Action File interactivally, I modifiy it to launch it from ExtendScript, the script ask me the path of source and target Action Script and path of javascript but it faile on the following part ( between >>> <<<) without any reason ...
XMLWriter.write[DescValueType.ALIASTYPE] = function(node, key, obj) {
>>> var f = obj.getPath(key); <<<
node.addAttribute("path", decodeURI(f.absoluteURI));
return node;
};
Any idea ?
You should be able to run ChangeScriptPaths.jsx directly without modification. The 'try { eval("main"); }' will check to see if the script is being invoked by another script. By default ("interactive = true") it will prompt for a source and destination action file.
Run it again and let me know what the value of 'key' is.
XMLWriter.write[DescValueType.ALIASTYPE] = function(node, key, obj) {
>>> var f = obj.getPath(key); <<<
node.addAttribute("path", decodeURI(f.absoluteURI));
return node;
};
Any idea ?
You should be able to run ChangeScriptPaths.jsx directly without modification. The 'try { eval("main"); }' will check to see if the script is being invoked by another script. By default ("interactive = true") it will prompt for a source and destination action file.
Run it again and let me know what the value of 'key' is.
XToolKit under Mac OS X
Event with the try, ExtendScript stop not finding any main ?
I also change the
outfile = File.openDialog
to
outfile = File.saveDialog
making it easier to create a new action file.
The value of keyis 1785938804, does it tell you any thing ?
I'm wondering if the language is not the source of all this !
Constant
I also change the
outfile = File.openDialog
to
outfile = File.saveDialog
making it easier to create a new action file.
The value of keyis 1785938804, does it tell you any thing ?
I'm wondering if the language is not the source of all this !
Constant
XToolKit under Mac OS X
macfurax wrote:The value of keyis 1785938804, does it tell you any thing ?
That key/ID maps back to 'jsCt' which means that the key is referring to a javascript source file. In stdlib.js there is a function 'id2char' that maps IDs back to strings or 4 character symbols. That key is what I would expect in this situation.
If you want to poke around a bit, check to see what 'obj' is. It should be an ActionDescriptor and "obj.hasKey(cTID('jsCt'))" should evaluate to true.
I'm wondering if the language is not the source of all this !
I'll try and get access to a French version of PS and see if I can sort all of this out.
That key/ID maps back to 'jsCt' which means that the key is referring to a javascript source file. In stdlib.js there is a function 'id2char' that maps IDs back to strings or 4 character symbols. That key is what I would expect in this situation.
If you want to poke around a bit, check to see what 'obj' is. It should be an ActionDescriptor and "obj.hasKey(cTID('jsCt'))" should evaluate to true.
I'm wondering if the language is not the source of all this !
I'll try and get access to a French version of PS and see if I can sort all of this out.