Created
          November 29, 2012 05:36 
        
      - 
      
 - 
        
Save seblavoie/4167023 to your computer and use it in GitHub Desktop.  
    After Effect text number range
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | { | |
| app.beginUndoGroup("Script"); | |
| compSettings = cs = [1280, 720, 1, 1, 24]; | |
| currentProject = (app.project) ? app.project : app.newProject(); | |
| currentComp = (currentProject.activeItem) ? currentProject.activeItem : currentProject.items.addComp("Timeline", cs[0], cs[1], cs[2], cs[3], cs[4]); | |
| currentComp.openInViewer(); | |
| textLayer = currentComp.layers.addText("Range"); | |
| textLayerSourceTextProperty = textLayer.property("Source Text"); | |
| startSlider = textLayer.Effects.addProperty("Slider Control"); | |
| startSlider.name = "Start"; | |
| startSlider.property("Slider").setValue(1); | |
| endSlider = textLayer.Effects.addProperty("Slider Control"); | |
| endSlider.name = "End"; | |
| endSlider.property("Slider").setValue(5); | |
| textLayerSourceTextProperty.expression = "var v = ''; \ | |
| for(var i = effect('Start')('Slider'); i <= effect('End')('Slider'); i++) { \ | |
| v += ' ' + i; \ | |
| } \ | |
| v;"; | |
| app.endUndoGroup(); | |
| } | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment