Search found 81 matches

by beginUndoGroup
November 21st, 2013, 1:47 am
Forum: Scripts Discussion
Topic: onAltClick or onControlClick
Replies: 4
Views: 10584

Re: onAltClick or onControlClick

i dont know how to do that. The thing is that if you use a mouse event handler, the shiftKey should be pressed BEFORE the mouse enters the button region, and it is not quite what a user expects. There is an event type for the mouse entering the button's region ('mouseover'), leaving the button's reg...
by beginUndoGroup
November 19th, 2013, 12:12 pm
Forum: Scripts Discussion
Topic: function time reverse keyframes
Replies: 6
Views: 14374

Re: function time reverse keyframes

off topic: Why not give a variable name to the layer instead of app.project.activeItem.selectedLayers[0] on every single line ?? For your question: layer.property("Position").selected = true; Can't remember if it selects all keys along. If not: for (k=1; k<=prop.numKeys; k++) prop.setSelec...
by beginUndoGroup
November 19th, 2013, 7:40 am
Forum: Scripts Discussion
Topic: onAltClick or onControlClick
Replies: 4
Views: 10584

Re: onAltClick or onControlClick

function onTestButtonClick(ev) { var b = ev.target; if (!(b instanceof Button)) return; var modState = ScriptUI.environment.keyboardState; if (modState.shiftKey) alert('nicely shifted !') else if (modState.altKey) alert('Alt+Click not supported !!!') else alert("You just plain-pressed a plain ...
by beginUndoGroup
November 19th, 2013, 7:25 am
Forum: Scripts Discussion
Topic: function time reverse keyframes
Replies: 6
Views: 14374

Re: function time reverse keyframes

Such a built-in function does not exist. To do this, you need to STORE all key frames along with all of their properties (time, value, interpolation type, keyFrameEase values, etc), delete the keyframes, and "paste", where "paste" is not simply .paste() (doesnt exist) but the rev...
by beginUndoGroup
November 14th, 2013, 9:22 am
Forum: Scripts Discussion
Topic: Parsing layer names
Replies: 1
Views: 7037

Re: Parsing layer names

Assuming that a variable comp exists that refers to an actual composition somewhere in your project, and another variable theName has also be declared (a string, the name to be searched), this should do it: var k=1, K=comp.numLayers, layer; for ( ; k<=K; k++) if (comp.layer(k).name === theName) {lay...
by beginUndoGroup
November 14th, 2013, 8:51 am
Forum: Scripts Discussion
Topic: Ultra simple script (but failed....)
Replies: 8
Views: 15906

Re: Ultra simple script (but failed....)

Hello, small (off topic) comment, after reading through your initial question. When you declare multiple variables like this: var compSettings = cs = [1920, 1080, 1, 120, 25]; it "works": both entities (compSettings and cs) are now variables and are assigned the value [1920, 1080, 1, 120, ...
by beginUndoGroup
September 20th, 2013, 2:54 am
Forum: Scripts Discussion
Topic: Window within a panel
Replies: 3
Views: 10868

Re: Window within a panel

If the window doesnt need to be persistant, just change "palette" to "dialog". Otherwise you need to either declare the window you want to display outside of the onClick function, either append the new window object to an already existing object. It depends on what you want to ac...
by beginUndoGroup
August 22nd, 2013, 2:05 am
Forum: Scripts Discussion
Topic: Render and Email script Problem
Replies: 6
Views: 21157

Re: Render and Email script Problem

Your script evals Render and Email.jsx which in turns evals email_methods.jsx, and the EmailSocket contructor is in that third script. So apparently email_methods.jsx is not evaluated properly. It is maybe because of the partial path: var emailCodeFile = new File("(support)/email_methods.jsx&qu...
by beginUndoGroup
August 18th, 2013, 1:12 am
Forum: Expression Discussion
Topic: object constructor
Replies: 2
Views: 10093

Re: object constructor

I just tried one (never did before) and there was no problem. I copied this expression in a position property and everything went fine: function Translation(v){this.v = v;} Translation.prototype.pow = function(n){return new Translation (n*this.v);} Translation.prototype["+"] = function(x) ...
by beginUndoGroup
July 25th, 2013, 2:31 am
Forum: Scripts Discussion
Topic: variable parsing into regex - what is the trick?
Replies: 2
Views: 8211

Re: variable parsing into regex - what is the trick?

A RegExp is not a string. Try replacing var searchStringer = '/fur/gi'; by var searchStringer = /fur/gi;
by beginUndoGroup
July 8th, 2013, 5:25 am
Forum: Script requests
Topic: Save/Load User Inputs from Scripted GUI in ExtendScript
Replies: 1
Views: 9123

Re: Save/Load User Inputs from Scripted GUI in ExtendScript

Hello, there is nothing to do: the text content is an attribute of the text container. You can set it from within the script exactly as you set the characters attribute (for instance etOne.text = 'Mario' sets the text to Mario). If the user changes the text input the text attribute is changed accord...
by beginUndoGroup
July 3rd, 2013, 4:26 am
Forum: Scripts Discussion
Topic: blank panel
Replies: 6
Views: 14980

Re: blank panel

Just a remark: you should not assign a value to myProj right at the beginning of your script.
If the user closes the project and opens a new one while the script palette is open this will generate an error (Object not valid).
Unless ofc if you know this will not happen.
by beginUndoGroup
July 1st, 2013, 10:16 am
Forum: Scripts Discussion
Topic: blank panel
Replies: 6
Views: 14980

Re: blank panel

You should post the part UI part of your script, maybe not everything, but at least exhibit how you build the palette and how you show it.
by beginUndoGroup
July 1st, 2013, 5:56 am
Forum: Scripts Discussion
Topic: app.executeCommand(ID) for "Convert Expression to Keyframes"
Replies: 2
Views: 9028

Re: app.executeCommand(ID) for "Convert Expression to Keyfra

Funny !

A script with single line : app.findMenuCommandId("Convert Expression to Keyframes") returns 2639...