Problems getting started using Variables and data sets

Hello

I am new to this forum and new with scripts in Illustrator and scripts in general.

I have an XML file that contains a number of data sets each composed of a number of text variables that I want to use to create a trading card game.

Each trading card consists of a text field for the title of the map and a number of icons, which are instances of different symbols

I wrote a script to create each map and I can load variables in my using javascript: newCard.importVariables (news leader (xmlPath));

Now, I need to access the data in the data sets to power the card.

To provide some context, it's a picture of one of the cards with the art of the placeholder:

Screen Shot 2013-02-22 at 23.02.29.png

Currently, for the icon in the upper right corner (the PHASE icon), I use the following code:

phase = "night";

phaseIcon = newCard.symbols.getByName (phase);

phaseIcon1 = newCard.symbolItems.add (phaseIcon);

phaseIcon1.top = 232;

phaseIcon1.left = 140;

I want to be able to do, is to shoot the value during the phase of <>< / phase > TextVariable my dataset XML and insert that into the script, but I don't know how. This is where I'm stuck on how to proceed. Any help is greatly appreciated.

Thank you

Nick

OK, so it takes data sets to be able to get the data of type string, right? This has proved not to be as easy as it seemed

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

then to get string data that you used the XML to the file instead, your last sample seems fine, I did the same thing then you posted your sample, I used the xml file

var xmlfile = File.openDialog("Select a valid XML file","XML:*.xml", false);
if(xmlfile != null) {
    xmlfile.open("r");
    var xmlstring = xmlfile.read();
    xmlfile.close();
    xmlfile = null;
} else {
alert("Error opening XML file.");
}
var wolfCardsXML = new XML (xmlstring);
var currentCard = wolfCardsXML.card[0];
var phaseValue = currentCard.phase.toString();

alert(phaseValue);

Tags: Illustrator

