-
Notifications
You must be signed in to change notification settings - Fork 559
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
1,542 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
<?xml version="1.0" encoding="UTF-8" standalone="no"?> | ||
<ExtensionManifest ExtensionBundleId="com.example.photoshopevents" ExtensionBundleName="PhotoshopEvents" ExtensionBundleVersion="1.0" Version="4.0"> | ||
<ExtensionList> | ||
<Extension Id="com.example.photoshopevents.extension" Version="1.0"/> | ||
<Extension Id="com.example.photoshopevents.extension2" Version="1.0"/> | ||
</ExtensionList> | ||
<ExecutionEnvironment> | ||
<HostList> | ||
<Host Name="PHXS" Version="[14.0,99.9]"/> | ||
</HostList> | ||
<LocaleList> | ||
<Locale Code="All"/> | ||
</LocaleList> | ||
<RequiredRuntimeList> | ||
<RequiredRuntime Name="CSXS" Version="4.0"/> | ||
</RequiredRuntimeList> | ||
</ExecutionEnvironment> | ||
<DispatchInfoList> | ||
<Extension Id="com.example.photoshopevents.extension"> | ||
<DispatchInfo> | ||
<Resources> | ||
<MainPath>./index.html</MainPath> | ||
<ScriptPath>./host/ps.jsx</ScriptPath> | ||
</Resources> | ||
<UI> | ||
<Type>Panel</Type> | ||
<Menu>PhotoshopEvents</Menu> | ||
<Geometry> | ||
<Size> | ||
<Height>460</Height> | ||
<Width>320</Width> | ||
</Size> | ||
<MaxSize> | ||
<Height>800</Height> | ||
<Width>1200</Width> | ||
</MaxSize> | ||
<MinSize> | ||
<Height>100</Height> | ||
<Width>100</Width> | ||
</MinSize> | ||
</Geometry> | ||
<Icons> | ||
<Icon Type="Normal">./PhotoshopEventsNormal.png</Icon> | ||
<Icon Type="RollOver">./PhotoshopEventsRollover.png</Icon> | ||
</Icons> | ||
</UI> | ||
</DispatchInfo> | ||
</Extension> | ||
<Extension Id="com.example.photoshopevents.extension2"> | ||
<DispatchInfo> | ||
<Resources> | ||
<MainPath>./index.html</MainPath> | ||
<ScriptPath>./host/ps.jsx</ScriptPath> | ||
</Resources> | ||
<UI> | ||
<Type>Panel</Type> | ||
<Menu>PhotoshopEvents 2</Menu> | ||
<Geometry> | ||
<Size> | ||
<Height>460</Height> | ||
<Width>320</Width> | ||
</Size> | ||
<MaxSize> | ||
<Height>800</Height> | ||
<Width>1200</Width> | ||
</MaxSize> | ||
<MinSize> | ||
<Height>100</Height> | ||
<Width>100</Width> | ||
</MinSize> | ||
</Geometry> | ||
<Icons> | ||
<Icon Type="Normal">./PhotoshopEventsNormal.png</Icon> | ||
<Icon Type="RollOver">./PhotoshopEventsRollover.png</Icon> | ||
</Icons> | ||
</UI> | ||
</DispatchInfo> | ||
</Extension> | ||
</DispatchInfoList> | ||
</ExtensionManifest> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
// Fri May 22 2015 11:56:37 GMT-0700 (Pacific Daylight Time) | ||
var gScriptVersion = "0.1"; | ||
|
||
// some events we are interested in | ||
var eventMake = 1298866208; // "Mk " | ||
var eventDelete = 1147958304; // "Dlt " | ||
var eventClose = 1131180832; // "Cls " | ||
var eventSelect = 1936483188; // "slct" | ||
var eventSet = 1936028772; // "setd" | ||
|
||
function LogIt( inMessage ) { | ||
try { | ||
var a = new Logger(); | ||
var b = decodeURIComponent( inMessage ); | ||
a.log( b + "\n"); | ||
} | ||
catch(e) { | ||
alert("LogIt catch : " + e + ":" + e.line); | ||
} | ||
} | ||
|
||
/////////////////////////////////////////////////////////////////////////////// | ||
// Object: Logger | ||
// Usage: Log information to a text file | ||
// Input: String to full path of file to create or append, if no file is given | ||
// then output file Logger.log is created on the users desktop | ||
// Return: Logger object | ||
// Example: | ||
// | ||
// var a = new Logger(); | ||
// a.print( 'hello' ); | ||
// a.print( 'hello2\n\n\nHi\n' ) ; | ||
// a.remove(); | ||
// a.log( Date() ); | ||
// a.print( Date() ); | ||
// a.display(); | ||
// | ||
/////////////////////////////////////////////////////////////////////////////// | ||
function Logger( inFile ) { | ||
|
||
// member properties | ||
|
||
// the file we are currently logging to | ||
if ( undefined == inFile ) { | ||
this.file = new File( Folder.desktop + "/PhotoshopEvents.log" ); | ||
} else { | ||
this.file = new File( inFile ); | ||
} | ||
|
||
// member methods | ||
|
||
// output to the ESTK console | ||
// note that it behaves a bit differently | ||
// when using the BridgeTalk section | ||
this.print = function( inMessage ) { | ||
if ( app.name == "ExtendScript Toolkit" ) { | ||
print (inMessage); | ||
} else { | ||
var btMessage = new BridgeTalk(); | ||
btMessage.target = "estoolkit"; | ||
btMessage.body = "print(" + inMessage.toSource() + ")"; | ||
btMessage.send (); | ||
} | ||
} | ||
|
||
// write out a message to the log file | ||
this.log = function( inMessage ) { | ||
if ( this.file.exists ) { | ||
this.file.open( 'e' ); | ||
this.file.seek( 0, 2 ); // end of file | ||
} else { | ||
this.file.open( 'w' ); | ||
} | ||
this.file.write( inMessage ); | ||
this.file.close(); | ||
} | ||
|
||
// show the contents with the execute method | ||
this.display = function() { | ||
this.file.execute(); | ||
} | ||
|
||
// remove the file | ||
this.remove = function() { | ||
this.file.remove(); | ||
} | ||
} | ||
|
||
// end ps.jsx |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<!doctype html> | ||
<!-- Wed Apr 29 2015 08:40:46 GMT-0700 (Pacific Daylight Time) --> | ||
<html> | ||
<style> | ||
.labellong { | ||
width: 240px; | ||
text-align: left; | ||
display:inline-block; | ||
} | ||
</style> | ||
<body onload="Initialize()"> | ||
<h3 align="center">Photoshop JSON Events v0.1</h3> | ||
<button id="btnClose">Close</button> | ||
<div> | ||
<label><input type="checkbox" id="cbMake" checked="true" onClick="EventClick(this);">Make</label> | ||
<label id="lblMake"> 0</label><br> | ||
<label><input type="checkbox" id="cbDelete" checked="true" onClick="EventClick(this);">Delete</label> | ||
<label id="lblDelete"> 0</label><br> | ||
<label><input type="checkbox" id="cbClose" checked="true" onClick="EventClick(this);">Close</label> | ||
<label id="lblClose"> 0</label><br> | ||
<label><input type="checkbox" id="cbSelect" checked="true" onClick="EventClick(this);">Select</label> | ||
<label id="lblSelect"> 0</label><br> | ||
<label><input type="checkbox" id="cbSet" checked="true" onClick="EventClick(this);">Set</label> | ||
<label id="lblSet"> 0</label><br> | ||
</div> | ||
<div><label id="lblResult" class="labellong">Results go here</label></div> | ||
<div><label id="lblTiming" class="labellong">Timing info goes here</label></div> | ||
</body> | ||
<script src="js/CSInterface.js"></script> | ||
<script src="js/main.js"></script> | ||
</html> |
Oops, something went wrong.