Using scripts to create expressions?
I am trying to automate the creation of a bunch of expressions rather involved. Is - this it is possible to write a script that creates an expression? For example, can I write a script that sets the position of a layer to "wiggle (5,10)?
And conversely, a script can access the source code of an existing expression? If I look at the value of a layer that has a wiggle function, I just get the wiggle, not the actual code value generating these random values.
To set an expression:
myLayer.property("Position").expression = "wiggle (5,10);
To retrieve an expression
var myExpr = myLayer.property("Position").expression;
Dan
Tags: After Effects
Similar Questions
-
Use scripts to create digital orders without button increase/decrease
I'll have fun using scripts to do things that were once "impossible", like the creation of a cluster programmatically in a list of variable names and their types associated with (use in a later program).
When I create a digital control on a front, she has the visible increment/decrement key, by default. I wanted to create controls without this feature, but I could not understand how (or even if it is possible, but I don't see why not).
Any ideas?
BS
Just above the digital named menu item is the one you are looking for: digital
Use the digital constant digital control for Style and class.
-
I want to create new sequence from a clip using script.
I want to create new sequence from a clip using script.
You can pop the dialog box new sequence (which requires interaction from the user to confirm the name of sequence), or create a new sequence from a .sqpreset file (and specify the name); There is no API around the feature 'make a sequence corresponding to this project item', available in the project Panel.
-
How to apply the expression using script?
I use a script and an expression to automate all the layer selected to attend the control layer. So, I've do it now in two steps, first make a layer of control using this script:
{
model var = app.project.activeItem;
var slctd_layer = comp.selectedLayers;
var new_adjustment = comp.layers.addSolid ([1,1,1], "Control", comp.width, comp.height, comp.pixelAspect, comp.duration);
new_adjustment.adjustmentLayer = true;
var addSlider1 = app.project.activeItem.selectedLayers [0]. Effects.addProperty ("ADBE Slider Control");
addSlider1.name = "time";
addSlider1.property (1) .setValueAtTime (0, 0.06);
var addSlider2 = app.project.activeItem.selectedLayers [0]. Effects.addProperty ("ADBE Slider Control");
addSlider2.name = "opacity";
addSlider2.property (1) .setValueAtTime (2, 0);
addSlider2.property (1) .setValueAtTime (2.03, 100);
}
Then, I select all the layer under the control and apply the expression, for example:
delay = thisComp.layer("Controler").effect ("delay") ("Slider") * index;
t = time + delay;
exp = thisComp.layer("Controler").effect ("opacity")("Slider").valueAtTime (t);
exp;
I'm working on an animation of the tight timelines and tons of materials with tons of layer for each model now. So I think that if it is possible to combine this stage two in a script that will automate this work for me. I'm still new to scripts and none need help with it. Thank you
Like this:
var ease = new KeyframeEase(0,100/6); // speed (0 for easeIn or easeOut, influence range: 0-100) var addSlider1 = new_adjustment.effect.addProperty("ADBE Slider Control"); addSlider1.name = "delay"; // 1st key: value + ease addSlider1.property(1).setValueAtTime(0, 0.2); addSlider1.property(1).setTemporalEaseAtKey(1, [ease], [ease]); addSlider1.property(1).setInterpolationTypeAtKey(1, KeyframeInterpolationType.LINEAR, KeyframeInterpolationType.BEZIER); // 2nd key: value + ease addSlider1.property(1).setValueAtTime(2.03, 0.03); addSlider1.property(1).setTemporalEaseAtKey(2, [ease], [ease]); addSlider1.property(1).setInterpolationTypeAtKey(2, KeyframeInterpolationType.BEZIER, KeyframeInterpolationType.LINEAR);
(The use of setInterpolationTypeAtKey is not necessary, it is only there to do things similar to what you would get by doing things by hand).
Xavier
-
Can a plugin be created using Visual Studio 2010 Express?
Hello
Just wondering if a plugin can be created by using Visual Studio 2010 Express? Its for a PC in the first place.
Thank you
Yes you can use VS Express for the PC version of your plugin.
-
How and where to use Java script to create a new button in the page of detail of the object
Hi all
I want to create "New/Add button" in the page of detail of the object. If I'm not mistaken I need to use the java script for this, but could you please let me know how and where to use Java script to create a new button in the page of detail of the CRMOD object.
Thanks in advance.
Kind regards
ManishAny related object on the details of the page should have an 'Add' or 'New' or the two default buttons - it of a vanilla feature and will do the required action.
If you want to change this behavior and do something delicate you will potentially have to to go for javascript. You must add the javascript code in a web custom tab on this object.
Admin--> Application Customization--> Contact--> Applet Web Contact
Now add your javascript in the code box, after selecting the type = HTML for this web applet, expose this web applet on the Contact details page layout and your javascript will be called every time this page is loaded.
Check this document online to see how javascript can be integrated into the CRM on demand http://helponmyproject.com/TTOCOD/
See you soon!
Royston -
How to create a form of free paths using script?
Hello
I want to create a form in which I add multiple points
I try to use GraphicLine, but it adds no way point in this
var myGraphicLine = myPage.graphicLines.add ();
myGraphicLine.paths.item (0).pathPoints.item (0) .anchor = [72, 72];
myGraphicLine.paths.item (0).pathPoints.item (1) .anchor = [72, 144];
myGraphicLine.paths.add ();
myGraphicLine.paths.item (1).pathPoints.item (0) .anchor = [72, 144];
myGraphicLine.paths.item (1).pathPoints.item (1) .anchor = [90, 100];
myGraphicLine.paths.add ();
myGraphicLine.paths.item (1).pathPoints.item (0) .anchor = [90, 100];
myGraphicLine.paths.item (1).pathPoints.item (1) .anchor = [110, 144];
myGraphicLine.paths.add ();
myGraphicLine.paths.item (1).pathPoints.item (0) .anchor = [110, 144];
myGraphicLine.paths.item (1).pathPoints.item (1) .anchor = [144, 72];
I want to create a W shape using script type.
How to create a form of type free paths (like those drawn with pencil or pen tools) using js?
Thank you
This is because you create separate ways. Create just a first, and then add all the pathpoints.
Do not forget that all first path you create comes with free first 2 points, so just move these in the position as shown above. Then add the new points to the same path, rather than create new ones (lines #4, #8, and #12 in my example).
-
Script to create folders using Photoshop Mac/Windows Scripting
Can someone help me. I want to create a script to create folders and run the script in Photoshop.
I am a real novice at the script, and I don't know if it can be done.
Thank you
Folder to create on the desktop
var folder = Folder1 ("~/desktop/My new folder");
Check if it exists, otherwise create it.
If (!) Folder1.exists) folder1.create (); -
How to create queues for JMS using Scripts
Hi all
I want to create the JMS queue in weblogic server 8.1 running scripts.
Can someone give me scripts and how to run the scripts...
I have the WLshell scripts to create the JNDI and JMS queues, but I don't know how to run the scripts.
Please help me on the same.
Thank you
Amandinehttp://eDOCS.BEA.com/WLS/docs91/config_scripting/using_WLST.html#1078952
-
Solo Composition layer using scripts
Hi all
I'm looking for a way to scroll the layers by using scripts.
The ultimate goal is to create a customizable slideshow very quickly.
In this project, I have several boxes, in which I show a Composition. Each publication contains only a stack of layers (easily editable with drag and drop) with a different photo on each layer.
Using a Slider control, I want to scroll through the photos of a composition. For example: when I select a value of 4 with the cursor, the fourth layer is made visible. In this way, I could keyframe the cursor to select a photo.Any thoughts on how to accomplice this? I can't find a good site on the scripts of events of the time. Most of them contain only motion scripting.
Thanks in advance!
I think you'd want an expression here, not a script. I would use an expression to opacity (on each of the photo layers) with an expression as follows:
s = / / link this variable to your cursor.
(Math.round (s) is index)? 100: 0;
Dan
-
Save the customized using MS Office report Express VI filename
When my program creates a report, I want to save it as a serial number, defined in the report. I want to use MS Office report Express VI to do this, but unfortunately it only allows you to save the file name as time and/or incremental number.
Hi jliu317,
In the meantime that warn you the moderator to move your thread, here is my solution. (Correct me if I'm wrong)
In MS Office Report, there is a block diagram entry named path to save the report. That is where you can save your report in Word (.doc) or Excel (.xls) under the name of file custom as serial number, as shown below.
http://zone.NI.com/reference/en-XX/help/370274G-01/lvoffice/ms_office_report/
I hope this helps.
EE - Lim-
-
Create Express VI with numbers and types of terminals
Hi, I am trying to create an express vi which has different numbers and types of output terminals depending on what the user selects. Can someone point me in the right direction? Anyone know where I can find examples or tutorials?
Assuming that you * really * want to do this, you can buy a Toolbox to CREATE Express screws. I personally use screw Express on as many times I use local variables (ie. not if I can help it). I recommend that you consider polymorphic screws instead (search for polymorphic aid). If you really want to go on the road Express, you'd better hurry, the Toolbox is only sold for another week.
-
Dump to IMPORT ORACLE 9i to ORACLE 11 G database by using script
Hi all
I'm trying to import a dump of an Oracle 9i database from exp in the Oracle 11 g database using script.
(1) the export using 9i client script:
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
#! / bin/sh
testsync_home= / home/oraexp / / DMPtestsync
log_home =/ home/oraexp/testsync/log
file userid=test/test@testsource exp = $testsync_home/usr 'date' + %m %d %Y ".dmp tables =userdata2015 ACCORDING = y compress = buffer n = 655350 log = $log_home/exp_test_usr.log
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
2) the import using 9i client script. Import the dump into Oracle database 11g. The imp can't exit normally, although the data has already been imported into the testdb.
If the next part of the script can't be executed.
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
#! / bin/sh
"sync_date ='date + %m %d %Y"
testsync_home = / home/oraexp/testsync/dmp
log_home = / home/oraexp/testsync/log
sqlplus test/test@testdb < < EOF
truncate table userdata2015;
commit;
quit smoking
EXPRESSIONS OF FOLKLORE
file userid=test/test@testdb IMP = $testsync_home/usr 'date' + %m %d %Y ".dmp fromuser = touser = test test tables = userdata2015
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Can you please give me some advice on this situation?
Thank you very much in advance.
DO NOT USE THE DATAPUMP.
You do not use expdp and impdp.
You will use the 9i client exp and imp 11g client.
-
Cannot generate webhelp, using a conditional compilation expression
Background
- RoboHelp 7 HTML (I know it's old)
- Windows 7
- Project still has conditional text - webhelp update / generated successfully about 4 months ago.
- Other projects of mine who have conditional text are still working fine - which means that I can generate webhelp successfully, using an expression of conditional compilation for all my other projects.
Problem
When I try to generate webhelp for this specific project, RoboHelp crashes during the progress "update files" message. The only way out is to entirely close HR. Successfully, I can generate webhelp for this specific project if I don't use ANY conditional compilation expression.
What I tried
- As stated above, I can generate webhelp for this project if I do not use a conditional compilation expression.
- I tried the following in different combinations: removed all conditions and conditional text tags, removed the .pss file, which is deleted the file .cpd, looked at table formatting, created new conditions with new names. Result is always the same: HR crashes if I use a conditional compilation expression.
Things I noticed
- The project root file has many temporary files in Robohelp after the failure of the generate. If I generate thereafter with no expression of conditional compilation, temporary files are gone. This is probably normal behavior HR.
- After I deleted all the conditions and conditional text on every topic references, I added a new condition. I did NOT mark any conditional text. I have added a conditional compilation expression. Generate crashes.
Any ideas would be appreciated!
Hello! I had the same problem. It turns out that it was a problem with one subject! Talk about a needle in a Hay stack! Specifically, it was a problem with a cell that had a condition applied (the last cell of a table).
Note: The way in which this table was split and merged and had conditions applied (on certain columns, others not)... I'm not surprised, that there was a problem.
Action taken:
- Created a new project. (you wanted to see if it was a problem with my project might be corrupted or if it was something with the files and/or conditions).
- Imported from all subjects, recreated WebHelp SSL, tried to regenerate, he hooked (good news: not my bad news of project.: I have to dig further).
- Created another new project.
- Import a file that had all my conditions in there so that I can recreate my WebHelp SSL (with conditions having been imported into the new project).
- I generated the WebHelp unconditionally excluded. Worked.
- I generated the WebHelp with the same exclusions defined as I had in my original draft. Worked.
- I imported the 5 themes of my original topic and regenerated. Worked.
- I continued to repeat topics 5 both importers and regeneration until it didn't work.
- Remove the last 5 years (generated after the deletion, just to make sure it was ok), then imported one at a time until the generation has failed and the project was not admissible.
- Once I identified the subject that created the issue (did not know what the problem would be even), I have started another project and imported the topic problem ONLY. Then, I removed 3/4 of the subject and regenerated. Worked. Any new topic (replacing the stripped down in the topic) and this time I deleted less content. Regenerated. Did not work. This helped me to identify the specific area that was causing the problem which, in my case, was the construction tag closing after the table tag.
If it's the same problem, you may save time and find this string to identify: " ?rh-cbt_end> "
I hope this helps! Good luck
-c
-
Script to create multiple virtual machines model works is not for the network adapter variable
We are working on a script to create multiple virtual machines from a template. The script works fine, but when we try to include commands to set the NIC to a group of specific ports on a dvswitch script errors on. Here's what we have so far. This script (less network variables) works, but we would like to include the network configs in the script as well.
-------------------
This is the part of the script that configures the network/dvswitch adapter... but does not work properly.
$myResourcePool = get-ResourcePool-name DQOL
$dsName = get-Datastore-name "DQOL-DS01.
$myTemplate = get-Template-name "DQVTemplate".
$distributedSwitchPortGroup = get-VirtualSwitch-distributed - name "CVE-dvS04-Nexus - k 5 | Get-VirtualPortGroup-name '979-DQ-SHARED '.
New-VM-name MyVM1-model $myTemplate - Networkname ResourcePool - $myResourcePool - OSCustomizationSpec $mySpecification $distributedSwitchPortGroup - Datastore
(Get-$dsName data store)
New-VM-name MyVM2-model $myTemplate - ResourcePool $myResourcePool - OSCustomizationSpec $mySpecification - Datastore (Get-$dsName data store)
_____________________
!!!!!!! This part works, but without specifying a network/dvswitch... card!
$myResourcePool = get-ResourcePool-name DQOL
$dsName = get-Datastore-name "CVE-SAN-ISG-DS02-02ef.
$myTemplate = get-Template-name "DQVTemplate".
New-VM-name MyVM3-model $myTemplate - ResourcePool $myResourcePool - OSCustomizationSpec $mySpecification - Datastore (Get-$dsName data store)
New-VM-name MyVM4-model $myTemplate - ResourcePool $myResourcePool - OSCustomizationSpec $mySpecification - Datastore (Get-$dsName data store)
Here is the error we get:
New-VM: all parameters can be resolved by using the specified named parameters.
C:\Users\capuanoj\Desktop\Create-multiplevms-fromtemplate.ps1:6 char: 7
+ New-VM < < < <-name MyVM1-model $myTemplate - Networkname $distributedSwitchPortGroup - ResourcePool
ePool - OSCustomizationSpec $mySpecification - Datastore (Get-$dsName data store)
+ CategoryInfo: InvalidArgument: (:)) [new-VM], ParameterBindingException)
+ FullyQualifiedErrorId: AmbiguousParameterSet, VMware.VimAutomation.ViCore.Cmdlets.Commands.NewVM
You cannot use the - model and Networkname - parameters of the cmdlet New - VM in a single order, because both are in different parameter sets. You must first create the virtual machine and then use the cmdlet Set-NetworkAdapter to change the portgroup of the virtual machine. As in example 4, assistance from cmdlet Set-NIC:
-------------- Example 4 --------------
C:\PS>$myNetworkAdapters = Get - VM | Get-NetworkAdapter-name "NIC 1.
$myVDPortGroup = get-VDPortgroup-name MyVDPortGroup
Together-NetworkAdapter NetworkAdapter - $myNetworkAdapters - $myVDPortGroup PortgroupRetrieves all network named "NIC 1" cards of all virtual machines and connects to the specified distributed port group.
Maybe you are looking for
-
I tried to enter in Firefox today and he said he was doing an update and Firefox would start in a minute. He did, but I was unable to access a Web page, including of mozilla.org. I thought I had a problem with the internet connection, but I could pin
-
1. to Stor.E TV - files are empty
Hello I hope for your help. I have a 1 TB Store.E.TV. Attached to the PC, all the folders and files that I copied above appear. But when connecting to my TV, there is no more than all the files or folders are empty. Can please someone tell me where i
-
I can't access my hotmail ACC. I think it has been hijacked! How do I please you?
My Hotmail seems to have been hijacked. I can not access it and does not accept my password. Help please? Thank you
-
Hi, my laptop is a sony vaio vgn-fz11s, has been updated to windows 7 Vista a year or more ago, this problem has recently started doing this, such mentioned in the battery is exhausted, I don't know if this could be a link to this problem.
-
Computer laptop lag in the game in 30 minutes?
HelloMy computer laptop lag during the game and when I start my laptop it emits a sound engine. It's hard to explain, but when I play for about 20 min and I can really hear my fan turns and then my computer lags in gameplay. If anyone can help it wil