JavaScript is not recording in Actions (eventid issue)

Discussion of Photoshop Scripting, Photoshop Actions and Photoshop Automation in General

Moderators: Tom, Kukurykus

seemanntech

JavaScript is not recording in Actions (eventid issue)

Post by seemanntech »

Good Day.

May be somebody encounter the same problem.I have install Script - Aspect Ratio Selection. This script allows to make selection in the center of image with proper aspect ratio. Script is locating in File / Automation / Aspect Ratio Selection...
Script is working perfect itself, but it is imposible to record this script in Actions. Have no idea what wrong? When recording Action using this script, action line recording with empty string and if I try to play this action later I've got an error when action passing through this line.

Opening script in notepad and try to find out I noticed that matter is in the wrong eventid in the beging of the script-file - <eventid>3caa3434-cb67-11d1-bc43-0060b0a13dc5</eventid>

==================================================================

/* Special properties for a JavaScript to enable it to behave like an automation plug-in, the variable name must be exactly
as the following example and the variables must be defined in the top 1000 characters of the file


// BEGIN__HARVEST_EXCEPTION_ZSTRING


<javascriptresource>
<name>$$$/JavaScripts/AspectRatioSelection/Name=Aspect Ratio Selection...</name>
<about>$$$/JavaScripts/AspectRatioSelection/About=Aspect Ratio Selection Version 0.0 By JJmack a Hacker use at your own risk Quality forget about it.</about>
<menu>automate</menu>
<enableinfo>true</enableinfo>
<eventid>3caa3434-cb67-11d1-bc43-0060b0a13dc5</eventid>
</javascriptresource>


// END__HARVEST_EXCEPTION_ZSTRING

==================================================================

I also tried to put this Id from other scripts (Fit Image), but after that script is linking to Fit Image script and when playing in action perform task from wrong script. This interference make Action wrong.

Only I found in attached "Instal.txt" file description:
Finally a note regarding the script code. The code uses some strange strings that look like some kind of Photoshop registration number. I do not know how one would get such a thing. So I use the ones that belong to "Fit Image" The only string I changes was the one "Fit Image" used to record and retrieve its parameters. My scripts work and do not interfere with "Fit Image". However I do not know if using "Fit Image's" registration numbers will not cause any problem sometime in the future.

Please, advice how to find out which id should be indicated in scripts.

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

seemanntech

JavaScript is not recording in Actions (eventid issue)

Post by seemanntech »

Compare with Fit Image script and change the following:

================================================================
// BEGIN__HARVEST_EXCEPTION_ZSTRING

<javascriptresource>
<name>$$$/JavaScripts/AspectRatioSelection/Name=Aspect Ratio Selection...</name>
<about>$$$/JavaScripts/AspectRatioSelection/About=Aspect Ratio Selection Version 0.0 By JJmack a Hacker use at your own risk Quality forget about it.</about>
<menu>automate</menu>
<enableinfo>true</enableinfo>
<eventid>3caa3434-cb67-11d1-bc43-0060b0a13dc5</eventid>
<terminology><![CDATA[<< /Version 1
/Events <<
/3caa3434-cb67-11d1-bc43-0060b0a13dc5 [($$$/AdobePlugin/AspectRatioSelection/Name=Aspect Ratio Selection) /imageReference <<
/width [($$$/AdobePlugin/AspectRatioSelection/Width=width) /pixelsUnit]
/height [($$$/AdobePlugin/AspectRatioSelection/Height=height) /pixelsUnit]
>>]
>>
>> ]]>
</terminology>
</javascriptresource>

// END__HARVEST_EXCEPTION_ZSTRING
===============================================================================
Mike Hale

JavaScript is not recording in Actions (eventid issue)

Post by Mike Hale »

I don't know what's else is wrong with the script you downloaded but it should not use the <eventid> from Fit Image. That needs to be unique to that script. Each script that uses an eventid needs to have it's own unique id. That id is used by Photoshop to store the user's settings for action playback. You should not use the same id in other scripts or ids from other scripts as that would cause a conflict in the settings.

You could try contacting the script's author or replace the id with one you can get from here http://www.famkruithof.net/uuid/uuidgen?typeReq=1