Drop Down List index - my script does not recognize the leader line in my function

Community AE script-

I'm a designer not a programmer naked with me.  I just try something simple, no baby and I cannot for the life of make me this simple script to work.

I saw the script adds FAST and thought I would try to imitate this script for me as a challenge.  I watched videos of David Torno on Pro video Coalition and a simple example Script UI.  I searched for my answer on these here forums and tried to combine a simple script to examples within these forums and may not have to recognize clues to my drop-DOWN LIST down.  Here's my simple script:

{

function myScript (thisObj) {}

function myScript_buildUI (thisObj) {}

var myPanel = (thisObj instanceof Panel)? thisObj: new window ('palette', 'Add', undefined, {resizable: true});

res = "group {orientation: 'row', alignment: ["fill","fill"] alignChildren: ["fill","fill"],------}»

groupOne: group {orientation: 'row', alignment: ["fill", "fill"] alignChildren: ['fill', 'top'],------}

myStaticText: StaticText {text:'New:'}, \

myDropDownList: DropDownList {properties: {items: ['solid', 'Light']}}, \

},\

groupTwo: group {orientation: 'row', alignment: ["fill", "fill"] alignChildren: ['fill', 'top'],------}

MyButton: button {text: 'Add'}, \

},\

}";

myPanel.grp = myPanel.add (res);

Default values

myPanel.grp.groupOne.myDropDownList.selection = 0;

myPanel.grp.groupTwo.myButton.onClick = myButtonClick;

Design of Control Panel

myPanel.layout.layout (true);

myPanel.grp.minimumSize = myPanel.grp.size;

Make the resizable Panel

myPanel.layout.resize ();

myPanel.onResizing = myPanel.onResize = function() {this.layout.resize ()};

Return myPanel;

}

function myButtonClick() {}

var app.project.activeItem = myComp;

If (myComp! = null & & myComp instanceof CompItem) {}

If (myPanel.grp.groupOne.myDropDownList.selection.index == 0) {}

myComp.layers.addSolid ([0,0,0], "MySolid", myComp.width, myComp.height, 1)

} Else if (myPanel.grp.groupOne.myDropDownList.selection.index == 2) {}

myComp.layers.addLight ("Light", [myComp.width/2, myComp.height/2]);

}

}

}

Make a floating window

var myScriptPal = myScript_buildUI (thisObj);

If ((myScriptPal! = null) & & (myScriptPal instanceof window)) {}

myScriptPal.center ();

myScriptPal.show ();

}

}

myScript (this);

}

If I comment out the lines

If (myPanel.grp.groupOne.myDropDownList.selection.index == 0) { and If (myPanel.grp.groupOne.myDropDownList.selection.index == 1) { }}

the script will add the SOLID and LIGHT.  But it will never work with these active lines - Add button does nothing.

I could just make use of onChange with the drop-down list, but I want to understand how onClick actions of connection in the drop-down list.

I copied this piece of the forum script and modified to work with my script, but nothing seems to work:

buttonOne.onClick = onButtonOneClick;

function onButtonOneClick() {}

If (myPalette.dropdownlistOne.selection.index == 0) {}

to do this

} else {}

This instead

}

}

Can someone take a look at my script at the top of the page and tell me why this won't work?  I pretty much pulled out the last piece of hair I have on this - simple problem?

Thank you in advance.

Your click of button function does not know what "myPanel. You could do something like this inside the function:

var this.parent.parent.parent = myPanel;

There are other ways to do it, maybe as a global variable that maintains the reference of the Panel.

In addition, your second if looking for selection.index == 2 instead of 1.

Dan

Tags: After Effects

