Is it possible to srcipt something that reads text and make an appropriate image visible?

I have never written a script for indesign before so I am not really familiar with how it works
Eessentailly, I have a text box that a user would be writting a state in. I then want the script to take that as input, and then make a hidden image of that state visible.
Also, is it possible to have th script always running, or would the end user have to run it?
Thank you!

Hi,
It is possible using eventListeners. Look at example below and be awared that this is an example ONLY:
To switch this ON run:
#targetengine "session"
var myDoc = app.activeDocument;
myDoc.addEventListener("afterSelectionChanged", myDisplay);
function myDisplay(myEvent){
     if(app.documents.length == 0) return;
     var curDoc = app.activeDocument;
     if(curDoc.selection.length == 0) return;
     var
          myInput = curDoc.textFrames.item("input"),
          myOutput = curDoc.pageItems.item("output");
     if (!myInput.isValid || !myOutput.isValid) return;
     if (myInput.contents == "ON") myOutput.visible = true;
     else myOutput.visible = false; 
to switch this OFF run (or quit InDesign):
app.activeDocument.eventListeners.everyItem().remove()
Assumings:
input textFrame is named "input" (I mean in "Layer's Panel")
output pageItem is named "output"
type "ON" to make "output" visible
Jarek

Similar Messages

  • TS3899 Whenever I send an email, the person who receives it gets something that says References: and a long list on nonsense to do with Gmail before the actual message appears.

    Whenever I send an email, the person who receives it gets something that says References: and a long list on nonsense to do with Gmail before the actual message appears.
    Here is an example....
    References: <[email protected]> <[email protected]> <[email protected]> <[email protected]> <[email protected]> <[email protected]> <[email protected]> <[email protected]> <[email protected]> <[email protected]> <[email protected]> <[email protected]> <[email protected]> <[email protected]> <[email protected]> <[email protected]> <[email protected]> <[email protected]> <[email protected]> <CAM-_T=[email protected]> <BLU0 ,[email protected]> <CAM-_T=CAUP+9GyYG-_ecOazo=[email protected]> <[email protected]> <[email protected]> <[email protected]> <[email protected]> <[email protected]> <[email protected]>
    > Mime-Version: 1.0 (1.0)
    > In-Reply-To: <[email protected]>
    > Content-Type: multipart/alternative;
    > boundary=Apple-Mail-85351E4C-6385-4256-BE9E-27C10517E136
    > Content-Transfer-Encoding: 7bit

    It seems pretty clear to me.
    When you turn off your primary account the only active account the phone can send via is your Gmail account, and that's what you're seeing.
    The question is why do you need to turn off the primary account.. which you answer:
    When that is set up as the primary server and turned on I get a message that says "the recipient was rejected by the server
    That's because your ISP (megalink) is using access controls to manage who sends mail through their mail server. The first thing they're probably doing is using IP address restrictions - essentially saying they'll only relay mail from any machine on their network (including dialup/DSL/etc. customers), but you're not on their network, you're on an AT&T (or Verizon) 3G connection which isn't in their IP address range, and therefore not valid as far as their mail server is concerned.
    The typical solution to this is authentication - by authenticating to their server (via username and password) you identify yourself as a customer and they should relay your messages. So check your phone to ensure that you have authentication enabled for your primary mail account.
    If that fails (e.g. they don't support authenticated SMTP) the next option would be to relay the message through your cell provider's mail server - as an AT&T wireless customer you should be able to relay through AT&T's mail server... likewise for Verizon (or whatever national carrier your iPhone is on). You'll need to check with your carrier's site for the specifics of the mail server address to use.

  • How can i create a simple netweaver portal page that shows text and images?

    Hi,
    i have a simple question or maybe it's not so simple.
    I am completly new to SAP Netweaver 2004s Portal. At the moment i'm trying to understand the struture of the whole thing. I already know how to create roles, worksets and pages and i know how to combine the different elements so a user can acces them.
    And now i want to create a simple portal page that shows text and images. Is it possible to create such a simple page with the portal content studio? What iView do i have to use?
    (I just want to create a start page with a welcome text on it.)

    Marc
    Considering that you would any ways go ahead with complex development from this simple start page I recommend create a Web dynpro Iview for your start page (include the Iview in your page).
    For putting the contents use Netweaver Developer studio to build a simple start page application and put your static text on that Iview.
    Please go through the following log after your NWDS development is over - This will make you comfortable for further challenging work.
    http://help.sap.com/saphelp_erp2005/helpdata/en/b7/ca934257a5c96ae10000000a155106/frameset.htm
    Do reward points if this helps and let me know of you want anything more.

  • How can I synchronize my iPhoto events? my iTunes doesn't read them and with the app Images in the iPad I can only find Photos, Albums, Faces and Places, not Events.

    How can I synchronize my iPhoto events? my iTunes doesn't read them and with the app Images in the iPad I can only find Photos, Albums, Faces and Places, not Events.

    I had a problem a couple of months ago when iPhotos suddenly rearranged the order of my Events (Why won't iPhoto let me arrange my photos?) .  I was told "Use albums not events - events are not a good way to organize - albums and folder are designed for organisation and are very flexible".
    Haha!  I should have paid attention and read between the lines!  My iPhotos were highly organised groupings - not according to date but the way I wanted them - and it was so easy to do!  I see now that if I had them all in albums, as per the Apple Apologist suggestion, I wouldn't have this unholy mess I have been left with just to make iPhone & iCloud users happy.  I am now going through Photos and making Albums (of what used to be in my Events)  ... maybe I'll get this finished before they do another non user friendly update!

  • Aperture 3: After sending my book for printing to Apple the Apple Store told me that my text and the background have the same color and they couldn't print the book. But I couldn't find any problem in the preview. How could I find the problem pages?

    Aperture 3: After sending my book for printing to Apple the Apple Store told me that my text and the background have the same color and they couldn't print the book. But I couldn't find any problem in the preview. How could I find the pages where the problems are? Or otherwise, why doesn't print Apple the book how it is. Idon't need the text which couldn'be seen.

    The forum is for Logic Pro users.. I will ask the moderators to move it to a more appropriate forum for your question/subject
    Cheers..

  • Reading text and charachters from image

    Hi,
    Is there anyone that could share code to extract/collect text from images? I've tried nConvert and gocr but its not working very well (also its external programs). I would be extremley grateful if someone could share som code to parse the texts and numbers from an image.
    Thanks in advance!
    BR

    To answer your question - I'm teaching myself java and I haven't covered enumeration classes yet.
    With the setGender("Q") scenario, the data in the text file has already been validated by other methods before being written to the file. Anyway I worked out my problems were caused by "input = read.readLine()" being in the wrong places. The code below works fine though I've left out the set and get methods for the time being.
    Chris
    public static void readFile()throws IOException{
    String name = "";
    String gender = "";
    int age = 0;
    BufferedReader read = new BufferedReader(new FileReader("myfile.txt"));
    String input = read.readLine();
    while(input != null){
    name = input;
    input = read.readLine();
    gender = input;
    input = read.readLine();
    age = Integer.parseInt(input);
    input = read.readLine();
    System.out.println("Name: " + name + " Gender: " + gender + " Age: " + age);
    read.close();

  • My iphone is giving me a message that reads iphone cannot make or recieve calls.Restore from itunes.but when i log in to itunes its asking for me to input my password on my phone but my phone will only let me make an emergency call..Help

    My iphone is giving me a message that reads Restore Needed. "iphone cannot make or recieve calls. Restore from itunes,but when i loged in to my itunes account its asking me to input my password on my phone but I cant ... Im only allowed to make emergency calls. Help !

    My iphone is giving me a message that reads Restore Needed. "iphone cannot make or recieve calls. Restore from itunes,but when i loged in to my itunes account its asking me to input my password on my phone but I cant ... Im only allowed to make emergency calls. Help !

  • How to read text and it's font details (Family and size) using Acrobat plugin?

    Hello,
           I have query about reading PDF, I wanted to extract text and it's font details (Family and size) using Acrobat plugin. How can I achieve that?
    Any suggestions are welcome.
    Thanks
    Rohit Shinde

    Look at the samples in the SDK around PDFEdit and the PDEdit APIs.

  • Can I develop an iOS app that can download multiple free iBooks that I publish and make them available within the iBooks app?

    Is it possible for a self-developed iOS app to download iBooks from our server and make the books available to the iBooks app?
    My organization is evaluating publishing some free training manuals / textbooks as iBooks made with Apple's "iBooks Author" software. We don't necessarily want to use the iTunes Store for distribution because of the semi-sensitive nature of the content. To distribute the books to users with iPads, we've thought of using MDM software, a webpage, or an iOS app. The reasoning behind an iOS app is that the app would be a "download manager", making it much easier for a user to download all 42 books all at once. A user would install our "free training manual download manager" iOS app and use it to authenticate to a our server app that would serve the books, the end result being the books available via the iBooks app.
    Thanks,
    Ted

    Hi Kappy,
    Actually Apple lets self-publishers distribute iBooks outside of the iTunes Store, as long as the iBooks are free (no cost to user).
    What I'm wondering is if it's possible for a custom iOS app to side-load iBooks so that they're available to a user within the iBooks app.
    If not, we'll either post the iBooks for download from our website or we'll use MDM software to push the iBooks to MDM-enrolled iPads.
    Ted

  • Is there any way to display a file that contains text and pictures

    Hi all,
    I was wondering if java has any way to display a file that contains both text and pictures. I have tried using the RTFEditorKit and using an RTF file and it only diplays the text contained in the file and omits the pictures all together.
    code:
    import java.awt.*;
    import java.io.*;
    import javax.swing.*;
    import javax.swing.text.rtf.RTFEditorKit;
    public class Test
         JScrollPane scroll;
         JEditorPane edit=new JEditorPane();
         RTFEditorKit kit=new RTFEditorKit();
         public Test()
              final JFrame frame = new JFrame();
              frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
         edit.setEditorKit(kit);
         edit.setEditable(false);
         try
              kit.read(new FileReader(new File("Installation.rtf")),edit.getDocument(),0);
              catch(Exception e)
                   JOptionPane.showMessageDialog(null, e);
         frame.getContentPane().add(new JScrollPane(edit));
         Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
              frame.setBounds(0,0,screenSize.width, screenSize.height);
         frame.show();
         public static void main(String[] args)
    new Test();
    Please help!
    thanks in advance,
    Denise

    Not good as that usually means the project itself was corrupt.
    Any chance you sync'd to Creative Cloud? That's the only way I know of that backs up your PS Touch (PSDX) files.

  • Captions of photos in Yahoo cover the bottom part of pic. Makes it hard to read text and also can't see whole photo. Tried reset Firefox but that didn't work.

    When going through photo galleries on Yahoo (in news, omg, etc.) the caption is displayed on top of the bottom 'fifth' of the photo. (The caption should be below the entire photo.) The way the pations are overlayed makes it difficult to read the text of the caption and worse, it makes it almost impossible to see the lower fifth of the photo. I tried resetting Firefox but that didn't change anything. I can't find any yahoo settings or OS X display setting that changed this. I'm using Firefox 25 on a macbook air running OS X 10. Are there any firefox settings that would improve this? Thanks.

    You can also try to reset the page zoom on pages that cause problems.
    *<b>View > Zoom > Reset</b> (Ctrl+0 (zero); Command+0 on Mac)
    *http://kb.mozillazine.org/Zoom_text_of_web_pages
    If you have made changes to Advanced font settings like increasing the minimum/default font size then try the default minimum setting "none" and the default font size 16 in case the current setting is causing problems.
    *Firefox > Preferences > Content : Fonts & Colors > Advanced > Minimum Font Size (none)
    Make sure that you allow pages to choose their own fonts.
    *Firefox > Preferences > Content : Fonts & Colors > Advanced: [X] "Allow pages to choose their own fonts, instead of my selections above"

  • I have a vi that reading data and put it in a multicolumn listbox one by one, I want to know how can I do it if i will use MS powerpoint instead of multicolumn listbox.

    i want the data to be transfered in MS Powerpoint like what multicolumn listbox act in my vi.
    (would you mind if i will ask for an example)
    Thank You

    Good morning:
    I think you might have an easier time doing this with a Powerpoint macro than with Activex. You can save your data to a spreadsheet file, and then let the PPT macro read that file and format it the way you like. You will have to have two programs operating simultaneously, but that shouldn't be a problem.
    Eric
    Eric P. Nichols
    P.O. Box 56235
    North Pole, AK 99705

  • Anyone know a travel hard drive that reads cards and is Aperture friendly?

    I need a Mac friendly travel HD which reads files from camera cards. I have 2 HDs but they are both more PC friendly. Aperture won't recognize the files when they are on the drive but will when copied to my desk top.

    I just looked at the Wolverine data storage: http://secure.mm5server.com/merchant.mvc?Screen=PROD&Store_Code=WD&Product_Code= 7632&Category_Code=FlashPac
    That does not look bad with respect to capacity , weight, size. But the page does not tell anthing about the robustness. If you are travelling rough, you should try to find out about the operational requirements. For example, I once had problems with the drive in my MacBook in Tibet and Nepal; the Mac would not boot for several days. And when I looked at the tech specs, I found that the specification excluded heights above 3000m - I was simply at a too high altitude. If you are travelling into the tropics, you should also look at the humidity specs, and if the device will survive rough handling in your luggage.

  • My account says I have $1.05 and I try to buy something that's ¢99 and it doesn't let me, it says I don't have a enough, My account says I have $1.05 and I try to buy something that's ¢99 and it doesn't let me, it says I don't have a enough

    Please help me

    No one here can help you, we are users like you. Check with iTunes support. http://www.apple.com/emea/support/itunes/contact.html

  • I would like to know how to fix my safari. There are many pages that the text and links appear as "AAAAAAA" and I dont know where to click or what to do

    Please if anyone knows how to solve this problem, I bought this mac brand new, first time using it and many pages dont render the texts or links. It shows it like a series of "A"s.

    Please read this whole message before doing anything.
    This procedure is a diagnostic test. It won’t solve your problem. Don’t be disappointed when you find that nothing has changed after you complete it.
    Third-party system modifications are a common cause of usability problems. By a “system modification,” I mean software that affects the operation of other software — potentially for the worse. The following procedure will help identify which such modifications you've installed. Don’t be alarmed by the complexity of these instructions — they’re easy to carry out and won’t change anything on your Mac.
    These steps are to be taken while booted in “normal” mode, not in safe mode. If you’re now running in safe mode, reboot as usual before continuing.
    Below are instructions to enter some UNIX shell commands. The commands are harmless, but they must be entered exactly as given in order to work. If you have doubts about the safety of the procedure suggested here, search this site for other discussions in which it’s been followed without any report of ill effects.
    Some of the commands will line-wrap or scroll in your browser, but each one is really just a single line, all of which must be selected. You can accomplish this easily by triple-clicking anywhere in the line. The whole line will highlight, and you can then either copy or drag it. The headings “Step 1” and so on are not part of the commands.
    Note: If you have more than one user account, Step 2 must be taken as an administrator. Ordinarily that would be the user created automatically when you booted the system for the first time. The other steps should be taken as the user who has the problem, if different. Most personal Macs have only one user, and in that case this paragraph doesn’t apply.
    Launch the Terminal application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ Open LaunchPad. Click Utilities, then Terminal in the page that opens.
    When you launch Terminal, a text window will open with a line already in it, ending either in a dollar sign (“$”) or a percent sign (“%”). If you get the percent sign, enter “sh” and press return. You should then get a new line ending in a dollar sign.
    Step 1
    Copy or drag — do not type — the line below into the Terminal window, then press return:
    kextstat -kl | awk '!/com\.apple/{printf "%s %s\n", $6, $7}'
    Post the lines of output (if any) that appear below what you just entered (the text, please, not a screenshot.) You can omit the final line ending in “$”.
    Step 2
    Repeat with this line:
    sudo launchctl list | sed 1d | awk '!/0x|com\.(apple|openssh|vix)|edu\.mit|org\.(amavis|apache|cups|isc|ntp|postfix|x)/{print $3}'
    This time, you'll be prompted for your login password, which won't be displayed when you type it. You may get a one-time warning not to screw up. You don't need to post the warning.
    Note: If you don’t have a login password, you’ll need to set one before taking this step. If that’s not possible, skip to the next step.
    Step 3
    launchctl list | sed 1d | awk '!/0x|com\.apple|edu\.mit|org\.(x|openbsd)/{print $3}'
    Step 4
    ls -1A /e*/mach* {,/}L*/{Ad,Compon,Ex,Fram,In,Keyb,La,Mail/Bu,P*P,Priv,Qu,Scripti,Servi,Spo,Sta}* L*/Fonts 2> /dev/null
    Important: If you formerly synchronized with a MobileMe account, your me.com email address may appear in the output of the above command. If so, anonymize it before posting.
    Step 5
    osascript -e 'tell application "System Events" to get name of every login item' 2> /dev/null
    Remember, steps 1-5 are all drag-and-drop or copy-and-paste, whichever you prefer — no typing, except your password. Also remember to post the output.
    You can then quit Terminal.

Maybe you are looking for

  • How do I convert an sdw. file to microsoft word?

    I wrote a book on an older star office program about 7 yrs ago and I need to convert the sdw. file somehow so I can transfer the book into microsoft word. I do not have the star office program any longer. Please help??!!

  • Mail window too big

    (I am trying to solve this for my mom over the phone as she is 2 hours away from me, but am stumped. She has never used a computer before now, but I am not that much better) She says she was typing a reply to an email within Mail and guesses that she

  • When my phone rings it goes straight to please wait while your party is reached. how do i get rid of that message?

    when my phone rings it goes straight to please wait while your party is reached. how do i get rid of that message?

  • No CD-RW burning on pre July 2004 dual 1.8GHz G5?

    Hi! After 2.5 years of using this G5 I recently tried burning an audio CD on a blank audio dedicated CD-RW disc and noticed that the drive doesn't recognize this as a blank disc. I tried two different brands from iTunes and Toast. The drive has so fa

  • Need to fix "connecting.."

    Hi, Need help to fix this problem for Facetime "connecting.." ??? PLEASE. Sometimes my facetime is working. But in some contacts it is not working. They can accept my calls, but it is stuck on "connecting.." Then it will end in a few seconds. Need yo