Close a layer with scripting
Hello Adobe Community,
I would like to know if it is possible to close layer attributes via scripting ?
Right now I have time-remapping in my script and when the script is done, then the time-remap paramater is shown under the layer.
I would like to close all the attributes, so that only the layer name is shown.
Thank You!
B2H
It's under: Stuff that makes no sense... To clarify I
uploaded a quick example:
embedFont
First frame has a dynamic textfield, "HelveticaRounded Bold"
as font family (you can change that to whatever font you are using)
and 2 lines of code:
_global.style.setStyle("fontFamily" , "HelveticaRounded
Bold"); // change the HelveticaRounded Bold to the font embedded in
the first frame
_global.style.setStyle("embedFonts" , true);
The second frame has a button component masked.
Hope this helps.
Similar Messages
-
Hiding a layer with script?
Hello,
is there a way of setting a layer created with a script to hidden? - so that in ae it has that little eye icon turned off.
any suggestions would be sweeet!
thanks, SamThis will turn off the eye icon:
myLayer.enabled = false;
Dan -
Create Shape Layer with Script in After Effects
I wrote a simple script for After Effects and it works well but there is a weird problem.
My script creates a shape layer which includes group, ellipse path, stroke and fill. Why does the "Group 1" have "Material Options: Group 1" property group? It's empty and it disappers when I click on its eyeball button. I don't want to display the property group. It seems like this problem doesn't happen on CS5.
Are there any solutions to avoid this? Is this a AE CC bug?
OS: Windows8.1
After Effects: version 12.2.1.5
Here's my script code.
app.beginUndoGroup("Add new shape layer");
var curComp = app.project.activeItem;
if(curComp){ var shapeLayer = curComp.layers.addShape();
var shapeGroup = shapeLayer.property("Contents").addProperty("ADBE Vector Group");
shapeGroup.property("Contents").addProperty("ADBE Vector Shape - Ellipse");
shapeGroup.property("Contents").addProperty("ADBE Vector Graphic - Stroke");
shapeGroup.property("Contents").addProperty("ADBE Vector Graphic - Fill");
app.endUndoGroup();Just ran a quick test on MAC:
AE CS3, CS4, CS5 don't produce that Material Options
AE CS6 & CC have Material Options, but they dissapear once toggle eye icon. -
Creating an O/R layer with TopLink from Ant or a script
We're currently using JDeveloper and BC4J to generate an O/R layer that simply creates a BC4J entity for each table in our schema with the appropriate associations between tables. The problem with this approach is that it is very brittle. Any change in the database breaks the BC4J layer and we have to recreate the entire thing. Using the JDeveloper wizzard is labor intensive and we want to automate the task of creating a new O/R layer with a script or Ant task, but unfortunately there is no way to do this with JDeveloper.
Can we use TopLink to generate an O/R layer using a script or Ant task instead of the workbench? It would be a great time saver for us if we could point TopLink to our schema and have it generate an entity per table with the correct associations without having to use the workbench.
Thanks.I have seen some customers do this, although not necessarily with ANT (it was a while ago). We do ship the Deployment Descriptor DTD (search your TopLink install for *.dtd). That should help you generate the mappings. You're on your own with the code, none of the code gen API's are available on the command line outside the MW.
-
Trying to close an app with a shell script which was launched by same app.
This may be simple, but is confusing me. I have an app that executes a shell script at launch. The script is designed to check for the existence of files and if not found, I want to display a message and close the application. The problem seems to be that I can't close the app with the script, since the script was called by the app and the shell is tied up. Does that make sense? I can't close the app because the script/shell is still active. Any ideas?
Just have the script output some value for the app to read and then quit. Once the app reads the value, it will wait for the script to quit (shouldn't take long, especially if the script isn't running anymore) and then, if the value is a flag to quit, quit.
-
How do i transform a layer with maintain aspect ratio through scripting in Photoshop?
Hi,
How do i transform a layer with maintain aspect ratio through scripting in Photoshop? I am expecting your reply.
thanks,
Rajiv.sI don't think your talking apples to apples. First I do not know of any Maintain Aspect Ratio icon in Photoshop. The only icon I think associated with transform is the anchor point icon in the option bar for transform. I think you may referring to the constrain check box in the image size dialog which you can check when resample is checked. Image size effect all layers in the document and the documents canvas size. The document canvas size will be changed to the values in the images size dialog and all layers will be transformed by percentage the canvas was changes while maintaining the layers position over the canvas and the layers I think may be cropped so only pixels over the canvas remain.
I do not know if you know that layers can be any size and have aspect ratios different then the documents canvas.
In your case it sounds like your describing a template that has a canvas size that is 2000px wide be 3000px high a 2:3 portrait aspect ratio. Your image file has a landscape aspect. If you place that image into your template place would by default transform the image so the image would fit within the 2000px by 3000px canvas size there would be a white border top and bottom. You could transform that smart object layer to it actual pixels size activeDocument.activeLayer.resize(100,100, AnchorPosition.MIDDLECENTER); then calculate the size you want to transform its height to. By retrieving the canvas size and the layers boundaries. Divide the canvas height pixel size by the layers pixel height size should give you the percentage you need to use. Make sure you set the ruler units to pixels so your working with pixel values for the canvas and layer size values. The resulting layer will be larger then canvas size keeping the anchor point centered will result in the canvas size masking off both sides. In effect cropping you landscape to a portrait. Note cropping a image from one orientation to the other changes the composition drastically.
If your trying to make a composit like collage you may want to look at my Photoshop Collage Toolkit it will fit images to fill a 2000px by 3000px area http://www.mouseprints.net/old/dpr/PhotoCollageToolkit.html
You could also do centered 2:3 crop that is resized to a 3000px -
Help with scripting: need to import Excel files into PS type layers
Howdy all,
I have a series of TV commercials provided to me as layered PS files. I work in CS3 and export to Avid for editing.
For customization, I need to import their Excel list of phone numbers and duplicate each one into a type layer with existing efx and placement.
There are 30-60 #s, which appear in 2 locations, so automation is key (just finished a 45 # series, and they have more!)
I dont know how to script this, and would appreciate any guidance. I am not asking for someone to do it for me, just help me learn what I have to do.
Dave KoslowFrom Excel save your file out as either CSV or TDT from the drop down 'save as' options. Once you have a plain text file script will be able to read the text file using which ever delimiter best suits you and create an array of string variables that you can use within photoshop to assign to the contents of a text layer…
-
Certain sites, most recently The Daily Show, will not load for me. I get a box that says:
"Warning: unresponsive script
A script on this page may be busy, or it may have stopped responding. You can stop the script now, or you can continue to see if the script will complete.
Script: resource://gre/modules/ConsoleAPIStorage.jsm:157
[Continue] [Stop script]"
Whether I click to continue or stop the script, nothing happens except that the box goes away and then comes up again. If I try to close the tab, it just hangs and then finally shows the box again.
Finally, Firefox just gets completely hung up, and I have to close it out with the task manager.
Meanwhile, everything runs fine in Internet Explorer.
Can anyone please help me solve this problem?
Thanks,
EllenIs DOM storage enabled?
You can check the value of the dom.storage.enabled pref on the about:config page.
*http://kb.mozillazine.org/about:config
You can also try to delete the webappsstore.sqlite file in the Firefox Profile Folder to remove all data (cookies) stored in DOM storage.
You can use this button to go to the Firefox profile folder:
*Help > Troubleshooting Information > Profile Directory: Open Containing Folder
*http://kb.mozillazine.org/Profile_folder_-_Firefox
You can try to reset Firefox and create a new profile.
*https://support.mozilla.org/kb/reset-firefox-easily-fix-most-problems -
Cursor postion with scripting in Adobe LiveCycle ES
Hi,
I have a textfield that populates editable text when we click pdf preview. when I tab the cursor moves to the end of the pharagraph. we are using some screen readers that reads the text. Our requirement is to bring the cursor at the begining of the text when tabbed.
Is it possibe to bring the cursor at the begining of text with scripting.
please post the steps if possible.
Your help on this would be highly appriciated.
Thanks,
Ramesh Punugubati.Hello Jasmin
The "Results" variable need to declared out of the try and catch block, otherwise it won't be recognized when it comes to "close" at the end.
Here is a modified version of your script.
Greetings,
Yasser
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.Statement;
import java.sql.ResultSet;
import javax.sql.DataSource;
import javax.naming.InitialContext;
import java.sql.CallableStatement;
CallableStatement proc_stmt = null;
InitialContext context = new InitialContext();
Connection connection = ((DataSource)context.lookup("java:/IDP_DS")).getConnection();
proc_stmt = connection.prepareCall("{ call CalculateTotal() }");
ResultSet results;
try
results = proc_stmt.executeQuery();
if (results.next())
patExecContext.setProcessDataStringValue("/process_data/@Total",results.getString(1));
catch(Exception ex)
ex.printStackTrace();
results.close();
proc_stmt.close();
connection.close(); -
Gradient-Layer with Creative Suite SDK
Hi,
i wanna create a gradient-layer with the Creative Suite SDK for AS3. Does anybody have a hint for me, to master this task?Have a look at the documentation for the Photoshop Script Listener.
You'll need to install the script listener, restart Photoshop, create your gradient layer, then convert the script listener output (which is extendscript) to ActionScript.
Regards -
Photoshop opens dialog box when trying to fill a layer with transparent pixels locked
This script should set the layer to lock transparent pixels, and then fill the layer with a color. It does that, except when it gets to the fill stage, it opens the fill dialog box, and you have to hit okay.
If you omit the transparent pixel line, it runs as expected, no dialog box.
Is there a way to suppress the box? Or am I doing something wrong that's causing the box to open?
#target photoshop
app.bringToFront();
doc = app.activeDocument;
doc.artLayers[0].isBackgroundLayer = false;
doc.artLayers[0].transparentPixelsLocked = true;
app.activeDocument.selection.fill(app.foregroundColor);Not sure why that happens.
But I would recommend foregoing the locking and using the AM code for a Fill that honours the transparency.
#target photoshop
app.bringToFront();
doc = app.activeDocument;
doc.artLayers[0].isBackgroundLayer = false;
doc.activeLayer = doc.artLayers[0];
// =======================================================
var idFl = charIDToTypeID( "Fl " );
var desc18 = new ActionDescriptor();
var idUsng = charIDToTypeID( "Usng" );
var idFlCn = charIDToTypeID( "FlCn" );
var idFrgC = charIDToTypeID( "FrgC" );
desc18.putEnumerated( idUsng, idFlCn, idFrgC );
var idOpct = charIDToTypeID( "Opct" );
var idPrc = charIDToTypeID( "#Prc" );
desc18.putUnitDouble( idOpct, idPrc, 100.000000 );
var idMd = charIDToTypeID( "Md " );
var idBlnM = charIDToTypeID( "BlnM" );
var idNrml = charIDToTypeID( "Nrml" );
desc18.putEnumerated( idMd, idBlnM, idNrml );
var idPrsT = charIDToTypeID( "PrsT" );
desc18.putBoolean( idPrsT, true );
executeAction( idFl, desc18, DialogModes.NO ); -
Firefox hangs with script running
Firefox takes about 3 minutes to close down even with all extensions disabled. It comes up with a script error:
Script: chrome://browser/content/sanitize.js:85
I've never used Chrome so I don't know what this is referring to. Any suggestions on trying to remove this?I have had this problem reoccurring for several "updates" to Firefox. I am currently on 3.6.13 It was so bad I was ready to switch to Chrome. I would get a "script error" - the program seemed to be in a loop (judging by the CPU usage on the task monitor) and I usually had to just kill the process.
I am on XP Home Edition SP3.
Others have pointed to a problem in the extensions -
I looked at my extensions and apparently the browser had updated Java Console 6-7 times - and the previous versions hadn't been deleted. I deleted all but the latest (6.0.21) and the problems seems to have been resolved. -
hello to all
i have a little problem with my script
I ask you if there is the possibility to activate randomize order in a text animator with script
i have a check box and i try with this function that is
function make_random(random){
if(random){
var animator1 = layer.Text.Animators.addProperty("ADBE Text Animator");
var selector1 = animator1.Selectors.addProperty("ADBE Text Selector");
animator1 = animator1.Properties;
animator1.addProperty("ADBE Text Randomize Order").setValue([on]);
}else{
but do not work
can someone halp me please?
sorry for my englishSee my reply on your other post:
http://forums.adobe.com/thread/1312888?tstart=0 -
Photoshop CS6 - How can javaScript fill blank layer with color?
Hello,
I'm a production artist and I work with PSD files that were created in Adobe Scene7 Image Authoring Tool. These PSDs contain a background layer along with 1-20 alpha channels. My script has to make new blank layers based on the number of alpha channels and then it has to fill the new layers with light gray. The RGB values are 161, 161, 161. I checked the PSCS6 JavaScript Reference pdf, but I don't see a method that would do this for artLayers. (Let me also say that I'm new to javaScript).
Does anyone know how to fill a blank layer with these RGB values?
Here's my script so far:
#target photoshop
// declare variable to contain the active document
var myDoc=app.activeDocument;
// declare variable to contain the number of alpha channels, excluding the RGB channels
var alphaChan = myDoc.channels.length - 3;
// create loop to make new layers based on number of alpha channels and fill each layer with gray
for (a=0; a<alphaChan; a=+1){
myDoc.artLayers.add();
if (myDoc.artLayers.length == (alphaChan + 1)) {
break;var color = new SolidColor();
color.rgb.red = 161;
color.rgb.green = 161;
color.rgb.blue= 161;
myDoc.selection.fill(color); -
Open and close multisim contact with LabVIEW
Can I open and close multisim contact with labview and read the receptor estatus (p.e. lamp)?
Thanks.
Attachments:
Dibujo.JPG 13 KBHi Guddan,
I created a RFC having a query which is taking a long time to execute. So i want to close RFC connection with portals which is via java connector(JCO) before that query and open the connction again after that query.
I guess i will need to understand your requirement a little more in detail, as i understand you have an RFC which has a query within to fetch some data and is taking a long time to do so. In the meantime you don't want to keep the connection open?
My question would be, Is the role of this RFC to only execute the query and fetch the data or does it do something else?
If it does other things and these are independent of the query execution, then you can span a parallel call within the RFC to execute the query and in the meantime the RFC does the other things (or vice versa) hence reducing the overall time taken.
If the sole purpose of this RFC is to execute the query, then you will not be able(i mean to say there is no simple and direct way of doing this) to close the connection after the Query is started and re-establish the connection after its execution, for a simple reason that - how will you know if the query has completed it's execution, so that you can establish the connection back.
Alternate solutions, make this a two way asynchronous call, 1) You invoke the RFC asynchronously and close the connection, the RFC in turn will execute the query and transfer the data to JCO via another RFC call.
If this needs to be a synchronous call, then you will need to optimize the query to its best.
Regards,
Chen
Maybe you are looking for
-
Macbook Pro 13" or Mac Air 13"
Hey, can anyone offer reasons to go with the 13" Macbook Pro over the new Mac Air 13". Plan on keeping this as my primary for the next few years. I heard a rumor that a new version of the Macbook Pro will be coming out in the next few months. Is it w
-
I'm curious what others are doing with sequences in their AppEx applications. I know this isn't strictly an AppEx question - but I recently ran into serious problems because of my choice of how I'm using sequences. The problem goes something like thi
-
JAXB External Binding to java.util.Collection
Hi, By default jaxb converts xsd:sequence to java.util.List. Is there any way to specify that during compilation it will use java.util.Collection instead of List? TIA, Herculeus Edited by: herculeus on May 19, 2009 2:12 PM
-
Opening a imovie 3 movie into imovie HD
I created a movie in iMovie 3 and I want to move it to another computer that has iMovie HD. I have tried to move the files but when I open the movie in iMovie HD all I see is a blank (black) movie. Is there a way? (Please don't say no...) Thank you f
-
FEATURE LENGTH NEEDS TO EXPORT AS A 2 GIG FILE
Hello anyone! I am attempting to export an entire feature film that I have edited (to the director) to be a mere 2gigs so that I can attach it via YouSendIt. Any suggestions? I have tried to export via QT Conversion H.264, at a lower res. but the f