Similar Questions

  • My index drop-down list of bookmarks installation does not include an option to export my absolute Favorites HTML file for security purposes. How can I do a safety case separated from my favorites please?

    I'm on version 4.0.1

    The drop-down list of bookmarks index includes only:
    Bookmark this page
    View all bookmarks
    The toolbar of bookmarks (export done on this etque ease)
    Recent tags
    Recently bookmarked
    Download bookmark modules
    These stars following is a complete list of all my favorites.

    The Tools dropdown has no export function is

    the help file "export bookmarks to an HTML file indicates it is a menu drop down called"Organize bookmarks"- is not a."

    I have an urgent need to save this file because I have to do a reinstall of Windows and my 'C' drive will be erased!

    Thank you, Richard Townsend

    Organize bookmarks has been renamed to display all bookmarks in versions of Firefox 4 +.

  • Why my Bucket fill tool does not recognize the gray lines?

    First of all, I'm in RGB, with Photoshop Elements 6.  I am filling an area of the business (the building on the left) Center in my drawing, but it goes both the door lines and the text on the building.  With the center of students (the building on the right), it's the same thing with one of the gray lines (but not the text).  And it's under a layer (used to be composed of several layers, but have been merged into one).  What should I do?  Here's a picture of him down below:

    Midtown_scene2.jpg

    A value of lower tolerance of about 3 to 6 should work better.

    Tolerance allows you to adjust the sensitivity of the paint bucket tool is of different colors.

  • I have one drop-down list box where one selection (options) is the other.

    I have one drop-down list box where one selection (options) is the other. If a user selects the other, I want to conceive the possibility for them to enter some Notes to describe their other. A pop-up window or the text box is possible? Do not know how to approach the issue... Thank you!

    The field in parentheses is the text (or drop-down menu or other) you want to display when "Other" is selected and hide when it is not.

    If you want to apply the same logic to several fields just duplicate this line of code, the field name in each copy of setting.

  • If I click on Favorites and then scroll through the list of favorites, it does not show the entries in each file.

    * Original title: to access Favorites

    If I click on Favorites and then scroll through the list of favorites, it does not show the entries in each file but suddenly close showing the list of favorites. . I use Chrome and it happened all of a sudden. It was functional this morning. All the advice to fix this will be greatly appreciated

    Have you tried the Chrome forum? https://productforums.google.com/forum/#! forum/chrome

  • Tips on how to get attached with Nikon D810 and Lightroom - I tried with the uSB cable but Lightroom does not recognize the camera. My memory card has no images on it that I read somewhere that it can slow things down if it has pictures on i

    I tried to use the uSB cable, but Lightroom does not recognize the camera. My memory card has no images on it that I read somewhere that it can slow things down if she has no images on it

    If you use Lightroom CC / 6 on a Mac OSX El Capitan you must update to the latest version of CC 2015.4 / 6.4. Problems with Nikon capture home has been fixed in the latest update, the lis below.

    Lightroom Journal | Tips and advice straight from the Lightroom team.

  • New installation of XP PRO sp3 does not recognize the 500 GB HD

    OK, here are the details:

    System: Computer PORTABLE of Acer Aspire 1700 Pent4, 2 GB of RAM, 80GB (3.5 "full-size, trainee) IDE HD [this is the original HD on this laptop of size important which is designed to use disks 3.5" hard].

    Initial situation: Windows XP Pro (SP3 integrated) installed on HDD of 80 GB and works without poblems. BIOS does NOT show the ability of the intern HD in the BIOS screen. BIOS reports only the model and the serial number of the HD, and there is no options to specify the HD type/format (e.g., MLA, etc.)

    Available: Win XP Pro bootable CD slipstreamed with SP3; It is tested and verified work well to install PC or laptop!

    When running XP Pro on a partition internal 80 GB HD, and when I join a brand new WD 500 GB IDE HD via USB, HD is recognized correctly. I can partition and copy data on the HD 500 GB with no problems!

    When I replaced the old 80 GB HD with the new HD 500 GB HD interning on the laptop, I have the following problems:

    1. I can NOT boot into Windows XP Pro (SP3) which was Ghost on the HD 500 GB of the old 80 GB portable HD it recharges, and if I try the console recovery or secure boot, then the laptop restarts also.
    1B. I have Ghost xp partition to 80 GB HD to a piece of spare HD (40 GB) and replaced the 80 GB with the 40 GB HD and was able to start the laptop without problem. So the problem is NOT related ghost!

    2. I can't perform a clean install of Windows XP Pro (SP3 integrated) because Windows XP Setup recognizes the HD 500 GB GB 131 HD. Therefore, the remaining capacity is not recognized.

    3. I can NOT perform the installation of Windows XP pro (SP3 integrated), even if I have previously partition new HD 500 GB by attaching it to a free desktop PC and use Partition Magic, partitioner of Paragon Disk or other partitioning tools. After partitioning prior, when the 500 GB HD is installed on the laptop (as a trainee HD), then win xp installation lists quality HD of GB 131 and lists the existing partitions as corrupt!

    4. Curiously, if I use Knoppix, Debian, Ubuntu or linux boot CD Mint and start the laptop computer with one of these linux distributions, then the linux installer recognize the HD properly during the phase of recognition of material and later during the phase partitioning HD, the linux system to report a full capacity of 500 GB available for partitioning. In addition, when there are partitions, partitioning linux program then lists these partitions properly as well!

    Considering the 4 points and especially MS Windows XP PRO (integrated with SP3, which should recognize HD with sizes exceeding 137 GB limit - from MS says you must be at least XP SP1 to overcome the size 137 GB limit - and that the different distributions of linux can see the full-size HD 500 GB with no problems) which is exactly the problem with Win XP? Why it does not recognize the full capacity? And how to win xp recognizes a 500 GB capacity, if the new HD is attached to the laptop via USB as an external drive when running XP PRO (SP3) of the 80 GB internal HD?

    so... Can anyone sheds light on the issue with Win XP Pro installation on HD 500 GB IDE?

    Nicely,

    LO

    Hi Palcouk and Doc,

    I think that's the final answer!

    Although, there is a mixture of simple to complex responses to the problem at hand, what it all comes down is that there is a significant difference between the installation of Windows XP and Linux installer program. The XP installation program needs help from the BIOS to deal with HD, and if the BIOS does not support, XP not has no facility to remedy the situation. OTOH, most of Linux new kernels rely on the BIOS for a limited number of extended, but communicate directly with the hardware, in this case, with the HD and therefore manages the material accordingly.

    It seems among users of dual-booting (win/linux) using old PCs, it is a matter of very pretty. What they end up doing is using the first 137 GB that is seen by the BIOS without problem for XP (either as a single partition or divided into several partitions), and the rest of the space is used for Linux because linux has no problem.

    I guess that it really nails the problem with my laptop to a BIOS NON-lba-48-bit!

    Then close this thread as answered or matter who has more to say about this?

    LO

    P.S.: It was very nice meeting you fellows and appreciate all the help and tech expertise.

  • Satellite C650 - 1 CT does not recognize the CD/DVD

    Hello

    I currently have a problem with my model Toshiba C650 - 1 CT (PSC08E-03M001EN) satellite. The laptop does not recognize the CD/DVD and a check in the "Device Manager", said a damaged device driver!

    Now, my problem is that I searched on the internet and also on the websites of Toshiba for the right driver, but no use. The device (DVD) opctical no not also appears in the list of devices 'removable '.

    System details:

    Satellite C650-1 CT PSC08E-03M001EN
    OS: Windows 7 64-bit
    Place/country: United Kingdom

    Assistance in finding the right driver or advice how to solve the problem will be highly appreciated.

    Thank you
    Lamin

    Post edited by: jammehkunda

    As first step try please remove the optical disc drive from Device Manager and restart your laptop.
    After doing this review please the Device Manager and let us know if the problem persists.

  • Windows Media Player does not recognize the new downloaded songs

    I have a Pavilion a4310f Prod Nr: race AY014AA-ABA, Win 7 Home Premium 64-bit.

    I just found out that Windows Media Player does not recognize the songs, I recently downloaded from Wal-Mart music download Site.  The songs can be seen in the music library in a folder called 'Downloads' and I can open each song and he will play when double-clicked.  The problem is that I can't create a playlist containing the new songs and burn a copy of the reading list, because the songs are not listed in the Media Library Player any hot it is sorted (artist, Album, Genre, etc.).

    Any help/suggestions would be greatly appreciated.

    Mitch

    Problem solved!

    Went to: start == > Control Panel == > troubleshooting == > view all == > and ran troubleshooting on the library and the settings of WMP.

    Convenience store detected library corrupt and "in media files appear in the WMP library.  Then ran convenience store on WMP settings which reset OMP to default settings.  After that, everything worked as announced.

    Thanks to Big_Dave for putting me on the right track.

  • Windows 7 does not recognize the installation discs

    Hello

    I have a problem, and I don't know if there is a solution, but here goes.

    My laptop is a HP DV6-7029WM Windows 7, 64 bit.

    The hard drive was dead, and he was replaced last month.  I sent it to HP.  C is the hard drive, and was originally the recovery on D. Removable media were on E, and when I connected a USB stick or memory card reader it would on F.

    When I came back, hard drive was on C as it was originally, and there was no recovery drive D. D is now my removable media drive. When I put in a USB stick or a memory card reader, which is now on the E drive.

    After I bought this, I put the recovery on a USB key, but I've accidentally thrown out. (My mistake) So I ordered the installation diskettes after that I return my HP PC.  I had 2 DVD system recovery disks and an Application and a recovery DVD Drivery.

    I want to reinstall Windows back to the default settings. I put disc 1 (System Recovery DVD) and close.  I reboot and it goes directly to the office. I hear the whirring disc, but nothing happens.

    I go to the control panel > Recovery > advanced retrieval methods. I click on restart, and it loads files and then says DVD set, which I do. He told me that he does not recognize the installation disc.

    I googled this problem and found a poster on CNET that had the same problem as I do. Also, I can't do a system restore.  My problem is the same as this poster on CNET.  I can read DVDs and CDs.  Those that work very well.

    http://forums.CNET.com/7723-19411_102-568059/Windows-7-installation-disc-not-recognized/

    The files are on the DVD, because I see them.

    I don't know what to do. Should I send my PC back? Can I do to solve this problem?

    Thanks in advance.

    pen

    Hello:

    With recovery disc 1 into the DVD drive, restart the computer and at the beginning of the HP welcome screen, press the ESC key to display a menu of options.

    Select the F9 boot menu option.

    Select the DVD drive on the list of bootable devices, and press the Enter key.

    Watch the screen for additional instructions.

  • Western Digital WD10EARS internal hard drive Caviar Green 1 TB - my system does not recognize the new drive

    I recently bought a computer Dell 4700 to a friend with Windows XP installed. I've updated the memory to 2 GB and now seeks to install a WD10EARS 1 TB harddrive. The new works of fine memory is not the hard drive. My system does not recognize the new drive. I contacted WD for help and they told me to try diferent rider combinations that were Jumper 1-2 and 5-6, still does not work, I checked the hardware compatibility list and he said he would start uo without modification. This isn't. I would be very greatlyful for any suggestions, to HELP!

    I've had several people tried to help me solve my problem. They were all, I thought, more than I am computer savvy. As time progressed, solutions became more complex. After they all left without resolution I thought and it appeared to me that the simplest solution might be correct. One person had checked. I turned on the computer and when the Dell logo came I pushed the F12 key to open the Dell configuration screen. The drive on which the new drive has been installed has NOT been activated! Duh! I activated the he and the program Acronis recognized and everything went like clockwork after that. Phew! What relief! Thank you for your comments I am just glad that my problem it doesn't require resolution. Are Mod

  • HP officejet 6600 my laptop does not recognize the printer

    My laptop does not recognize the printer any longer. It will recognize the fax on the printer but not the printer itself. Can you help me? I have two currencies on my laptop. HP officejet 6600 and hp officejet 6600 network. Even printing for both. One network is the fax. I'm not clear what is the question. I can't even download drivers or updates for it.

    There are two 6600's in the list, a fax and a printer, because the full feature software and drivers have drivers for both. If you do not use the fax, you can remove devices and printers.

    A work print from other sources? For example Notepad?

  • iMac does not recognize the function analysis of the LaserJet Pro

    My iMac has OS X v. 10.7.3.  It does not recognize the analysis function of the HP LaserJet professional M1217 MFP nfw which is connected wireless.  I can print with the HP success but the dialog box not incllude not a scan option.  I can't scan from preview or iPhoto or (as suggested by some rsources).  I tried to connect the printer LaserJet by USB but that doesn't solve a problem either.  I uninstalled and reinstalled the software, including HP PrinterDrivers.pkg.  I get the automatic updates from Apple which have not helped.

    Hello

    I apologize for any inconvinence,

    The Director of HP taken do supported by Lion for some specific models, including the M1217.

    However, as mentioned above, only the latest version of the software supported by Lion. any prior version of the software is not supported by the operating system.

    If you have not installed the complete softwatre features attached to my previous post, please be sure to install it. It is compatible with Lion you will find listed on the download page.

    Compatibility: Mac OS X 10.4, Mac OS X 10.5, Mac OS X 10.6, Mac OS X, Mac OS X 10.7 
    

    I appriciate if you can guide me where you see the information that the HP Director is not supported by the OS, I can't take any possible measure to get it corrected.

    Thank you and best regards,

    Shlomi

  • BlackBerry Q10 Q10 does not recognize the sender of sms

    I have a big problem.

    My Q10 is recognize my contact when I am called, but does not recognize the sender of the text message when I get one.

    Let me explain.

    I'm from Romania. The prefix for my country + 40 TR.

    Our mobile numbers starting with 07XX.XXX.XXX

    When you call from another country you put only + 40 then the number of laptop without the 0 (+ 407XX.XXX.XXX)

    In our country are 4 mobile operators (Vodafone, Orange, Cosmote and Digi).

    There is a situation when if you are called to another network, the number makes an appearance with the prefix of the country as + 407XX.XXX.XXX and my Q10 recognizes not the same if the appellant, it is in my contact list.

    Today, I noticed another BIG PROBLEM.

    So, I have in my contacts... John Smith with 0722.123.456.

    When I am called by him, it apears John Smith, but when I recive text message from him, it apears + 40722.123.456.

    My stupid Q10 does not recognize the contact!

    If I change the number on my agenda and I put + 40722.123.456 to John Smith, he acknowledged the sender of text, but it does not recognize the appellant (when I get a call from John Smith), it apears 0722.123.456.

    I used a lot of o phones: Nokia (many models), Iphone, Siemens, Samsung, etc, since 1996.

    I NEVER HAD THIS PROBLEM UNTIL TODAY!

    EVEN WITH THE OLD MODELS AND STUPID OF NOKIA!

    I CAN'T BELIEVE THAT THE NEWEST SMARTPHONE ON THE MARKET HAS THIS BUG!

    I HOPE THAT SOMEONE WILL ANSWER ME SOON AND GIVE ME A SOLUTION!

    P.S. the next week, I'll go on a hollyday in another country. What happens when I receive the call of my country and all my calls will be with prefix + 40?

    Probably, he recognizes no contact!

    You have this problem or if only my phone?

    The work-around, I have read other users is to include the number of the contact in two formats...

    Thus, John Smith would have one number registered with 40 +, and other registered without the + 40.

    BlackBerry is aware of the issue and I hope to work on it.

  • W7 Device Manager does not recognize the Intel AMT devices

    Please help: where can I find - how to install the latest drivers Intel AMT for Windows 7.

    Hello

    Thank you for the question to Microsoft Community. I'll give my best to help you.

    From your problem description, I understand that the Device Manager does not recognize the Intel AMT devices

    What is the brand and model of the computer?

    Check out these links and see if they help.

    Computers that use Intel's vPro technology can have devices that are not recognized in Windows 7 Device Manager

    http://support.Microsoft.com/kb/976728

    Clean installation WARNING: Back up your files before you begin reinstalling Windows, even if you're reinstalling Windows on a hard disk partition. A clean installation replaces the current version of Windows and all personal files.

    If your motherboard supports AMT technology, you can download, install the drivers from this link.

    AMT: Intel® AMT Driver for Intel® motherboards

    http://Downloadcenter.Intel.com/Detail_Desc.aspx?&DwnldID=16936

    Note: This download is valid for the products listed below.

    Intel® card mother DB43LD

    Intel® card mother DQ43AP

    Intel® card mother DQ45CB

    Intel® card mother DQ45EK

    If the problem persists, I suggest you to contact Intel support. http://communities.Intel.com/Community/Tech

Maybe you are looking for