Skip to main content
Known Participant
January 21, 2021
Question

Dialog-based frame script

  • January 21, 2021
  • 1 reply
  • 1762 views

I decided I needed to have frames on my photographs before uploading them to my web site.  So, I found a frame action, and figured out how to adjust it for my needs.  But then I found that actions are far too inflexible and far too hard to edit.  So, I learned how to use JavaScript, and created a dialog-based framing script.  A sample can be seen here.  The script files and documentation can be downloaded from GitHub.

 

If you find a problem or if you would like to see an improvement, let me know here or post an issue in GitHub.

This topic has been closed for replies.

1 reply

JJMack
Community Expert
Community Expert
January 21, 2021

Your readme

 

# Frame-With-UI

A PhotoShop action can be handy, but it is severely limited.  Most choices are pre-made.  If any choices can be made as the action is running, they can only be made one at a time.  There is no way to save choices for future use.  Editing actions is an extremely cumbersome process.

PhotoShop has the ability to run scripts written in JavaScript, and those scripts can have dialog boxes in which users can make selections before the script begins applying choices to the image.  The Frame With UI (user interface) script is an example.  All parameters of the frame can be selected before the frame is generated.  If you don't like how the frame looks, you can click "Reset Frame" to restore the image to its original appearance.  Frame styles can be saved, and previosly saved styles can be loaded.  

To install this script, extract the files from the zip file into a location of your choice.  To use the script, select File | Scripts ! Browse... and select FrameWithUI.jsx.  You don't need to install them into your PhotoShop folder, but it may make it easier for PhotoShop to find it or remember it if you do.  On my computer, that folder is C:/Program Files/Adobe/Adobe PhotoShop 2021/Presets/Scripts.  To use the script in PhotoShop, select File | Scripts | Browse... and select the FrameWithUI.jsx file.  

It is possible that saving frame styles may require you to make the Scripts folder writable by all users of your computer.  The XML file that stores the styles gets written into that folder.  Because I made my folder writable early in the process of developing this script, I do not yet know if the script will run with that folder having its default security settings.

Detailed documentation can be found in the zip file (once I write it).

 

However on mt Windows 10 PS 22.1.1 PS 2021 thet is nos sucj script and neither of the two jsx script open a dialog??

JJMack
Known Participant
January 22, 2021

Thank you for pointing out that the readme file needs to be updated.  I have removed the zip file from the GitHub archive and replaced it with individual files.  You will need to copy the .js and .jsx files into the PhotoShop scripts folder yourself.  You may need to change permissions on that folder to do so.  Also, the GitHub repository now includes a detailed documentation file.  

JJMack
Community Expert
Community Expert
January 26, 2021

JJ,

 

Thanks very much for the suggestion about the AppData folder.  That's a much better place for the styles file than the PhotoShop scripts folder since, as you say, it's always going to be there and always writable.  Do you know if there's a corresponding folder on Mac machines?  

 

I've seen the frame expand beyond the visible area.  A "Fit on Screen" option would be nice.  I don't know how to script that, though.  It probably wouldn't be hard to find out.

 

I designed this for the user to create a frame and then adjust it before closing the dialog, thinking that different images may well need different settings.  Batch processing would not fit that workflow.  The frames would be reasonable but possibly not ideal, and individual files may need to be revisited.  But I'll keep the possibility in mind in case I learn that there is a demand for the feature.

 

Rob


I do not use Frame Shop for they are save jsxbin I do not install JSXBIN Script for I can not see all they do, And I do not crack them for the Author is trying to keep their code private and I respect that.  My Script seem to work on both PC and Mac.  Here is the File path I use that works on both platforms " ~/Application Data"

var paramsFolder = new Folder( "~/Application Data/JJMack's Scripts/" + gScriptName );

 

JJMack