Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
quickly drag a .jsx file into the Photoshop window?
#1
To run a Photoshop script, I currently need to go to File Menu → Scripts → Browse... → Select the .jsx file, which is too cumbersome.
Tried solutions:
  1. I tried using Ctrl+Shift+K to record the menu command, but it didn’t work.
  2. Dragging the .jsx file directly into the non-work area of Photoshop works fine, such as the empty space on the right side of the menu bar.
How can I implement the drag-and-drop functionality in the following code? Thanks in advance!

Function runJsx
Code:
Copy      Help
out

str jsx=
;var doc = app.documents.add(800, 600, 72, "My Document");
;
;app.foregroundColor.rgb.red = 255;
;app.foregroundColor.rgb.green = 0;
;app.foregroundColor.rgb.blue = 0;
;
;doc.selection.select([[0, 0], [800, 0], [800, 600], [0, 600]]);
;doc.selection.fill(app.foregroundColor);
;doc.selection.deselect();
jsx.setfile("$desktop$\ps.jsx")

;drag-and-drop to photoshop window
#2
Solved.

Code:
Copy      Help
;drag-and-drop to photoshop window
run "D:\Adobe Photoshop CS6\Photoshop.exe" "$desktop$\ps.jsx" "" "*"


Forum Jump:


Users browsing this thread: 2 Guest(s)