Similar Questions

  • How can I get the exact time and date on my FAX LOG

    I have a new HP Officejet 6500 has more on my Dell Inspiron Windows XP computer.  How can I get the exact time and date on my FAX log?

    Hi FrederickFrank7,

    Journal of faxes would just follow the time of your printer. Please set the time and date of your printer.

    I am an employee of HP.
    Please indicate the position that solved your problem as "acceptable Solution".

  • Expert secrets for using RMAN and Data Pump by kamran agayev and Aman Charm

    Hello

    This book is available in INDIA:
    Expert secrets for using RMAN and Data Pump by kamran agayev and Aman Sharma

    How can I get this book in India.

    Thank you
    Alok

    Published by: user12141893 on April 6, 2012 11:25

    I tried to purchase this book online official site crawling but shipping cost was more than the cost of the book.
    Book is not available on Flipkart and Amazon

    Helios,

    OP can send a mail to me too :-).

    OP,

    We are in discussions with the editor. In India, the book by another editor partner and details of it that I'll update when would be available. Thanks for your interest in our book.

    Aman...

    PS: This is a technical forum and is not intended for topics. Please discuss contacting Keita and me by email personally. Keep the forum in order that it is served for-technical discussions.

  • How to get started using offline file "acrobat_reference.pdf" from in Acrobat Pro DC, preferably in the Help menu?

    How to get started using offline file "acrobat_reference.pdf" from in Acrobat Pro DC, preferably in the Help menu?

    You create a JavaScript script like this.  It has two platforms, but available in JavaScript, but I have commented out the windows because it's from my Mac.  Also note that I've hidden the menu default Acrobat help item in this JavaScript.

    /************************* Hide Menu ********************************/

    Hide the default Help menu

    app.hideMenuItem ("HelpAcrobat");

    / * Menus execution * /.

    app.addMenuItem ({cName: 'Adobe Acrobat help PDF', cParent: 'Help', cExec: "fTDocs1()", NPO: 0});

    /***************************** Functions ************************************/

    Note: The ' / C/Program Files/Adobe / ' convention was used to conform to the

    SDK Adobe format but the installer does not you may need to

    Change the path to your system.

    Mac OS X

    function fTDocs1()

    {app.openDoc ("/ Applications/Adobe Acrobat XI Pro/Help/acrobat_reference.pdf") ;}} ;

    This section is commented

    64-bit Windows

    function fTDocs1()

    {app.openDoc("/C/Program Files (x 86) / Adobe/Acrobat DC/Acrobat/Javascripts/acrobat_reference.pdf') ;};}

  • Modification of the program of "Getting Started" sample to acquire data of multiple frequencies

    Dear members,

    I am very new to the LabVIEW and worked (mainly through aid of Google) to change one of the samples included with LabVIEW 2010 programs to suit my purpose.

    Essentially, the "Getting Started" program that comes with the LabVIEW 2008 works in the following way

    1. The user runs the program
    2. The user sets the frequency to whatever is needed
    3. User presses the "Trigger" button on the front that gives the values of the two boxes on the front panel
    4. Program stops automatically

    I modified in the following way

    1. I enter the "recurrence interval" and the "maximum rate" in a table to calculate the number of iterations
    2. I then pass the frequency required in the 'constant' through dissociation TI (where I was setting at the start manually the frequency)
    3. From there, the program runs exactly as before
    4. I wrapped the existing set of block diagram in a loop 'For' to repeat several times, with a different frequency every time
    5. Then, I finally write measures in a worksheet in addition to posting on the "façade".

    The problem that I face is that the frequency is not updated in the program. For example, if the last frequency used on the parser a 20 Hz, the program will be to take measures against the same 20 Hz rather than against the correct frequencies several times.

    So, in the spreadsheet I created, I get 1 kHz, 2 kHz... 10 kHz, but the values of impedance values recorded against them were indeed all taken against 20 Hz (or how often I last used by using the non-modified program).

    I suspect that the frequency is updated whenever the user presses the button "Trigger", but since I took this, for purposes of automation and replaced by a constant static in the 'real', it could cause problems. I don't know if this is definitely the problem, but even if this is the case, I can't find a way around it.

    Any help would be greatly appreciated as this provides a bottleneck in my project.

    Thank you

    Attachments:

    VI program Original

    VI for updated program

    Files zipped (for the support of dependence)

    Dear Robert,

    I am in using LabVIEW 2010 was therefore not able to run the code you have provided. However, I managed to get one of my friends write me the code that I have attached, to help anyone who has the same problem in the future.

    Thank you for your time and effort.

  • Bind variables and dates

    I am writing a process to delete records based on dates.

    Here is the chart:

    Column name Data type Nullable Default Primary key
    IDNUMBERNO.-1
    CT_NAMEVARCHAR2 (100)Yes--
    CT_CATEGORYVARCHAR2 (100)Yes--
    BASE_PTSNUMBERYes--
    PROD_PTSNUMBERYes--
    REF_PTSNUMBERYes--
    START_DATEDATEYes--
    END_DATEDATEYes--
    CREATED_ONDATEYes--
    CREATED_BYVARCHAR2 (50)Yes--
    UPDATED_ONDATEYes--
    UPDATED_BYVARCHAR2 (50)Yes--

    start_date and end_date are the fields of date key.

    The query will remove the dates with specific start and end dates.  The question I have, is that I get a ORA-01858: a non-digit character was found here where was waiting for a digital error while the query is running.

    remove from ct_point_values

    where start_date =: P4_START_DATE_V

    and end_date =: P4_END_DATE_V

    If I run the query in the sql window, no problem:

    remove from ct_point_values

    where start_date =' 01 / 01/2014 '

    and end_date = 31 December 2014"

    Find the query with the works of values hard-coded.  Links to fail.  I tried casting and to_char to_date variations with no luck.

    One thing that I notice, is that when I go to enter my bind variables in the sql workshop, the fields are pre-populated with this:

    1 & amp; #x2F 1 & amp; #x2F; 2014

    12 & amp; #x2F 31 & amp; #x2F; 2014

    01/01/2014 and 31/12/2014.  I found that the only element relates to this suggests that this is a possible bug:

    SQL Bind Variables workshop - Date issues

    Any thoughts on how to address this issue, or is it really a bug?

    I run on Apex 4.2, 11g.

    Thank you!

    Hello

    I guess that these dates come from elements on the page to which the user can select a range of dates.

    These fields have a custom format mask?

    What seems to be the case for me, is that these fields have an explicit format mask (for example: DD/MM/YYYY) but the default database/session format mask is something different (e.g. DD-MON-YYYY).

    I suppose also that the issue in the SQL workshop isn't something related.

  • get guests basic stats and data warehouses

    Hi all

    I am totally new to vcenter and power shell, so please, be gentle on my stupid questions. I'm desperate to compile a script to get the weekly statistics for host, County of vcpu and data store memory space and export it to a csv file. Numbers so very basic for each host computer and the data store. Here's what I have so far based on blogs of the LucD generous. It would be great if someone of you can help me realize what is wrong...

    It took a lot of time for me to understand what are the parameters I need and I'm sure that they are correct, but the syntax is killing me now. Basically, I realize there is something wrong with my variables since nothing is exported to the file you want, but I do not know how to define variables and their attributes. And the error was "impossible to replace the host variable because it is read-only or constant", while other properties such as "name", "mem", etc.

    SE connect-VIServer-server xxx.com - user password xxx-xxxx

    $allhosts = @)

    $hosts = get-VMHost

    $allds = @)

    $datastores = get-DataStore

    {foreach ($vmHost in $hosts)

    $host = "" | Select 'name', 'mem', 'vcpu '.

    $$host.name = $vmHost.Name

    $host.mem = get-Stat-entity ($vmHost) - start (Get-Date). AddDays(-1)-Finish (Get-Date) - MaxSamples 1 - Stat "mem.consumed.average" |  Select - ExpandProperty value

    $host.vcpu = get-VM-location ($vmHost). Where-Object {$_.} PowerState - eq "Receptor"} | Measure-object-property NumCpu-sum |  Select - ExpandProperty sum

    $allhosts += $host

    }

    $allhosts | Export-csv - NoTypeInformation C:\host.csv

    foreach ($dataStore to $datastores |) Where-Object {$_ .name - like "xxxx *"}) {}

    $dsName = $dataStore.Name

    $provspace = get-Stat-entity ($dataStore) - start (Get-Date-time Minute 9 - 0-0 second) - Finish (Get-Date-time-Minute 10 - second 0-0) - IntervalSecs 30000 - Instance "-disk.provisioned.latest stat. Select - ExpandProperty value

    $freespace = $datastores | Select-Object Name, FreeSpaceGB

    }

    $allds | Select DataStorename, provspace, freespace | Export-csv - NoTypeInformation C:\datastore.csv

    Thank you in advance!

    -LX

    Unfortunately, you chose a PowerShell reserved name for the name of the variable.

    The $host variable is not allowed.

    Choose another name and the script should be ok

  • Problem running procedure using Variables

    Hi all

    I am trying to execute the procedure in a statement declared/Begin/End and using variables as parameters of entry in my interior but I get away to an invalid SQL statement error. My code is below:
    declare
    
      START_dt  VARCHAR2(30);
      END_DT VARCHAR2(30);
      
         
      begin
            
        SELECT '01-APR-2011'
        INTO END_DT
        FROM DUAL;
      
        SELECT '01-APR-2020'
        INTO END_DT
        FROM DUAL;
             
           
         BEGIN EXECUTE IMMEDIATE 'INSERT_PROV_ACSC_IND_REF('||START_dt||','||END_DT||')';END;COMMIT;
    
     end;
    
    Error at line 1
    ORA-00900: invalid SQL statement
    ORA-06512: at line 18
    Is the way that I normally run my procedure outside this statement Declare/Begin/End: EXECUTE INSERT_PROV_ACSC_IND_REF('01-APR-2011','01-APR-2020');

    The table that takes the data from the procedure does not correct timestamp but my procedure takes the varchar above dates and turns them into dates in the procedure so that the entry date settings are left as a string.

    Any help would be appreciated.

    Thank you

    And if you want to use variables:

    declare
        START_dt  VARCHAR2(30);
        END_DT VARCHAR2(30);
    begin
        START_dt := DATE '2011-04-01';
        END_DT := DATE '2011-04-01';
        INSERT_PROV_ACSC_IND_REF(START_dt,END_DT);
    end;
    /
    

    SY.

  • ThinkPad P50 can no longer be in the BIOS of the screen to start using "enter" and "F1".

    I just got a new Thinkpad P50 with Windows 10 Pro. It came originally with a 256GB SATA SSD m2 Windows 10 Pro has been installed. I was initially able to enter the BIOS settings by organizing "enter" during boot where it displays a message like "to interrupt normal startup upward, press ENTER. I know it worked before because I went to check on the parameters of virtualization to enable them.

    When you start up Windows 10 Pro, I immediately used the backup Windows and recovery to take a complete image of the system and created a Windows repair disc too. Then I swapped the 256 GB SATA SSD m2 for a 512 GB SSD M.2 NVMe and used the Windows repair disk to restore the system on the new SSD 512 GB image. The process of restoration is completed successfully and rebooted, but at this point, the system would not restart with the mistake 'INACCESSIBLE BOOT DEVICE '. After much tinkering, I finally made a "reset my PC" where it appears to re - install Windows and now it starts very well on the new 512 GB SSD NVMe M.2. Although not as smooth a process as I would have liked, but at least I've made progress.

    HOWEVER, now when I start the machine, and I see the message "press ENTER to stop the beginning upward," message, pressing enter does nothing and it immediately starts Windows. The only way that I can return in the BIOS settings is:

    (1) start Windows

    (2)-> "settings".

    (3)-> «update & security»

    (4)-> "valuation".

    (5)-> "restart now."

    (6)-> "troubleshooting."

    (7)-> 'advanced options '.

    (8)-> "the UEFI firmware settings.

    (9)-> "restart."

    Yes, it's a 9-step process to restart the machine in order to enter the BIOS settings!

    How can I get this back to where holding 'enter' will make me in the BIOS settings when starting upwards?

    Reset BIOS default configuration, save it, full stop, restart. Your functions should now be restored

    The data of the user of the BIOS has been corrupted by the change in boot disk.

  • Time and Date setting

    In general - the time and date settings can I put two areas. I want to see two areas on my status bar. Don't want an app for that.

    I'm afraid, which is not supported by the firmware. If you want that for any update to update future iOS, let Apple know your wish using this link:

    Apple - iPhone - Feedback

  • Problem with the window "Variables and stack calls ': Options / interpret as

    Hello NO,.

    I found a way to run the JIT-debugger LabWindows/CVI on ICB itself...

    This is the procedure:

    1. I put a breakpoint, run the code, and the breakpoint, I opened the window "Variables and stack calls" by right clicking on a variable and selecting 'Display Variable View.
    2. Any variable shown, I right click and choose Options / interpret as

    You're right, I could now reproduce as well. It seems as if the presence of a function pointer, if set or not, causes interpret as shatter the debugger. The ADE does not seem to be affected, but you will probably have to restart your debugging session when this happens.

    I created the bug report 425151.

    I really appreciate the time spent in this narrowing for me. Thank you!

    Luis

  • problem connecting to TCP variables and shared help

    Hello

    I have a project (host and a device in real time) using variable static as well as TCP to send images over the network. I am familiar with the use of TCP in labview but never used TCP and shared variables in the same project before.

    I receive the error 63 off the open TCP connection. This only happens if an executable file is trained and deployed on the device in real time.

    Is there something to watch if the use shared variables and TCP?

    Thank you

    JChec

    Thank you Nate

    Fiddled a bit and found that the TCP worked great if I deployed from another computer. Thanks for the links, they were good reads

    JChec

  • reinstalled vista and I want to get my old programs and data in the windows.old directory saved

    My system crashed, and after that a dozen tries to fix, I reinstalled edition vista family. I still have my old files and progrmas in windows.old file I can access but can't get the programs and data in the file. Is there a way to do this?

    Hello

    These should help you recover you can:

    How to restore your personal files after you perform a custom Windows Vista or Windows 7 installation
    http://support.Microsoft.com/kb/932912

    How to restore your Windows.old folder in a new Installation
    http://www.Vistax64.com/tutorials/237033-Windows-old-folder-restore-into-new-installation.html

    I hope this helps.

  • Use fault strategies to get the input variable and call a new service.

    Hello

    I have 2 composites that are the answer to the request. If none of these composite gives an error I want to have policies to correct this fault. Is possible to obtain the input of the first variable composite and call a new service with this variable to handle the error?

    Thank you

    Daniel

    I found the solution here:

    With the help of mismanagement in a BPEL process

    Using the method getVariableData to get the variable I want.

    Kind regards

    Daniel

  • Problem getting a good graph of data

    Hello, I am currently an intern and I need to create an interface in LabVIEW for a & Rohde Schwarz BALLS Network Analyzer.

    The majority of the program working as it should, only retrieve the correct chart data seems to be a problem.

    I get images on my screen, but the data does not match with the data on the device.

    the device is connected to the computer using a GPIB bus, we use labview 2012 and labview 7 (program end must be in labview 7).

    I think that the problem lies in the VI that retrieves data from the machine: (scan of rszvl)

    explanation of the VI:

    Here, I have 2 images of the Network Analyzer, these images are correct and the goal is to get these on my computer in labview. (the second is just a flat line)

    Now, here's some of the creations I get in labview...

    I've also attached the full VI

    Should more information be required, please ask me

    Thanks in advance,

    Thomas V


Maybe you are looking for