How can I use AppleScript Studio to display an image

How can I use AppleScript Studio to display an image in a dialog?

Add an image well to your window in Interface Builder.
You can also add an image file to the Resources group of your Xcode project and then set the image to be displayed inside the image well directly in Interface Builder. No AppleScript code is needed if the image is contained within your app bundle and can be set ahead of time like this.
If the image is contained in your app's bundle but you need to set or change the image at run time then you can use a line of AppleScript to load it into the image well using just it's filename:
set image of image view "yourImageView" of window "yourWindow" to load image "YourImageFile.jpg"
If you need to load an image from an arbitrary location outside your app's bundle then use a path to the image file...
set image of image view "yourImageView" of window "yourWindow" to load image "/path/to/YourImageFile.jpg"
Steve

Similar Messages

  • How can I use Applescript to copy a file's icon to the clipboard?

    Hello,
    How can I use Applescript to copy a file's icon to the clipboard?
    Thanks.
    Lennox

    there is no way to do that that I know of. but you can extract an icon of a file to another file using command line tool [osxutils|http://sourceforge.net/projects/osxutils]. you can then call the relevant command from apple script using "do shell script".

  • How can I use applet to get the desktop image of client

    hi,I have a question to ask u.
    How can I use applet to get the desktop image of client? Now I develop a web application and want user in the client to get his current image of the screen.And then save as a picture of jpeg format ,then upload it to the server?
    I have done an application to get the screen image and do upload file to server in a servlet with the http protocal.

    Since the desktop image is on the client's local hard drive, you'll need to look at trusted applets first.

  • How can I use applescript for OCR of a bunch of files - with Acrobat XI?

    Hi there,
    Iwant to write a script (eg applescript) that can be used as a droplet or has a menu to open a folder of scanned pdf-files to conduct OCR. And - I want to use Acrobat XI (as this is my version), German verison.
    As Acrobat XI is not recordable with the applescript-editor and I do not find a manual of objects and methods I googled a script that worked with Acrobat 9 but not with Acrobat XI. Here you define a "Action Assistant"-Script e.g. called "OCR this" and "click" the item. But as in Acrobat XI this Item is noch in the main-sbubmenu anymore it seems not to work.
    Here is a Screenshot:
    And this is theapplescrpt, tha opens the "Aktionsassistent":
    click the menu item "Aktionsassistent" of menu "Werkzeuge" of menu item "Werkzeuge" of menu "Anzeige" of menu bar item "Anzeige" of menu bar 1
    Butr then I cannot reach "OCR this".
    If any body has a hint - either for clicking "OCR this" or to sript  an OCR on an opened pdf.file with applescript this would be great.
    Thanks,
    Maritn

    AppleScript is documented in the Acrobat SDK. But there is no method for this.

  • How can I use my 23" cinema display with a pc laptop?

    I see various questions out there about using Apple Cinema Displays and PCs, but each one has its own twist. If anybody can help with this scenario, I'd greatly appreciate it.
    I use one of the last editions of the Powerbook G4. I just bought a 23" Cinema Display and, of course, love it. It is supposed to replace an old CRT monitor in the home office, which brings me to my problem. Can I hook up a pc laptop to use with the Cinema Display (I ocassionally need the pc laptop and my wife and kid use it as well). I realize it will depend on the graphics card. Offhand I'm not sure which one it is, but the Dell is just shy of a year old and has good graphics, albeit VGA. I need a female DVI (I assume DVI-I) and a male VGA connector. Do these exist? I'm also looking for a PC Card DVI-I graphics card, but I don't know if these exist either.
    I could buy a Dell (or some other brand) monitor that has both DVI and VGA connections, but I really want to keep the Cinema Display. It's gorgeous.
    Thanks for any help.
    Regards.
    Powerbook G4 15" Mac OS X (10.4.5) 23" Cinema Display

    Phil,
    Thank you for the reply. I kind of figured this was the case. I have found two "boxes" that supposedly handle this problem. One is from Dr. Botts called Vgator and the other is from Gefen (www.gefen.com), but these solutions are very expensive -- $300 each -- and I am not certain of the quality of the picture. For that kind of money, I could buy a cheap PC monitor and just use the Cinema Display for Mac-only needs, as it was intended.
    Take care.
    Dan.

  • How can I use two screens to display one window

    Before Mavericks, MAC OS allowed you to use two screens (next to each other) in order to display one (big) window of one application.
    That would mean that a window would start on your left screen en would continue on the right screen.
    With Mavericks, however, this not possible any more. The window of the application can only be seen on ONE of the screens (i.e. the left one).
    Can any one tell me whether I've missed certain options or how to adjust my settings in order to get this feature back?

    Hey CGNL,
    First, if you haven't already, set up the displays as an extended desktop:
    Choose Apple menu > System Preferences, click Displays, then click Arrangement.
    Follow the onscreen instructions.
    Then, use Mission Control preferences to uncheck/turn off the option for "Displays have separate Spaces":
    Choose Apple menu > System Preferences, click Mission Control
    Uncheck "Displays have separate Spaces"
    That should enable you to stretch whatever window you want across multiple displays.
    via: OS X Mavericks: Connect multiple displays to your Mac
    http://support.apple.com/kb/PH13814
    and
    OS X Mavericks: Mission Control preferences
    http://support.apple.com/kb/PH13925
    Welcome to Apple Support Communities!
    Have a good one,
    Delgadoh

  • How can I use the tooltip widget on individual images in my thumbnail gallery?

    Hey guys
    I've got a client that is insisting on not having the caption text visible on each picture unless you could click or hover over a little information button. But I can't get the tooltip widget inside an individual image's lightbox (hope this makes sense). I have very little coding knowledge and was hoping someone would have the answer to this?

    Does no one have an answer to this Was hoping that someone could save me on this dilemma.
    A side question, has anybody used a different gallery with muse before?

  • How can I modify this code to display an image in an applet?

    Sorry, I'm almost positive this is absolutely incorrect, but here is what I have so far:
    import java.awt.*;
    import java.awt.event.*;
    import java.awt.image.*;
    import java.io.*;
    import javax.imageio.*;
    import javax.swing.*;
    public class Blackberry extends JApplet implements ActionListener
         Image image;
        public void init()
            //image = getImage(getDocumentBase(), "bluespace.png");
            try { image = ImageIO.read(new File("bluespace.png")); }
              catch (IOException e) { }
        public void paint(Graphics g)
            g.drawImage(image, 0, 0, this);
    }There are no errors given when run as an applet in Eclipse, it just displays a blank window.

    Here's a small example of a JPanel that draws an image:
    import java.awt.Dimension;
    import java.awt.Graphics;
    import java.awt.Image;
    import javax.swing.JPanel;
    public class ShowImageJPanel extends JPanel
      private Image image;
      public ShowImageJPanel(Image image)
        this.image = image;
        Dimension size = new Dimension(
            image.getWidth(this),
            image.getHeight(this));
        setPreferredSize(size);
      @Override
      protected void paintComponent(Graphics g)
        super.paintComponent(g);
        if (image != null)
          g.drawImage(image, 0, 0, this);
    }and a JApplet that adds this JPanel into its contentPane:
    import java.awt.Image;
    import java.io.IOException;
    import javax.imageio.ImageIO;
    import javax.swing.JApplet;
    public class ShowImageApplet extends JApplet
      private static final String IMAGE_PATH = "images/SunSteinSmall.png";
      public void init()
        try
          javax.swing.SwingUtilities.invokeAndWait(new Runnable()
            public void run()
              createGUI();
        catch (Exception e)
          System.err.println("createGUI didn't successfully complete");
      private void createGUI()
        try
          Image image = ImageIO.read(getClass().getResourceAsStream(IMAGE_PATH));
          getContentPane().add(new ShowImageJPanel(image));
        catch (IOException e)
          e.printStackTrace();
    }Here I have a subpackage off of the applet's package called image, and it's filled with Duke images which you can download from here:
    [https://duke.dev.java.net/images/index.html]

  • How can i use adobe drive/cs4 for storing images and interact this with adobe cq5.4 DAM...

    Hi,
    Can anybody suggest me i want use adobe drive to store images and i want to access the images for my cq5.4 instance..
    I want to integrate drive to the cq5.4 dam for ignoring the dam burden on cq5 instane repository..
    Is it possible to use this drive? or is there any other way i can achieve my task?
    Thanks,
    Sony C.

    Adobe Drive software doesn't store images; it enables integration of a DAM system with Creative Suite and now Creative Cloud desktop apps.
    Adobe Drive 3 is the first version of the software to support integration with Adobe's DAM. This version was designed to work with CS5 and CS5.5 apps.
    We do not have a version of Drive that supports integration with CQ 5.4 DAM and CS4 apps.

  • How can I get my browser to display thumbnails, images, and the background?

    I've had this problem for months now. I've tried uninstalling and reinstalling, resetting, everything I could think of. However, the problem remains. The background is never there, thumbnails are never there, images are invisible. It's basically just shapes and text.
    Is there any way I can post a screenshot?

    I have posted a screenshot of what I mean.

  • How can i use my smart TV as a second monitor for my Power mac (2010) via HDMI cable? i've made the connection but no options show in system prefs display.

    How can i use my smart TV as a second monitor for my Power mac (2010) via HDMI cable? i've made the connection but no options show in system prefs display.
    the computer:Mac Pro, Mac OS X (10.9.5), 2 x 2.66 Ghz 6-Core intel Xeon
    the TV: LG Smart tv

    The Mac uses a highly-parameterized universal Driver for every display. The parameters are set at certain times when a query is sent to your display. The display MUST answer with its name and capabilities, or the screen stays dark. A TV set that is off or "not paying attention" because it is set to a different port when the query occurs will rarely answer, and so will often remain dark.
    You can use tools in the System Report to see whether your display has been detected at all. If it has, the report will look something like this, but its name will appear:
    The times when the query is sent are:
    • at Startup
    • at wake from sleep
    • when the Mac-end of the cable is inserted
    • when using the Option ( Detect Displays ) button in displays preferences

  • I have an Apple MacBook Pro with 2 USB ports and a MiniDisplay Port. I also have an HDTV with a HDMI port. How can I use the TV as a display without any tethering wires between my computer and the TV?

    I have an Apple MacBook Pro with 2 USB ports and a MiniDisplay Port. I also have an HDTV with a HDMI port. How can I use the TV as a display without any tethering wires between my computer and the TV? I have a MiniDisplay Port to VGA adapter, but there are two issues with it: The new display doesn't have a VGA port, and even if it did, I wouldn't want to have my mac constantly attached to the display by a cable. I was looking for a way to use the TV as a display without any wires. Is there some type of bluetooth setup I could use? Please let me know if you have any suggestions.

    As I wrote above, I think you should look into the Apple TV yourself. The best place to find information about what it can and can't do and to ask your own specific questions is probably in the Apple TV forum, here:
    https://discussions.apple.com/community/appletv/appletv

  • HT5219 How can i get the Apple Thunderolt display to show Windows 7 i run on my system using Paralells desktop..

    How can i get the Apple Thunderolt display to show Windows 7 i run on my system using Paralells desktop..

    You may need to set the slider at the upper-right corner of the Control window to something other than the extreme left-most position:
    Hope this helps.

  • How can i use dual 23" apple cinema hd display on a new mac mini

    i have the old apple displays and really dont want to let go of them yet. Model # M8537ZM/A.
    I currently have them both hooked up to my G5 powerPC, thru the DVI to ADC adapter. Model # M8661LL/B
    Im tired of not being able to update my plug ins and some sites have become unable to even view without being up to date.
    So im looking to buy a new Mac, but i will NOT spend another $2000+ for apple to call it outdated in a few years.
    The Mac Mini looks to be a good buy only if i can it up to be on my DUAL 23" Apple Cinema Displays, Model # M8537ZM/A.
    Please let me know what i would need to buy to make this all work, or if it not possable.
    Thanks in advance.

    Wow, I loved those monitors. Ten years ago. If they're still working for you, terrific; they are quite nice. Unfortunately, the ADC cable is going to make using them with modern Macs a bit of a Rube Goldberg experience.
    The late-2012 Mini has a Thunderbolt port and an HDMI port. Both can be used to drive those displays.
    Thunderbolt Port
    1- Buy a Thunderbolt/Mini DisplayPort to DVI adapter.
    http://store.apple.com/us/product/MB570Z/B/mini-displayport-to-dvi-adapter
    2- Now buy a DVI to ADC adapter. Not cheap, and Apple doesn't carry them anymore, but they can be found.
    http://www.amazon.com/Apple-DVI-to-ADC-Adapter/dp/B0000E2O14
    HDMI Port
    1- Buy an HDMI to DVI Adapter. One of these comes in the box with every Mini, so I won't link it.
    2- Now buy a DVI to ADC adapter. Not cheap, and Apple doesn't carry them anymore, but they can be found.
    http://www.amazon.com/Apple-DVI-to-ADC-Adapter/dp/B0000E2O14
    Note that each DVI to ADC adapter will need access to AC power to provide power to each monitor. You already know this if you have these adapters.
    Just something to think about: There are some people still running old Macs with ADC output who are desperate to find good-condition, larger-size ADC monitors. You might be able to sell yours on eBay or through some other means for more than enough to finance your purchase of new, higher-resolution HDMI or DVI monitors and avoid all the adapters and extra electrical taps.

  • How Do I Use DVD Studio Pro Files In iDVD?

    I had somebody create a DVD for me using DVD Studio Pro. (This was a compilation of many different videos.) It turned out great.
    I now want to make a DVD of one of those videos on my own using iDVD '08.
    I have the raw video/audio files. But, my problem is the raw files that were used for the DVD Studio Pro project are separated into one video file and one audio file. I don't know how I can get them both into iDVD. I was told that I have to recombine these two files into one file. But, how do I do this and still maintain the best quality?
    (I am not a video expert by any means, but I can tell you that the video file is a ".mpeg" and the audio file is an ".ac3". When looking at the .mpeg file in the finder it lists its Kind as "MPEG Movie" and when looking at the .ac3 file in the finder it lists its Kind as "Unix Executable File".)
    (I'm using iDVD 7.0.1 - I do have Quicktime Pro - I do not have the Quicktime MPEG-2 Playback component - I do not have DVD Studio Pro)
    Thanks in advance for your help!

    Q: How Do I Use DVD Studio Pro Files In iDVD?
    A: You don't, essentially.
    DVDSP is apple's top end app and it is intended to be used with FCP > Compressor > DVDSP. All of these are pro apps.
    i-Apps are consumer apps all of which are QT based. With that in mind ....
    now that doesn't mean you can't use FCP > iDvd. You can. But you have to do it in a way that iDvd will read all the files (meaning you must think in terms of QuickTime and export in this way). So when you export your QT File / Movie from FCP over to iDvd, it will look something like this hopefully regardless of the raw image & audio files you have already compiled which unfortunately will NOT work with i-Apps BUT will work with apple's pro apps which is the intended workflow / direction of said files in the first place.
    Btw ... if your QT movie has chapter markers then please use the following settings so iDvd can read these markers. (if on the other hand you were looking to export this file to DVDSP; then you would choose DVDSP Markers.
    Let me know if the above helps. If not, just come on back.

Maybe you are looking for