A script to add several layer text names

Hello world

I am quite new to this, so I hope you don't mind if my question is maybe a bit simple for the pros...

Basically, I'm looking for a way to add multiple names of layers in the form of text boxes. I found this script below pixxxelschubser, which already ensures the task.

Re: Script to add the name of the layer to the artboard in text form

However, this script updates all the text boxes in a position to (0,0). I'm looking for a way to change this, until the first box (0,0), the second area is (0.10), third (0.20) and so on.

I guess it's sort of a loop thing, but I'm really not familiar with this, so just a little hint would be great

Thanks in advance!

Marco

If you want to get into writing scripts, check out the official guides here

Illustrator script | Adobe Developer Connection

Adobe assumes that you are already familiar with javascript, so you need to learn javascript separately, you can start here

JavaScript | DND

Here is a version of the pixxxel script that moves the vertical position

// LayersnamesInUpperLeftCorner.jsx
// https://forums.adobe.com/thread/1546630
// write layers names in upper left corner of the active artboard
// required: opened document, no toplevel layers locked, all layers visible
// regards pixxxelschubser
var aDoc = app.activeDocument;
var theLayers = aDoc.layers;
var x = 0;
var y = 0;
var verticalOffset = 10;

for (i=0; i 
         

Tags: Illustrator

Similar Questions

  • Script to add several vPortGroups on a vSvitch on the mulpitple hosts

    Hello

    I have a small script to add several vPortGroups on a vSvitch on mulpitple of the hosts.

    The Script looks like:

    $ObjHosts = get-VMHost host12 * | Sort-Object-property name

    Import-Csv "C:\vPortGroups.csv" - UseCulture | %{
    {foreach ($objHost to $ObjHosts)
    $strVSwitch = get-Virtualswitch - VMHost (Get-VMHost $objHost) | WHERE-object {$_.} {Name - match "$_.strVSwitch"}
    Write-Host "Adding virtual port group" $_.strNewVPG "with VLAN Tag' $_.strNewVlanTag 'to' $_.strVSwitch 'on' $objHost
    New-VirtualPortGroup-name "$_.strNewVPG"-VirtualSwitch "$_.strVSwitch"-VLanId ' $_.strNewVlanTag '.
    }
    }

    The input file looks like:

    strNewVPG; strVSwitch; strNewVlanTag
    "4.244.151.0 - 24"; «vSwitch1 «;» 120

    If we use only the line "Write-Host"Adding Virtual Port Group"$_.strNewVPG" with VLAN Tag ' $_.strNewVlanTag 'to' $_.strVSwitch 'on' $objHost' "

    the output is "add the port group virtual 4.244.151.0 - 24 with VLAN Tag 120 to vSwitch1 on d100spwesxc3101.d100.intern.

    Thus, the input file is correct and legible for the script.

    If I use the full script, the output message is:

    New-VirtualPortGroup: cannot bind parameter 'VLanId '. Cannot convert value ' @{strNewVPG = 4.244.151.0 - 24;} '. strVSwitch = vSwitch1; "strNewVlanTag = 120} .strNewVlanTag" to type "System.Int32". Error: "I."
    nput string was not in a correct format. »
    C:\Dokumente und Einstellungen\user1\Eigene Dateien\VMWare PowerShell Scripte\add_VirtualPortGroup_by_inputfile.ps1:7 tank: 83
    + New-VirtualPortGroup-name "$_.strNewVPG"-VirtualSwitch ' $_.strVSwitch ' VLanId - < < < < "$_.strNewVlanTag."
    + CategoryInfo: InvalidArgument: (:)) [new VirtualPortGroup], ParameterBindingException)
    + FullyQualifiedErrorId: CannotConvertArgumentNoMessage, VMware.VimAutomation.ViCore.Cmdlets.Commands.Host.NewVirtualPortGroup

    What's not here?

    I made a few changes to your script. You can try the new version?

    $ObjHosts = Get-VMHost host12* |Sort-Object -Property Name
    
    Import-Csv "C:\vPortGroups.csv" -UseCulture | %{
        $vPortGroup = $_
        foreach($objHost in $ObjHosts){
            $strVSwitch = Get-Virtualswitch -VMHost (Get-VMHost $objHost) | where-object { $_.Name -match $vPortGroup.strVSwitch }
            Write-Host "Adding Virtual Port Group" $vPortGroup.strNewVPG "with VLAN Tag" $vPortGroup.strNewVlanTag "to" $vPortGroup.strVSwitch "on" $objHost.Name
            New-VirtualPortGroup -Name $vPortGroup.strNewVPG -VirtualSwitch $strVSwitch -VLanId $vPortGroup.strNewVlanTag
        }
    }
    

    One of the main problems was that $_ represents only the object from the pipeline last. So I added the line $vPortGroup = $_ to keep the line from the file entry in the variable $vPortGroup.

    Best regards, Robert

  • Script to add the layer mask to all layers but the background?

    I have been a professional editor/Retoucher for photographers for the past three years. I use a lot of stock, but I've never branched in scripts so far. I am trying to refine my workflow and scripts to not appear to be the next logical step.

    I do a lot of work in the interiors, which is essentially manual HDR. Here's my current generation process, which I would love to find a way to script. I tried to be very clear, but let me know if it needs to expand. I use Photoshop CS5.

    1. pull brackets, color corrected TIFF in Bridge.

    2 re-order as needed, with the main exhibition downstairs. Click on 'Tools' > 'Photoshop' > 'Charge in the form of layers Photoshop"to get a PSD with layers in the correct order and main as exposure layer from bottom (base).

    3. manually go through each layer and add a layer mask hide all each layer except the background layer.

    4. Save as a PSD, using the original name of the background layer as the file name. To do this, I just copy the name of the layer (example.tiff), paste in the Save dialog box and then use the drop-down menu to select PSD (save as example.psd).

    I hope to automate steps 3 and 4 as they are the majority of your time for me. Any contribution is appreciated!

    Thanks again.

    Yes, your change is good.  This way the last layer will not have a mask applied.  I wasn't sure if you wanted that, but in the control for the background layer.

    Regarding the economy, what file format would you save on?  Here's how to save a psd:

    docRef var = activeDocument

    var doneFolder = new Folder('/c/photos/')

    var NomCouche = docRef.activeLayer.name

    var psdOptions = new PhotoshopSaveOptions();

    psdOptions.layers = true;

    app.displayDialogs = DialogModes.ALL;//include this line if you want that the coming dialog box.

    docRef.saveAs (new file (doneFolder + "/" + NomCouche + ".psd"), psdOptions);

    app.displayDialogs = DialogModes.NO;//Resets at ALL - you won't let it work on.

  • Script to add keywords in Bridge based on the name of the file

    I'm working on a script that adds keywords based on the name of the image file. So, if the name of the file is AG123456 (08_16) .tif, this script would add "Agriculture", "123456" and "8/16" as keywords in bridge. "" I have a small sample of the part that retrieves the name of the file written in AppleScript below of each keyword. I know that I need to write the part that actually adds the keywords in Bridge in JavaScript, because the bridge is not capable of AppleScript. I have trouble finding the JavaScript code, I need to add the keyword. If someone could help me with this, I would really appreciate it.

    I would like to call the JavaScript code to in AppleScript instead of writing all the code in JavaScript. (The full version of it's longer, it would be a lot of code to change in JavaScript).

    on Open of droppedfiles

    with timeout of 900 seconds -> Changing timeout to 15 minutes. Default value is 2 minutes.

      -------------------------------------------------------------

    -GET THE CHARACTERS OF THE FILE name

      -------------------------------------------------------------

    Repeat with aFile in droppedfiles

    say application 'Finder '.

    the value file name to name of aFile

    end say

      -------------------------------------------------------------

      -------------------------------------------------------------

      -------------------------------------------------------------

    -ADDED a KEYWORD FOR EACH PREFIX

      -------------------------------------------------------------

    -Find the prefix in the name of the file

    if text 1 thru 2 of file name contains "AG" then

    the value prefixKeyword to 'Agriculture '.

    else if text 1 thru 2 of file name contains "To THE" then

    the value prefixKeyword to "Automobile".

    on the other

    the value prefixKeyword to "Need to prefix".

    end if

    -Adding the prefix as a keyword

    display dialog prefixKeyword string

      -------------------------------------------------------------

      -------------------------------------------------------------

      -------------------------------------------------------------

    -ADDED a KEYWORD FOR EACH SKU NUMBER

      -------------------------------------------------------------

    -Creating a list of all single digit numbers

    the value numberList to {"0", "1", "2", "3", "4", "5", "6", "7", "8", "9"}

    -Looking FOR THE SKU NUMBER

    -Looking for a six-digit number that starts on the third character of the file name

    if numberList contains (text 3 of file name) et numberList contains (text 4 of the file name) et numberList contains (text 5 of filename) et numberList contains (text 6 of file name) et numberList contains (text 7 of file name) then

    if numberList does not work contain the text 9 of file name and then

    if numberList contains (text 8 of the file name) then

    the value skuNumber to of 3 to 8 text filename

    the value skuNumberOffset to 8

    end if

    end if

    -Searching for a six-digit number that begins on the fourth character of the file name

    else if numberList contains (text 4 of the file name) et numberList contains (text 5 of filename) et numberList contains (text 6 of file name) et numberList contains (text 7 of file name) et numberList contains (text 8 of the file name) then

    if numberList does not work contain the 10 text of file name and then

    if numberList contains (text 9 of file name) then

    the value skuNumber to text 4 to 9 of file name

    the value skuNumberOffset to 9

    end if

    end if

    -Defining the SKU number to alert keyword keyword the user can search the

    on the other

    the value skuNumber to "Need SKU number.

    set skuNumberOffset to 0

    end if

    -ADDING THE SKU AS NUMBER one keyword

    display dialog skuNumber string

      -------------------------------------------------------------

      -------------------------------------------------------------

      -------------------------------------------------------------

    -DATE ADDITION OF FILE name

      -------------------------------------------------------------

    if file name contains "(" et nom de fichier contient ")" then "

    set leftParen to "("

    set rightParen to ")"

    -Obtain the month of the file name

    set monthOffset of (offset of leftParen in fileName) + 1 -> character returns immediately after)

    set fileNameMonth to character of filename monthOffset

    -Get all the numbers of the year of the file name

    set fileNameYearOffset1 to (offset of leftParen in file name) + 3

    set fileNameYearOffset2 to (offset of rightParen in file name)-1

    set fileNameYear1 to character of filename fileNameYearOffset1

    set fileNameYear2 to character of filename fileNameYearOffset2

    set of characters fileNameYear fileNameYearOffset1 to fileNameYearOffset2 of file name

    set dateKeyword to fileNameMonth & "/" & fileNameYear

    -ADDING THE SKU AS NUMBER one keyword

    display dialog dateKeyword string

    end if

      -------------------------------------------------------------

      -------------------------------------------------------------

    fin Repeat

    end timeout

    end open

    Here's an example of adding of keywords in a file, the code can be used in Bridge or Photoshop.

    var Keys = ["keyword1","keyword2","keyword3"];
    var file = File (Folder.desktop + "/zz.jpg");
    if(file.exists) setKeyword( file,Keys);
    
    function setKeyword( file,Keys){
    if ( !ExternalObject.AdobeXMPScript ) ExternalObject.AdobeXMPScript = new ExternalObject('lib:AdobeXMPScript');
            var xmpf = new XMPFile( File(file).fsName, XMPConst.UNKNOWN, XMPConst.OPEN_FOR_UPDATE );
            var xmp = xmpf.getXMP();
            for(var s in Keys){
            xmp.appendArrayItem(XMPConst.NS_DC, "subject", Keys[s], 0,XMPConst.PROP_IS_ARRAY);
        }
          if (xmpf.canPutXMP( xmp )) {
             xmpf.putXMP( xmp );
          }
          xmpf.closeFile( XMPConst.CLOSE_UPDATE_SAFELY );
    };
    
  • Power CLI script to add multiple VLANs with port group name in an ESX cluster

    Hi all

    Can someone help me get a script adds several VLANs with port group name in an ESX cluster?

    Kind regards

    Suresh

    OK, so you just need to do an Import-Csv inside the loop and change the variables accordingly.

    What is the provision of this CSV file?

  • Is it possible to use scripts to duplicate a layer?

    I recently asked this question in the Illustrator forum that I did not know there was a separate script forum: find and replace text problem

    I finished just dangling down and solve my problem after spending a few hours just to experiment with script guide.

    Now, I'm finishing the final piece of the puzzle for this script which would be totally solved my problem. Is it possible to make the script duplicate a layer? There is a duplicate() function, but it seems not to apply to the layer element. Is there a work around?

    Thanks for your help

    Michael

    Regarding javascript:
    -CS5, you must name a new layer, called the same name as your source for baptism layer and then duplicate each element of the source for the new layer.

    Be aware that things such as graphical styles, layer, opacity masks on layers and sublayers don't get carried forward like that.

    However, with the CS6 + that allows a script to play an action, you can actually get "whole enchilada" by recording an action where you go into the menu drop down and use the "Duplicate" command This will save "layers > duplicate Selection" in action. Then, you can use javascript to target your desired layer and play this action. Your new layer will be a string of "copy" added automatically, so you can choose to delete or modify that.

  • Add several drives on different data warehouses

    Hi all, I'm new to the script. I'm trying to script adding disks to different stores of data on different hosts (not clustered). Let's say I have VMs called VM1 and VM2 I get this info from file adddisk.txt. I want to add disks to the virtual machines, but I don't know the name of the data under specific host store. If VM1 is Host1, under name of data store is: Datastore1 IF VM2 is under Host2, name of data store is: Datastore2 so, how can I add records to several virtual machines without knowing the name of the data store? $servers is a get-Content "C:\Scripts\AddDisk\adddisk.txt" New-disk hard - VM $servers - CapacityGB 30 - DiskType Flat - data store 'DatasoreName' StorageFormat - thin thanks in advance.

    Try like this

    Get-Contentt c:\Script\adddisk.txt | %{  $hostname = Get-VM -Name $_ | Get-VMHost | Select -ExpandProperty Name  if($hostname -eq "esx3"){    $dsname = "Datastore3"  }  elseif($hostname -eq "esx4"){    $dsname = "Datastore4"  }  New-HardDisk -VM $_ -CapacityGB 5 -DiskType Flat -Datastore $dsname -StorageFormat Thin}
    

    The Get-Content will read the file line by line.

    We execute the codeblock to each line (construction ForEach - alias is %)

    Essay on equality of strings is done with the operator - eq, the = operator is used only for assignments.

  • script to add vmk1 for vmotion using foreach

    OK, so I am writing a script to add ecards to a host or multiple hosts.  The idea of the user will input one or several host names separated by a comma.  This part works fine, but the next variable I need filled is the ip address, which is also the registration of the user separated by a comma.  I can't find a way to get both of these channels in a single command.

    $servers = (Read-Host "enter host names that you want to configure... FULL domain name (separate them with comma) ").split(',') |" % {$_.trim ()}

    $lasttwooctets = (Read-host "which is the last two octets of your IP prod? (separate with comma) ").split(',') |" % {$_.trim ()}

    #Add VMK1, vmotion, nas, and backup

    foreach ($esxihost in $servers) {}

    New-VMHostNetworkAdapter - VMHost $esxihost - PortGroup 'dvPortGroup_999 (vmotion)' - 'dvSwitch_vcenter' VirtualSwitch - IP 172.24. $lasttwooctets - subnet mask 255.255.0.0 - VMotionEnabled: $true - mtu 9000

    }

    If anyone has an idea on how to make an extra foreach for the $lasttwooctets variable that would be greate

    Since you have 2 bays where the elements come together, it will be easier to do indexing yourself, instead of using the 2 nested ForEach loops.

    Something like this for example

    $servers = (Read-Host "enter host names that you want to configure... FULL domain name (separate them with comma) ").split(',') |" % {$_.trim ()}

    $lasttwooctets = (Read-host "which is the last two octets of your IP prod? (separate with comma) ").split(',') |" % {$_.trim ()}

    #Add VMK1, vmotion, nas, and backup

    0. ($servers. Count - 1) | %{

    "New-VMHostNetworkAdapter - VMHost $servers [$_] PortGroup-"dvPortGroup_999 (vmotion)"- VirtualSwitch 'dvSwitch_vcenter'"

    -"172.24.$($lasttwooctets[$_])" - subnet mask 255.255.0.0 - VMotionEnabled IP: $true - mtu 9000

    }

    You could test whether the $servers table and the $lasttwooctets table have the same number of elements, to ensure that user input is correct.

  • SCRIPT TO IMPORT SEVERAL IMAGES PLACES... AND MULTIPLE IMAGES IN SINGLE OUTPUT PDF.

    Anyone got a script to import several images placed in CS4? or is it possible in CS5?

    and we can out of the multiple layers in a single PDF in illustrator?  Or several layers in single format JPEG from illustrator with a single command instead to save individually on each page... would be a huge timesaver for me.

    Currently I pulled out each layer individually filled then right-click on these JPEG output files in the output folder and choose "combine taken supported files in acrobat... "to create a unique acrobat...

    I also that to be able to CTRL click multiple layers and go save as... only these layers be saved on...

    And so add something in the Save to output PDF save the Layers dialog box to multiple pages would be a useful time saver...

    In CS 4 and CS 5, you can drag and drop FRO m the finder or bridge, and I suppose that any other viewer of similar type, multiple number of image files to a document. You can configure the bridge so that you can see the bridge and your document at the same time for this purpose.

    If you drag and drop files are linked, if you drag while holding down the SHIFT key, then the files will be incorporated.

    ID and PS CS 5 have a minijonction who works the way sam but is actually a Panel and will stay at the front.

    I have separate images but they import on the other.

  • How to add several presets in a reactive mode design without having to resize the screen every time

    I want to be able to add several screen size presets with the ability to view sensitive design but do not want to resize the screen and add each individually through the predefined custom function.

    Have you seen some messages on the internet (http://g-liu.com/blog/2013/08/firefox-rdm-presets/) who say it can be done, but could not find where the config is required to worm 26.0?

    Hello

    Work now how to do this. You first create an entry called "devtools.responsive.UI.presets" in the configuration file, and then add in the predefined string:

    If the steps are:

    (1) open a new tab in Firefox or window and enter about: config

    (2) (if a warning message appears, click OK.)

    (3) create a new entry devtools.responsive.UI.presets - right click and select 'new', then 'string' - under enter the preference name of the type "devtools.responsive.UI.presets" and then click OK. When the box of the input string appears simply add the following shows

    [{"key": "CGA: 320 x 200", "width": 320, "height": 200}, {"key": "QVGA: 320 x 240", "width": 320, "height": 240}, {"key": "CIF: 352 x 288", "width": 352, "height": 288}, {"key": "SIF: 384 x 288", "width": 384, "height": 288}, {"key": "HVGA: 480 x 320", "width": 480, "height": 320}, {"key": "(NTSC) VGA: 640 x 480", "width": 640, "height": 480}, {"key": "PAL: 768 x 576", "width": 768, "height": 576}, {"key": "WVGA: 800 x 480", "width": 800, "height": 480}, {"key": "SVGA: 800 x 600", "width"}] {: 800, "height": 600}, {"key": "WVGA (NTSC): 854 x 480", "width": 854, "height": 480}, {"key": "PAL: 1024 x 576", "width": 1024, "height": 576}, {"key": "WSVGA", "width": 1024, "height": 600}, {"key": "XGA: 1024 x 768", "width": 1024, "height": 768}, {"key": "1152 x 768", "width": 1152, "height": 768}, {"key": "XGA: 1152 x 864", "width": 1152, "height": 864}, {"key": "WXGA: 1280 x 600", "width": 1280, "height": 600}, {"key": "HD 720: 1280 x 720", "width": 1280, "height": 720}, {"key": "WXGA} {: 1280 x 768 ","width": 1280,"height": 768}, {"key":" WXGA: 1280 x 800 ","width": 1280,"height": 800}, {"key":" SXGA: 1280 x 1024 ","width": 1280,"height": 1024}, {"key":" 980 x 1280 ","width": 980,"height": 1280}, {"key":" Microsoft Surface RT: 320 x 240 ","width": 1366,"height": 768}, {"key":" 1400 x 900 ","width": 1400,"height": 900}, {"key":" 1400 x 960 ","width": 1400,"height": 960}, {"key":" SXGA +: 1400 x 1050 ","width": 1400,"height": 1050}, {"key":" 1400 x 1080 ","width": 1400,"height": 1080}, {"key":"1600 x 900"} {, "width": 1600, "height": 900}, {"key": "UXGA: 1600 x 1200", "width": 1600, "height": 1200}, {"key": "WSXGA +: 1680 x 1050", "width": 1680, "height": 1050}, {"key": "1920 x 900", "width": 1920, "height": 900}, {"key": "HD 1080: 1920 x 1080", "width": 1920, "height": 1080}, {"key": "WUXGA: 1920 x 1200", "width": 1920, "height": 1200}, {"key": "2K: 2048 x 1080", "width": 2048, "height": 1080}, {"key": "QXGA: 2048 x 1536", "width": 2048, "height": 1536}, {"key": "WQHD: 2560 x 1440", "width": 2560, "height": 1440}, {"key" {: "WQXGA: 2560 x 1600", "width": 2560, 'height': 1600}, {'key': "QSXGA: 2560 x 2048", "width": 2560, 'height': 2048 '}, {'key': "2160 p: 3840 x 2160", "width": 3840, 'height': 2160 '}, {'key': "4 k: 4096 x 2160", "width": 4096, 'height': 2160 '}, {'key': "4320 p: 7680 x 4320", "width": 7680, 'height': 4320 "}, {'key':" 8 k: 8192 x 4608 ","width": 8192, 'height': 4608 '}, {'key':" 8640 p: 15360 x 8340 ""} [{, "width": 15360, 'height': 8640}]

    then click OK

    All new presets should now be sensitive design mode.

    Worked for me!

  • Script to add a domain user to the local Administrators group raises the error "the network path is not found."

    I have a Windows Server 2008 R2 domain and a Windows XP Pro workstation that has been attached to the domain and then disconnected. I am trying to create a VBS script to add a domain user to the local Administrators group.

    I log on my computer as a local administrator and run the following script:

    Dim oNetwork: Set oNetwork = WScript.CreateObject ("WScript.Network")
    StrPC Dim: strPC = oNetwork.ComputerName
    Dim OGroup: Set oGroup = GetObject ("WinNT: / /" & strPC & "/ directors")
    Dim OUser: Set oUser = GetObject ("WinNT://domainname/username")
    oGroup.Add (oUser.ADsPath)

    This script returns the error "the network path is not found."

    However, I am able to go into control panel > user accounts > enter the user name and the domain name > click Next... > choose the administrators of the 'other' group and the user name will be added to the local Admin group.

    The same script runs without error if it is launched after logon on the workstation with a domain administrator account.

    How can I get my script runs without error, when you are logged into the workstation as a local administrator?

    Best regards, Andy

    The code that I used came from here. If the syntax of the Add method is passed to oUser.ADsPAth to "WinNT: / /" & domainname & "/" & username, the script works correctly.

    Therefore, the modified script:

    Dim oNetwork: Set oNetwork = WScript.CreateObject ("WScript.Network")
    StrPC Dim: strPC = oNetwork.ComputerName
    Dim OGroup: Set oGroup = GetObject ("WinNT: / /" & strPC & "/ directors")
    Dim strUser: strUser = "WinNT://domainname/username."
    oGroup.Add strUser

    Thanks to Qasim Zaidi to show the code of work here.

    Best regards, Andy

  • IllegalArgumentException in VerticalFieldManager to add several ObjectChoiceFields

    Hi all

    I'm IllegalArgumentException in VerticalFieldmanager to add several ObjectChoiceFields.

    
    
    VerticalFieldManager row = new VerticalFieldManager(VerticalFieldManager.NO_HORIZONTAL_SCROLL |VerticalFieldManager.NO_VERTICAL_SCROLL);VerticalFieldManager row1 = new VerticalFieldManager(VerticalFieldManager.NO_HORIZONTAL_SCROLL |VerticalFieldManager.NO_VERTICAL_SCROLL); for(int i = 0; i < blackBerryContacts.size(); i++){BlackBerryContact item =(BlackBerryContact)blackBerryContacts.elementAt(i);             choiceP[i] = new ObjectChoiceField("", choiceFld,0, FIELD_RIGHT);
                    int index = choiceP[i].getSelectedIndex();
                    String selectedChoice = choiceFld [index];
                    chkBoxField[i] = new CheckboxField(sb.toString(), true,
                            Field.USE_ALL_WIDTH | CheckboxField.FIELD_LEFT)
                    {
                         //Invoked when this field receives the focus.
                        protected void drawFocus(Graphics g, boolean on)
                        {
                            if (g.getBackgroundColor() != 3098850)
                            {
                                XYRect xy = g.getClippingRect();
                                g.setBackgroundColor(0xf9f8f5);
                                //g.fillRect(xy.x,xy.y,xy.width,xy.height);
                                g.clear();
                            }
                            super.paint(g);
                        }
                        protected void paint(Graphics g)
                        {
                            int x = this.getIndex();
                            XYRect xy = g.getClippingRect();
    
                            if (g.getBackgroundColor() != 3098850)
                            {
                                g.setBackgroundColor(0xf9f8f5);
                                //g.fillRect(xy.x,xy.y,xy.width,xy.height);
                                g.clear();
                            }
                            super.paint(g);
                        }
                        protected boolean navigationClick(int status, int time) {
                            if (this.getChecked())
                                this.setChecked(false);
                            else
                                this.setChecked(true);
                            //fieldChangeNotify(1);
                            return true;
                        }
                    };//----------
                    row.add(chkBoxField[i]);
                    row1.add(choiceP[i]);
                }
    

    chkBoxField can be added in VerticalFieldManager but ObjectChoiceField is exception.

    Please help me.

    Thank you

    DK.

    Unfortunately, ObjectChoiceField does not allow to have another field in the same row. This area needs the line of the screen. When you try to add the field to the line where the ObjectChoiceField - you get an error.

    I recommend the following approach.

    Data model

    public class BlackberryContact {
    
        private String Fullname;
    
      ....
    
      private Vector contactInfo;
    
      public void addContactInfo(BlackberryContactInfo info) {      contactInfo.addElement(info);     ....  }}
    
    public class BlackberryContactInfo {
    
        public final int CONTACT_TYPE_HOME_PHONE = 1; public final int CONTACT_TYPE_WORK_PHONE = 2; public final int CONTACT_TYPE_EMAIL = 3;
    
        // type of contact: phone, email, etc private final int contactType; 
    
      // contact info: phoneNumber, emailAddress    private final String contactInfo;
    
      // constructor, use CONTACT_TYPE_.. constants as contactType      public BlackberryContactInfo(String contactInfo, int contactType) {       this.contactInfo = contactInfo;       this.contactType = contactType;   }   
    
      public int getType() {        return contactType;   }   
    
        public String getInfo() {     return contactInfo;   }   }
    

    VIEW

    Implement a screen to display BlackberryContact, say BlackberryContactView

    Add the text field to refer to and add ListField to view available contact information (emails, phones, etc.).

    Each person can have different qty of coordinates, ListField is the best choice.

    Will look like the screen layout is shown on the picture:

    http://picasaweb.Google.ru/tbilisoft/BlackberryForum#5285460326711217906

  • Open files using its layer group name

    are there images to import the folder into photoshop cc option using its layer group name (the name of the image is already entered in the layer group) .so using the group name as a file name of the script need to open the document automatically.

    2016, use it at your own risk.

    #target photoshop

    If (app.documents.length > 0) {}

    the file;

    myDocument var = app.activeDocument;

    var thisName = myDocument.path;

    ////////////////////////////////////

    try {}

    var thisName = thisName+"/"+myDocument.activeLayer.name;

    If (queue (thisName) .exists == true & leader (thisName) .constructor! = folder) {app.open (File (thisName))}

    } catch (e) {}

    };

  • How to add several tracks with offset path?

    Hello

    I would like to create a script that can create multiple strokes with offset path (incremental or material (user will enter value))

    Is it possible to add several traces? I have found no examples in the script reference or elsewhere.

    Note: Mixtures does not give exactly the same results because sometimes especially when you are dealing with fonts outline paths is to be wrongly mixed a way.

    I'd be happy if someone give at least the main command loop.  I'll try to rest and will share here because I find the solution.

    Thank you

    Best regards.

    question.jpg

    OK, I'm going to assume your sub windows through the capture in the opening screen post.

    This is a completely different approach.

    This example uses executeMenuCommand so is only compatible with CS6 +.

    and Windows is only used from VB

    //-------------------------------------------------------------------
    
    // Offset Path in apperence panel
    
    // Script by Qwertyfly
    // contact [email protected]
    // version 0.1 beta
    
    //-------------------------------------------------------------------
    
    //number of offset paths
    var Qty = 5;
    
    //amount to offset
    var Offset = -5;
    
    //units to offest in
    var Unit = "px"; 
    
    //time to wait in milliseconds before sending keys.
    // more time is slower but more stable
    // I was able to run this with it set to 0, but a little bit of a pause is a good idea.
    var wait = 10;
    
    //-------------------------------------------------------------------
    function FillDialog_Windows(distance){
        var VB = [
            'WScript.Sleep ' + wait + '',
            'Set WshShell = WScript.CreateObject("WScript.Shell")',
            'WshShell.SendKeys "' + distance + '"',
            'WshShell.SendKeys "{ENTER}"'
            ].join('\n');
        var VBgo = new File('~/go.vbs');
        VBgo.open('w');
        VBgo.write(VB);
        VBgo.close();
        VBgo.execute();
    }
    function MakeStroke(offset){
        app.executeMenuCommand('Adobe New Stroke Shortcut');
        FillDialog_Windows(offset);
        app.executeMenuCommand('Live Offset Path');
    }
    
    for(var i = 1; i		   
  • PowerCLI Script to add disk fails after upgrade to vSphere 5.5 U1 and PowerCLI 5.5 R2

    Hi all

    I created the following script to add a disk to a virtual machine mode multi-writer for Oracle RAC. This script used to work on vSphere 5.5 GA and GA 5.5 PowerCLI, but now no longer works with vSphere 5.5 U1 and PowerCLI 5.5 R2. I don't know exactly, what has changed, but I think it has something to do with SCSI controller specification objects, more specifically the controller key.

    SE connect-VIServer VC

    $vmname = Read-Host "VM name to add disks to.

    $vmdk = Read-Host 'drive to add (full path) '.

    $busnumber = Read-host "SCSI Bus number".

    $unitnumber = Read-Host "drive number '.

    [int64] $capacity = Read-Host "disk capacity (GB).

    $vm = get - VM $vmname

    [int64] $capcitykb = ($capacity * 1 GB) / 1 KB

    Write-Host "create new album"$vmdk"of size"$capacity"GB"$vm"SCSI ID"$busnumber":" $unitnumber

    Write-Host 'capacitΘ in Ko' $capcitykb

    $ctrll = get-controller SCSI - VM $vm |? {$_.extensiondata.busNumber - eq $busnumber}

    Write-Host 'Controller key' $ctrll.extensiondata.controllerkey

    $spec = new-Object VMware.Vim.VirtualMachineConfigSpec

    $spec.deviceChange = new-Object VMware.Vim.VirtualDeviceConfigSpec [] (1)

    $spec.deviceChange [0] = new-Object VMware.Vim.VirtualDeviceConfigSpec

    $spec.deviceChange [0] .operation = 'Add '.

    $spec.deviceChange [0] .fileOperation = "crΘer".

    $spec.deviceChange [0] = new-Object VMware.Vim.VirtualDisk .device

    $spec.deviceChange [0].device.key = - 100

    $spec.deviceChange [0].device.backing = new-Object VMware.Vim.VirtualDiskFlatVer2BackingInfo

    $spec.deviceChange [0].device.backing.fileName = $vmdk

    $spec.deviceChange [0].device.backing.thinProvisioned = $false

    $spec.deviceChange [0].device.backing.split = $false

    $spec.deviceChange [0].device.backing.writeThrough = $false

    $spec.deviceChange [0].device.backing.eagerlyScrub = $true

    $spec.deviceChange [0].device.backing.diskMode = "independent_persistent".

    $spec.deviceChange [0].device.connectable = new-Object VMware.Vim.VirtualDeviceConnectInfo

    $spec.deviceChange [0].device.connectable.startConnected = $true

    $spec.deviceChange [0].device.connectable.allowGuestControl = $false

    $spec.deviceChange [0].device.connectable.connected = $true

    $spec.deviceChange [0].device.controllerKey = $ctrll.extensiondata.controllerkey

    $spec.deviceChange [0].device.unitNumber = $unitNumber

    $spec.deviceChange [0].device.capacityInKB = $capacitykb

    $spec.extraConfig = new-Object VMware.Vim.OptionValue [] (1)

    $spec.extraConfig [0] = new-Object VMware.Vim.OptionValue

    $spec.extraConfig [0] .key = 'scsi' + $busnumber + ': ' + $unitnumber + '.sharing.

    $spec.extraConfig [0] .value = 'multi-writer'

    $vm. ExtensionData.ReconfigVM ($spec)

    For some reason any $ctrll.key no longer returns any value and is completely absent, if I do a $ctrll | Get-Member to view the properties of the object.

    Any advice on how to get this script working would be greatly appreciated.

    Kind regards

    Michael

    Hi Luke,.

    Took a bit of debugging, but I finally got the script to work. Looks like that the values for $ctrll.key that I expected to be in the object disappeared definitively. In order to find the correct value, I now have to check $ctrll.extensiondata.key. Also, I needed to cast variables very carefully to the device specification. For the controllerKey it must be cast to int, like the unitNumber. Also found that the calculation for capacitykb should be cast to int64 and the 1 GB and 1 KB should be lowercase for a reason, otherwise the value is returned as a zero. So some weird things in 5.5 U1 which may seem spoiled API. Here is the final script as i've got working. It is not enough, there is no validation, police checks or anything either, but it works.

    SE connect-VIServer VC

    $vmname = Read-Host "VM name to add disks to.

    $vmdk = Read-Host 'drive to add (full path) '.

    [int] $busnumber = Read-host "SCSI Bus number number"

    [int] $unitnumber = Read-Host "drive number '.

    $capacity = Read-Host "(GB) disc.

    $vm = get - VM $vmname

    [int64] $capcitykb = ($capacity * 1 GB) / 1 KB

    Write-Host "create new album"$vmdk"of size"$capacity"GB"$vm"SCSI ID"$busnumber":" $unitnumber

    Write-Host 'Disk in KB capacity' $capcitykb

    $ctrll = get-controller SCSI - VM $vm |? {$_.extensiondata.busNumber - eq $busnumber}

    Write-Host "controller key" $ctrll.extensiondata.key "

    $spec = new-Object VMware.Vim.VirtualMachineConfigSpec

    $spec.deviceChange = new-Object VMware.Vim.VirtualDeviceConfigSpec [] (1)

    $spec.deviceChange [0] = new-Object VMware.Vim.VirtualDeviceConfigSpec

    $spec.deviceChange [0] .operation = 'Add '.

    $spec.deviceChange [0] .fileOperation = "crΘer".

    $spec.deviceChange [0] = new-Object VMware.Vim.VirtualDisk .device

    $spec.deviceChange [0].device.key = - 100

    $spec.deviceChange [0].device.backing = new-Object VMware.Vim.VirtualDiskFlatVer2BackingInfo

    $spec.deviceChange [0].device.backing.fileName = "" + $vmdk ".

    $spec.deviceChange [0].device.backing.thinProvisioned = $false

    $spec.deviceChange [0].device.backing.split = $false

    $spec.deviceChange [0].device.backing.writeThrough = $false

    $spec.deviceChange [0].device.backing.eagerlyScrub = $true

    $spec.deviceChange [0].device.backing.diskMode = "independent_persistent".

    $spec.deviceChange [0].device.connectable = new-Object VMware.Vim.VirtualDeviceConnectInfo

    $spec.deviceChange [0].device.connectable.startConnected = $true

    $spec.deviceChange [0].device.connectable.allowGuestControl = $false

    $spec.deviceChange [0].device.connectable.connected = $true

    $spec.deviceChange [0].device.controllerKey = [int] $ctrll.extensiondata.key

    $spec.deviceChange [0].device.unitNumber = [int] $unitNumber

    $spec.deviceChange [0].device.capacityInKB = $capacitykb

    $spec.extraConfig = new-Object VMware.Vim.OptionValue [] (1)

    $spec.extraConfig [0] = new-Object VMware.Vim.OptionValue

    $spec.extraConfig [0] .key = 'scsi' + $busnumber + ': ' + $unitnumber + '.sharing.

    $spec.extraConfig [0] .value = 'multi-writer'

    $vm. ExtensionData.ReconfigVM ($spec)

    Now I just need to check if the script that I have which attaches to this disc to the other nodes works Oracle RAC.

Maybe you are looking for

  • Music imported from ITunes game

    So I subscribed to iTunes game and none of my music shows imported on my other apple devices just the purchases maybe music 350 out of 1200 songs show. I checked the settings by other posts?

  • Conclusion the icon mouse.

    When I bought my new OS 10.10.5 they showed me how to make an icon of mouse 'lost' visible on the screen.  I forgot how.  Help, please.  Thank you.

  • MOTOBLUR stopped syncing with hotmail

    Hello I have a question where my hotmail email worked fine for months no problem then stopped on 8 August. It wasn't long after that I got the new UK update for my phone 4.4.20 I have not received e-mails. I have not changed any setting my battaries

  • Uninstalled everything IQuestion accelerometer

    I wonder what an accelerometer and if I need it? My computer has been check the disk and told me that it was not installed. If I need installed, you can tell me how to do? Thank you. It is a hp pavilion 64-bit n8Gig-er. I'm not in trouble, but just w

  • How can I correct the display on my screen?

    I tried to clean the space on my computer and accidentally uninstalled an application - I don't know what it was, but my screen is all tense and great now...? I am clueless computer, please help!