Search found 8 matches

by kjell
Sat Jul 22, 2017 8:51 am
Forum: Help Me
Topic: Auto Arrange
Replies: 4
Views: 7465

Re: Auto Arrange

This problem is called "bin packing" and is NP-complete, meaning (simplified) that if you want the optimal result you have (for the moment) try all permutations - of which there are an exponential amount of. Thus, for large numbers of rectangles this problem becomes intractable. You can re...
by kjell
Sun Dec 11, 2016 11:18 am
Forum: Help Me
Topic: Save Actionset to .atn?
Replies: 10
Views: 12383

Re: Save Actionset to .atn?

Amazing, that worked! Thanks X!
by kjell
Tue Dec 06, 2016 12:52 pm
Forum: Help Me
Topic: Save Actionset to .atn?
Replies: 10
Views: 12383

Re: Save Actionset to .atn?

Yes, that's an option but on the new Photoshop installation I won't be able to edit actions as they are now .jsx-files.
by kjell
Tue Dec 06, 2016 1:59 am
Forum: Help Me
Topic: Save Actionset to .atn?
Replies: 10
Views: 12383

Re: Save Actionset to .atn?

Sure, let's say I have loaded three action sets in my actions palette: set1.atn, set2.atn, set3.atn I'm looking for a script that could save the contents of the actions palette, in the above example to three files: set1.atn, set2.atn, set3.atn. This would make it easier to move action sets between P...
by kjell
Sun Dec 04, 2016 5:10 pm
Forum: Help Me
Topic: Save Actionset to .atn?
Replies: 10
Views: 12383

Re: Save Actionset to .atn?

If done manually, it has to be done for every set which is a bit tedious.
by kjell
Sat Dec 03, 2016 11:30 pm
Forum: Help Me
Topic: Save Actionset to .atn?
Replies: 10
Views: 12383

Save Actionset to .atn?

I've been searching but can't seem to find any code to save a given Actionset to a (.atn) file.

Is it possible?
by kjell
Sat Dec 03, 2016 8:48 am
Forum: Help Me
Topic: Regain focus on ScriptUI window
Replies: 1
Views: 3209

Re: Regain focus on ScriptUI window

Found the solution myself: var i = 0; function main() { var w = new Window ("dialog"); w.text = "iteration " + i++; var b = w.add ("button", undefined, "Button"); b.onClick = function() { w.close(); w = main(); w.active = true; w.show(); } w.add("button&q...
by kjell
Wed Nov 30, 2016 1:28 pm
Forum: Help Me
Topic: Regain focus on ScriptUI window
Replies: 1
Views: 3209

Regain focus on ScriptUI window

Trying to circumvent the non-modality of ScriptUI's windows, I tried closing the window and recursing back. But on the second (and following) invocations, the window does not have focus. Is there a way to focus on the window so the user doesn't have to click on it first? var i = 0; function main() {...