XToolKit under Mac OS X

Discussion of the xtools Toolkit

Moderators: Tom, Kukurykus

macfurax

XToolKit under Mac OS X

Post by macfurax »

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

Professional AI Audio Generation within Adobe Premiere Pro - Download Free Plugin here

macfurax

XToolKit under Mac OS X

Post by macfurax »

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
xbytor

XToolKit under Mac OS X

Post by xbytor »

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.
xbytor

XToolKit under Mac OS X

Post by xbytor »

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.
macfurax

XToolKit under Mac OS X

Post by macfurax »

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
xbytor

XToolKit under Mac OS X

Post by xbytor »

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.