Skip to main content
This topic has been closed for replies.

2 replies

Stephen Marsh
Braniac
May 10, 2021

Can this be recorded into an action in CS6 and can the action be converted into a script?

 

Although this was apparently not a case of syntax error, there is a lot of old code floating around the web and it can be hard to find working code for later versions of Photoshop to correctly run the JS from AS:

 

https://community.adobe.com/t5/photoshop/running-a-jsx-script-with-applescript-in-photoshop-using-do-javascript/m-p/11035403

 

https://community.adobe.com/t5/photoshop/running-a-jsx-script-with-applescript-in-photoshop-using-do-javascript/m-p/11035403

 

https://community.adobe.com/t5/photoshop/request-add-scale-styles-option-to-quot-resize-image-quot-command-in-applescript/m-p/10636852

 

frmorelAuthor
Inspiring
May 10, 2021

Applescript command do javascript works fine for me.

My problem came from my old Photoshop. As far it is not possible in CS 6 to retrieve the state of the rulers (shown or hidden), the problem doesn't seem to be solved. 😞

Stephen Marsh
Braniac
May 10, 2021

I know it works for you, however, it doesn't for many which is why I noted it here.

Kukurykus
Braniac
May 9, 2021
frmorelAuthor
Inspiring
May 9, 2021

Kukurykus, are you refering to this piece of code?

sTT = stringIDToTypeID; (ref = new ActionReference())
.putProperty(sTT('property'), rV = sTT('rulersVisibility'))
ref.putEnumerated(sTT('document'), sTT('ordinal'), sTT('targetEnum'))
executeActionGet(ref).getBoolean(rV) && runMenuItem(sTT('toggleRulers'))

 If yes, I really don't know how I could convert it to an Applescript.

Kukurykus
Braniac
May 9, 2021