IF functions using text from a TextField

why wont if functions work when using text from a text field
here is an example:
ForeName=TextArea1.getText();
if(TextArea1.isEnabled()==true)System.out.println("1");
if(TextArea1.isEnabled()!=true)System.out.println("2");
if (ForeName=="")System.out.println("3");
if (ForeName!="")System.out.println("4");
if (ForeName==null)System.out.println("5");
if (ForeName!=null)System.out.println("6");
Output
1 //as expected
4 //??????
6 //??????

Change your ifs to ForeName.equals(""). You should pretty much only use ==, !=, >, etc. if you're comparing primitives (int, doubles, floats, etc.) For everything else, .equals is the way to go.

Similar Messages

  • Attach pdf to email and use text from field in body

    I'm looking to create a fillable form with a 'submit' button at the bottom.  Upon clicking the submit button, I would like an e-mail window to open with a pre-defined recipient, and the pdf attached.  I've found code to accomplish this using this.mailDoc()
    However:
    I'm also hoping to get the text from the "Name" field of my form and use it in the body of the e-mail.
    I've found the following code in another post, which appears to work for this:
    var cClientName = this.getField("ClientName").value;
    var cAddress = this.getField("Address").value;
    var cBody = "Client Information:\n\n";
    cBody += "Client Name: " + cClientName + "\n";
    cBody += "Address: " + cAddress + "\n";
    var myURL = "mailto:[email protected]?subject=Client Info&body=";
    myURL += cBody;
    app.launchURL(myURL, true);
    That will open an e-mail window with a body containing the data from AcroForm fields named "ClientName" and "Address".
    The problem is, that this code will not attach the pdf.
    How can I get the best of both worlds?
    Thanks!

    You don't need launchURL to achieve that. mailDoc is capable of setting the
    subject line, email body, recipients lists, etc.
    See this tutorial for a detailed explanation:
    http://acrobatusers.com/tutorials/dynamically-setting-submit-e-mail-address

  • Subtitles can I use text from FCP?

    Hey,
    Can I use text I created in FCP and use it in DVD SP?
    Also, if I have a feature film that needs translation, what should I ask for? I mean is there EDL or OMF kind of file that DVD SP need? a

    If you create the subs in FCP then basically they would be like burnt in subs you get on some films (i.e. you can't switch them off because they are embedded in the film itself). However, as Chris says, if you want to create subtitles that DVD-SP can use then create them as an STL file - this is an external file withy timecode refernces for in and out points for the subtitles and the relevant text.
    Belle Nuit Subtiler can be used to create subs for both DVD-SP and FCP I think
    Not sure that there is any software that "extract" subs from an FCP project though...
    Steve Kirkham

  • Is it possible to create a Text Variable that uses text from a structure?

    The question is this -
    I have created structure which consists of 4 high-level nodes. Each level one node contains a different number of level 2 nodes. Is it possible to use the text from these nodes in replacement path variables? 
    Example, my structure levels are:
    GS
    SA
    OOI
    COGS
    If a user drills into COGS, I'd like to display the text "COGS" in the header but I have not found a way to capture it. From what I can tell, the variable editor only allows Characteristics and their text/key or user input text. I don't see an option for Structure level/node text.
    Anyone know if this is even possible?
    Thanks!

    HI!,
    I think you should separate programming for AS3 and for FLEX,
    this is beacuse they both use different class packages. If you want
    your classes to be FLEX compatible you need to extend them from
    Flex Objects and not from AS3 Objects.
    In sum, if you want your class to be processed by let's say
    the application object then you need to extend it from
    mx.core.UIObject.
    This is because there are lots of methods that FLEX uses to
    place your class on the screen that are not used by normal AS3
    applications.

  • Excute Oracle function using data from a CFFORM

    For simplicity, I have a function that will add 1 to a number
    a user will enter from a form. So if the user enters the number 2
    and submits the form, the next page will display 3.
    If I enter the following code in SQL Plus, I get 3:
    SELECT MySchema.Add_Function('2') FROM dual;
    3
    This is correct.
    How do i get this to work?
    <cfquery name="funcTest" datasource="Test">
    SELECT MySchema.Add_Function('#FORM.userNumber#') FROM dual;
    </cfquery>
    <body>
    Your new number is
    <cfoutput>#funcTest.Add_Function('#FORM.userNumber#')#</cfoutput>
    </body>
    I get
    ELEMENT Add_Function('2') is undefined in funcTest.
    Any ideas?
    THANKS

    Cross-post
    http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?forumid=1&catid=6&threadid=13 06590

  • How can I automatically create calendar events using text from a Pages document?

    Hello,
    I'm looking for a way that I can automatically have calendar events created, by extracting dates and times from a table within a Pages document I have saved on my Mac.
    Currently, I record my working hours/dates on a Pages document in table format, so that I can record and ensure I receive payment for all hours I work.
    After finding out which shifts I have for the week, I insert the day, date, start time and end time (for each shift), into a table within a Pages document.
    I'm wondering if there is any way - such as through Automator, Apple Scripts, etc. - that I can then have the Calendar app automatically create events from that data - including the date, start and end times for each shift?
    Also, if possible, is there a way to set each event to automatically alert me at a chosen time (1 day, 2 days, etc.) beforehand?
    Here is an example of the layout of my document table:
    Date
    Start
    Finish
    Duration
    Saturday, 21 December 2013
    8:00 AM
    5:00 PM
    9:00 hrs
    Sunday, 22 December 2013
    9:00 AM
    6:00 PM
    9:00 hrs
    Monday, 23 December 2013
    12:00 PM
    9:00 PM
    9:00 hrs
    Tuesday, 24 December 2013
    12:00 PM
    6:00 PM
    6:00 hrs
    If anyone can help with this question, that would be greatly appreaciated, as then I could have my calendar automatically create and sync my work shifts across to my iPhone, iPad and Mac.
    Thanks in advance,
    John.

    I totally agree with you.
    Where are the fixes for a long string of bugs, glitches and user issues?
    Looking at the list of new "features" for the next OSX, Maverick (what a dumb name!), all I am seeing is Apple ripping off other peoples' ideas, something it swinges others mercilessly for.
    There is not one thing in Maverick that I don't already have, only more so, with 3rd party add-ons.
    Apple seems bereft of ideas now and I am totally mystified what it is doing with all that money and employees it has accumulated.
    Peter

  • Text from on TextField to another

    hi all,
    i have a small problem in swings, the thing is i have two frames, having contents something like this,
    frame1: TextField1,Button1
    frame2: TextField2,Button2
    when i click on Button1, frame2 is displayed. Now, i enter some data in TextField2, and then press Button2, the frame2 would disappear, actually, until here i have no problem, what i wanted is, the data entered in TextField2 should be displayed in TextField1, which is not happening.
    can anybody please help,
    Thanking all,
    Balaji.SN
    [email protected]

    Hi,
    if you have the references to the 2 textfields, simply do
    TextField1.setText(TextField2.getText());if you don't have the reference to TextField1 available, perhaps you can pass it in an additional constructor of that second frame and store it in a field (i.e. variable) of that frame.
    greetings Marsian

  • Importing Arabic text from an XML file

    Importing text from an XML file to appear as text in Flash
    works in English, however if the text I want to import is in
    Arabic, when I test the movie there is no text at all.
    Is there some particular syntax to preface the Arabic text?
    I'll want to import text from XML in other languages too.
    (French)
    I'd cut and pasted some Arabic text into the XML file that
    displays pictures and text in the "slideshow.fla" (
    http://www.adobe.com/support/flash/applications/jpeg_slideshow_xml/jpeg_slideshow_xml03.ht ml)
    Substituting Arabic text for English text, editing the XML
    file with Dreamweaver.
    Any ideas as to how I might achieve my objective of importing
    Arabic text into Fash?
    I'd started developing my prototpe in Macromedia Director 7,
    and then Director MX, but I have not found a suitable Arabic font
    that I can embed that will allow me to display Arabic fonts in
    Adobe Director. I have the Arabic text in a Word document.
    I've dicovered that my Flash MX Pro and Dreamweaver both
    support Arabic fonts, but I want to import text from an XML file.
    I'd prefer using cast libraries and cast members, but I don't
    know of an equivalent in Flash to what I'm comfortable with in
    Director.

    Oh so many questions. You probably aren't going to like the
    answers. I have Flash MX04 pro (aka Flash 7) and things made a big
    jump between MX (aka 6) and MX04. If you only have MX, there might
    not be a way to do this. All my advice is based upon MX04 or
    higher.
    It is possible to do complex languages in Flash. My
    experience is with Hindi and I've helped a few folks here with
    Arabic.
    You won't be able to use text from Microsoft Word – at
    least I don't think so. The XML file will need to be saved in the
    UTF-8 format. I think Word uses its own scheme and won't work. But
    I'm not a Word expert. Something like Text Edit (Mac) or WordPad
    (PC) should be able to save a UTF-8 file.
    The next problem is you mention "suitable Arabic font that I
    can embed." AFAIK, you can't embed any of the complex scripts in
    Flash. You just have to rely on the end user having appropriate
    fonts installed and enabled. Most operating systems from 2000 on do
    have this – although some folks like to remove them to save
    space.
    Next issue will be line composing. I've found that when using
    anything above the normal Latin range that Flash suddenly forgets
    how to make a line fit into a text area. It will just break things
    in the middle of words and not even notice the spaces between
    words. I've written a little snippet of code that "composes" the
    lines. It works well with Hindi and folks here have used it with
    Arabic and not come back saying that it doesn't work. Search the
    forums (both the Flash and Actionscript) if you can't find it I'll
    dig it out when I get home.
    So here is the checklist:
    Make sure the XML is saved in UTF-8
    Import the XML file
    In Testing environment go Debug–>List variables.
    Does it show up correctly there?
    Does it show at all in a text field?
    Use the "composer" to make the lines break.

  • Download of SO10 - texts from r3 to crm possible ?

    Hello experts,
    we want to use texts from R3 TX SO10 in CRM.
    Can we download this texts ?
    Thanks Gerd

    Hi Gerd,
    Try that by using report RSTXSCRP.
    There I would change in the default options:
    - choose standard text checkbox.
    - Object name: *
    - IMPORT or EXPORT option (dependending the action you want to do in the system)
    - Checked the binary file format (to avoid unicode/non unicode problems)
    Kind regards,
    Bruno

  • Generate text from the effect controls

    Is it possible to generate text from a textfield (or something similar) from the effect controls?
    I have an Adjustment Layer with a custom effect on it with a Slider, two Color pickers and four Checkboxes.
    Can I somehow add a textfield that the user can input text in, and then link this to a text layer in the composition?
    The reason I want this, is because the user can add all the information in one effect, instead of having multiple text layers to edit.
    I don't think there is a textbox for this, but is there anpther way? Let's say I add an effect that has a dynamic name, that I can link up to the source text of my textlayers in the composition.
    Any help would be much appreciated
    Eirik

    Thank you for fast reply!:)
    Ok, then I guess it can't be done, not the way I hoped anyway.
    This is the effect I have made. I have linked the properties to other layers.
    What I wanted was an input field where the user inputs for example "My Title". The source text of my text field in the composition would then update to "My Title".
    I know I could probably do this by code, but then the original point kinda disappears. It should be easy for the user to adjust the settings under one effect, instead of having to adjust it multiple places.
    I guess the user have to edit the textfield in the comp by actually going into the layer (doubleclick it/highlight it with the text tool etc.) unless you have a genius workaround? (Please say you do:P)
    Eirik

  • Copying text from PDF created using print to PDF function in OS X

    I use a MacBook Pro with Mac OS X Lion, and Microsoft Word 2008 for Mac and Adobe Acrobat Pro.
    For some reason when I use the Print to PDF function to export a PDF of a Word document, then open it with Acrobat Reader or Acrobat Pro 9 and try to select text and copy it then paste it into a word processor (include Word 2008) the resulting text is gibberish. It looks like some sort of encoding issue, but I can't understand that, since it's all happening on the same Mac! I have also tried to do this with Preview as the PDF reader but I still get gibberish.
    The issue first started occuring with Snow Leopard, and all software is patched, but no dice.
    I've attempted to work around this by using all of the different PDF options under the print dialog, and by saving the doc as a PDF, but I still get the same thing.
    I've also tried copying and pasting the text int Pages, then saving it as PDF and trying to ready it .. again, no luck.  I was able to output the file directly from Pages to Preview and save it from there, but it really doesn't seem like this should be necessary, given that the functionality is build into the OS.
    Anybody else have experience with this? I have just one user that needs to copy and paste text from the doc, so it's a real pain to have to maintain separate PDF and Word versions.
    Thanks!
    D

    Rishi,
    Welcome to Apple Discussions.
    After reading your post, I tried to duplicate this problem. I opened a PDF, selected a sentence, then copied it to the clipboard. I then opened Pages, selected the blank template, then pasted in the text. It pasted perfectly.
    Does this problem happen with all text in a PDF? With different PDFs?
    -Dennis

  • I cant use the highlight, underline, or strikethrough function in a specific pdf file. The file isnt locked. I used to highlight texts from that file before the latest update. The problem occurs only with that file. Urgent need. Please help. Thanks!

    i cant use the highlight, underline, or strikethrough function in a specific pdf file. The file isnt locked. I used to highlight texts from that file before the latest update. The problem occurs only with that file. Urgent need. Please help. Thanks!

    Chester31,
    Thank you very much for sharing your file with us!  Now that we are able to reproduce the problem at our end, you may stop sharing the file on Acrobat.com.
    Do you know when this problem (for not being able to add new highlight/strikeout/underline) has started?  Did you update your iOS from 7.x to 8.0 recently?
    We will continue investigating the problem and let you know what we find.
    Thank you again for your help.

  • Using SO10 texts in (dynamic) textfields

    Dear,
    We're using SO10 texts from SAP in our Interative Forms to translate conditions and the like. We added a style to it etc. and by setting the textfield to XHML and Rich Text in the settings it can be set directly with all layout programming saved. It's obviously also set to Multiple Lines.
    I was wondering, is there a way to dynamically adjust the size of a textfield (in a flowed subform)?
    Or, and this solution is just as fine, is there a javascript function or method I can use to adjust the textfield height at runtime after the text has been entered (in the 'initialize' event then).
    Thanks in advance,
    Frederik-Jan

    Hello!
    Check at Layout pallete if your field has 'Expand to fit' parameter set under its Height.
    Regards,
    Pjotr Perstnev

  • How do I create a series of text frames using values from Excel list?

    First of all, this is the very first script I'm attempting to write from scratch. I'm completely green at scripting, and I've picked up a few snippets from Adobe's ID scripting guide, but nothing has really stuck yet relating to this particular objective.
    My supervisor keeps a master list of ad spaces, with the name of the account, how wide the space is, and how tall the space is, all in an Excel sheet. These spaces can number in the hundreds, and I am stuck manually drawing one rectangle for every space, which takes a very long time.
    I'd like to create/have help creating a script that will take these values and "automagically" draw these spaces in the form of text frames, with the width (in columns) and the height (in inches) defined by the values in the master list, as well as the name of each account appearing in the subsequent text frames.
    The script doesn't necessarily need to be able to pull the values straight from the Excel sheet; I can transfer the values to a support text file if needed, or directly into the script, changing it as I need it. A big thing (if it is not able to pull right from an Excel sheet) is that the number of spaces changes weekly, and so do the accounts, and the width and the height. Accordingly, it would be ideal if the values from the sheet could be changed easily, so as to create a new set of spaces as needed.
    Positioning for each space is not crucial, only height and width. If they all appear on top of each other on the same page, that will be a result for me. The main idea is to not have to draw them all manually, one by one.
    To me, this sounds like a tall order, but hopefully some experienced scripters out there can assist me, as I wish to become experienced as well.
    So, the TL;DR version:
    - Script needs to draw a series of text frames.
    - Text frames dimensions need to be defined by width and height values from Excel sheet.
    - Text frames must have account name as contents (from account names in Excel sheet).
    - Accounts, width and height change every week in the Excel sheet, so must be relatively easy to exchange all of the values.
    - The width values are on the Excel sheet as columns. It would be ideal if the script could convert those numbers into multiples of columns as needed.
    - (Optional) Script can pull values directly from Excel sheet.
    - (Optional) Script can define text frame fill color as gray. (If it works as I think it will, I could just select all the resulting text frames myself and set them all to gray at once... I'm not that lazy )
    Thanks in advance to whomever can assist in any possible way, even if it is just a push in the right direction. This script will save 1-2 hours of tedium every week.

    Sound like the perfect thing for InDesign Scripting.
    I would copy the Excel contents into a text file, to get a format that is easily read from InDesign, and there will automatically be a TAB for each "cell" just using copy/paste.
    Here is a piece of code, that you perhaps could go on with (adding variable to change pages and location on page, and other stuff).
    The readFileLineByLine function, can be easily re-used with any function using "callback". You simply supply the function to it, that you want to be executed for every line of text that is read:
    const COLUMN_WIDTH = 2; // Define the column width in inch
    var pageIndex;
    var textFramesExported; // not implemented.
    // Add a new dokument. Set myDoc to app.activeDocument to use
    // the current document instead of creating a new one.
    var myDoc = app.documents.add();
    // The doSomethingWithTextRow function is called upon for every line of text read.
    readFileLineByLine('c:\\test.txt', doSomethingWithTextRow);
    function doSomethingWithTextRow(row){
        // We expect the text line to be TAB separated (\t = TAB). We get that from just copying the contents of an
        // excel file into a text document.
        var cells = row.split('\t');
        var companyName = cells[0]; // The Company name in the first slot of the array
        var width = COLUMN_WIDTH * cells[1];
        var height = cells[2];
        // Create a new text frame for every row handled
        if (pageIndex==undefined) pageIndex = 0; // Count up when you have exported a number of texts, I leave this for you to do.
        var newTextFrame = myDoc.pages[pageIndex].textFrames.add();
        newTextFrame.contents = companyName;
        // The text frame is created in the top left corner.
        newTextFrame.geometricBounds = [0, 0, height + ' in', width + ' in']; // Top, Left, Bottom, Right
        // You might want to move the textframes to other positions, keeping track of how many you put out per page.
        newTextFrame.move( [10, 10] );
    function readFileLineByLine(path, callbackFn){
        var myFileIn = new File(path);
        if (File.fs == 'Windows'){
            // This was probably added to recognize UTF-8 (even without its start marker?)
            myFileIn.encoding = 'UTF-8';
        myFileIn.open('r');
        var myEncoding = myFileIn.encoding;
        try{
            if (!myFileIn.exists){
                throw('Missing file: ' + myFileIn.fsName)
            var ln = '';
            while(!myFileIn.eof){
                // Read the lines from the file, until an empty line is found [now as a remark].
                ln = myFileIn.readln()
                // if(ln !='' && ln!='\n'){
                   // Call the function supplied as argument
                   callbackFn(ln);
        }catch(e){
            alert(e);
            gCancel = true;
        finally{
            myFileIn.close();
    The file in C:\ in my example was saved as UTF-8 and looks like this (showing hidden characters):
    Message was edited by: Andreas Jansson

  • Using browser javascript to copy selected text from a pdf file opened in Air app.

    I have posted this question on reader forum as well, but I think it is more suited here...
    I am trying to create a note-taking application in air. I want to extract selected text from pdf file as a string object or to the clipboard.
    Obviously, all pdfs in my local storage will not be scripted to recieve postMessages and act accordingly, and that is not practical either. So, my problem is, how can I copy the selected text in the pdf file (opened as an object in htmlloader within my Air app) to clipboard or directly in another control by say clicking a button in air application? I suppose, this is possible using javascript, however, I don't know which reader methods are exposed to the wrapper htmlloader control. In short, I want to execute app.execMenuItem("Copy") command through htmlloader javascript. Any alternate solutions are also welcome.
    This is similar to passing inbuilt commands/methods/functions (of adobe reader) to pdf-reader plugin embedded in a webpage via javascript. This is possible in IE where the pdf is rendered as activex object, and hence JSObject interface of pdf document/reader is accessible to the browser javascript. I have also read that this same JSObject is accessible to VB as interface for IAC, so as the Air is Adobe's own product, I was wondering if equivalent of JSObject is accessible to htmlloader control as well.
    Thanks in advance...
    Mits

    Thank you Thom for your reply...
    from
    http://www.adobe.com/devnet/acrobat/javascript.html
    ...Through JavaScript extensions, the viewer application and its plug-ins expose much of their functionality to document authors, form designers, and plug-in developers...
    As it is explicitly mentioned, that the functionality of adobe reader are exposed for plugin development, I thought someone here might have used external javascript to execute some safe methods in adobe reader. The functionality (i.e. external javascript interface-JSObject) is already available for VB programmers to develop IAC. Further, the Acrobat SDK example called "AcroPDFinHML" shows how one can embed a pdf-reader in a html page and execute some safe methods (like gotonextpage(), zooming etc.) in IE as ActiveX plugin. I have checked it myself for adobe reader 9, and it works perfectly, so there is no security issue as such to implement the same for another browser (like in my case, the htmlloader control in flex/air app).
    I intend to create a note taking application in air, where it is very much required that I should be able to copy selected text from various pdf documents, that are open in my app, and subsequently paste/collect/save the collected notes and process them afterwords (offcourse, from the pdfs that allow me copying text). However, it is not happening for me here. As the pdfs are opened through adobe reader plugin, it does not register the copy command executed by my air app. It registers the system level copy command (by keyboard shortcut Ctrl+C), but my air app has no way to execute the system level copy command programmatically. So I am kind of stuck here...
    Thanks again for your reply. Having known what am I intend to accomplish, any other (may be alternative) solutions will be appreciated nonetheless...
    Mits

Maybe you are looking for

  • Clean Reinstall/Must restore from original disks or can I use 10.4

    Have pored thru the forums looking for my specific questions but haven't found them - so please bear with more clean reinstall questions --- 1) Yes - I have to do a clean reinstall - much other discussion on other forums has said this is what needs t

  • Cannot save a pdf file. XP SP3, Firefox 5.0.

    When I try to save a pdf file to my computer, Firefox "hangs" and I have to close everything and exit Firefox. I am "saving" while Firefox is open. This happens every time I try to save a pdf file. I am able to save pdf files using IE as my browser.

  • Adobe Photoshop Elements 11 downloading.

    DownI   i purchased Photoshop Elements 11 in August 2013 and a few weeks ago had a problem with my computer whereby I had to download everything and then re input. Unfortunately I could not find anywhere that I could re install and put in my "Serial

  • Photohop CS6 Update to 13.0.2 breaks keyboard input and shortcuts

    Hi, I just got the new update to 13.0.2 and after installing it Photoshop doesn't recognize keyboard input as expected? Shortcuts are not working anymore. Input values are not recognized. Text editing not possible anymore. etc. And: When I start Phot

  • Bluetooth mouse skipping

    Has any one run into an issue where their mouse cursor would skip. ie. you go to point at a link and suddenly the cursor ends up at the bottom of your screen, or the far right or left, anywhere but the place you originally had it at without moving th