Output to the clipboard

Hi all
I am trying (and failing) to get a script/applet to send the filename of a file dropped on it to the clipboard. I get no syntax errors but when I try it it claims it can't get the file name and then proceeds to give me the entire path to the file in the error message.
on open (theItem)
tell application "Finder"
activate
copy the filename of theItem to the clipboard
end tell
end open
this gives "Can't get filename of {alias "Raptor150:Users:ME:Desktop:file"}
I admit I have all these ideas I think I can do with applescript/Automator and they all get SO close to working and then bam brick wall because I don't know enough to finish them. So please be easy on me

Hi Damien,
You need to learn how to read dictionaries. Here you can use the Finder dictionary and use the 'name' property.
on open (theItem)
-- theItem is a list of references to the dropped items
-- to get a reference to the first item
set itemReference to item 1 of theItem
tell application "Finder"
activate
-- get the item's name from its reference
set itemName to name of itemReference
set the clipboard to itemName
end tell
end open
gl,

Similar Messages

  • How to copy the linux command output to the clipboard xclip is not working?

    Friends,
    OS: OEL 5.5
    i want to copy the command output to the clipboard.
    so, which rpm i have to install?
    i tried with xclip rpm its not working...
    xclip /etc/sysctl.conf
    but its not working, not only the above command but all the commands of xclip is not working.
    so, can anybody suggest me a solution?
    thanks

    i have already tried that...
    below is thru the secureCRT terminal
    [root@rac1 /]# cat /etc/sysctl.conf | xclip
    Error: Can't open display: (null)below is directly from the os
    [root@rac1 ~]# vi tet
    [root@rac1 ~]# tail -100 /var/log/messages | xclip
    [root@rac1 ~]# vi test
    [root@rac1 ~]# cat /etc/sysctl.conf | xclip
    [root@rac1 ~]# vi test
    [root@rac1 ~]# echo 'hello' | xclip
    [root@rac1 ~]# vi testEdited by: OraDB on Aug 19, 2012 10:33 AM

  • How do I load a picture from the clipboard (either Windows clipboard or Labview clipboard) into image data that can then be processed in Labview?

    I want to load a picture from the Windows clipboard (and if not possible, then from the Labview clipboard) into actual numerical image data so that it can be processed in lab view. When I'm at the main screen where I can add controls, I see a section of controls called "Vision" in the tool bar where all the different controls can can be added from. When I go to the control called "Image" and put that on my form, and then look at the flowchart/blockdiagram programing window to see what inputs and outputs it has, I only see one output, and no inputs. And when I right click on it, I see NO way to load an image into the Image control. PLEASE help me.
    Message Edited by Ben321 on 11-09-2008 04:32 PM

    Hi Ben,
    National Instruments has an image processing software called Vision and although I am not completely sure, I think the controls that you found in the control pallet are used in conjunction with the software. Depending on what kind of image processing you want to conduct in LabVIEW, you might want to consider purchasing that product.
    If cost is an issue, there are functions in LabVIEW which allows you to take in image files and process them. However, please keep in mind that the capabilities are limited.
    Images should be loaded onto LabVIEW not via the clipboard but through loading it from folders or directories. (There might be a way to and so if you find a way please let me know! I would like to know myself =D) If you open the function pallet by right clicking on the block diagram, in the programming folder you should find a directory called "Graphic and Sound". There, you'll find functions in which allows you to process images.
     In the "Graphic Type" directory there should be a function called Read JPEG file.vi. There are also others which allows you to read png and bmp files. Please note that there are functions which write as well. Set a file path on the block diagram and inside the "Grahic and Sound" there is a "Picture Function" directory and inside there, there should be a function called "Draw Flattened Pixmap.vi" That changes the image into a format where you can process on LabVIEW. Inside the "Picture Function" directory there are several functions which allows you to process the specified image. Play around with it and see how it goes. And don't forget to Write the file in the end to save any changes.
    I hope this helps
    National Instruments Japan
    Applications Engineer Taiki Hoshi

  • Can JButtons within applets copy to the clipboard?

    camickr wrote in another thread:
    As always I would like to see the Applet used that caused the problem. We should not have to create our own applet to test this. As we all know from the original problem you may be missing/adding code. And this posting is way off topic so any new SSCCE along with a new question should be posted in a new posting. If I understand the problem is that Ctrl+C works on a text area, but it doesn't work for a JButton that tries to copy text from the same text area?Not quite. Ctrl+C works within a JTable, copying selected row(s) to the clipboard. The problem is getting a JButton to copy arbitrary text to the clipboard, having nothing to do with a JTable.
    Well post the simple 20 line applet that demonstates this.Sorry, it's more than 20 lines. I included three approaches, Jeanette's, Walter's, and mine.
    * Created on 06.12.2010
    * Jeanette, Walter, and Rich
    import java.awt.EventQueue;
    import java.awt.datatransfer.*;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import java.awt.Toolkit;
    import javax.swing.*;
    public class ThreeCopyButtons  extends JApplet  implements ClipboardOwner
        final JLabel first  = new JLabel("Larry");
        final JLabel second = new JLabel("Moe");
        final JLabel third  = new JLabel("Curly");
        static ThreeCopyButtons cb3;
        public JPanel getContent() {
            JButton kleo = new JButton("Kleo");
         cb3 = this;
            TransferHandler handler = new TransferHandler() {
                 * @inherited <p>
                @Override
                protected Transferable createTransferable(JComponent c) {
                    return new StringSelection(cb3.toString());
                 * @inherited <p>
                @Override
                public int getSourceActions(JComponent c) {
                    return COPY;
            kleo.setTransferHandler(handler);
            kleo.setAction(TransferHandler.getCopyAction());
            kleo.setText("Kleo");  // gets overridden by "copy"
         AppletCopyButton walt = new AppletCopyButton("Walt", toString());
         JButton rich = new JButton("Rich");
         rich.addActionListener( new ActionListener() {
             public void actionPerformed(ActionEvent e) {
              StringSelection ss = new StringSelection(cb3.toString());
              Clipboard cb = Toolkit.getDefaultToolkit().getSystemClipboard();
              cb.setContents(ss, cb3);
            JComponent buttons = new JPanel();
            buttons.add(kleo);
            buttons.add(walt);
            buttons.add(rich);
            JPanel labels = new JPanel();
            labels.add(first);
            labels.add(second);
            labels.add(third);
            JPanel box = new JPanel();
            box.setLayout(new BoxLayout(box, BoxLayout.Y_AXIS));
         box.add(buttons);
         box.add(labels);
            return box;
        public String toString() {
         String s = first.getText() + "\t" +
                 second.getText() + "\t" +
                 third.getText();
         return(s);
        // Empty method needed for implementation of the ClipboardOwner interface.
        public void lostOwnership( Clipboard aClipboard, Transferable aContents) {
          //do nothing
        // method expected by applets
        public void init()
        { // the static block above should have already executed
         try {
             javax.swing.SwingUtilities.invokeAndWait(new Runnable() {
              public void run() {
                  JPanel frame = getContent();
                  setContentPane(frame);
         } catch (Exception e) {
             System.err.println("makeContent() failed to complete: " + e);
             e.printStackTrace();
        public static void main(String[] args) {
            EventQueue.invokeLater(new Runnable() {
                public void run() {
                    JFrame frame = new JFrame("Test");
                    frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
                    frame.add(new ThreeCopyButtons().getContent());
                    frame.pack();
                    frame.setLocationRelativeTo(null);
                    frame.setVisible(true);
    // Walter Laan
    class AppletCopyButton extends JButton {
        public AppletCopyButton(String label, String text) {
            super(label);
         final String clip = text;
            setTransferHandler(new TransferHandler() {
                // @Override
                protected Transferable createTransferable(JComponent c) {
                    return new StringSelection(clip);
                // @Override
                public int getSourceActions(JComponent c) {
                    return COPY;
            addActionListener(new ActionListener() {
                // @Override
                public void actionPerformed(ActionEvent e) {
                    Action copy = TransferHandler.getCopyAction();
                    copy.actionPerformed(new ActionEvent(AppletCopyButton.this,
                            ActionEvent.ACTION_PERFORMED, "copy"));
    }Here is a manifest file I call "3cbManifest.txt".
    Main-Class: ThreeCopyButtonsMake sure you preserve the trailing carriage return.
    ]javac ThreeCopyButtons.java
    ]jar cvfm ThreeCopyButtons.jar 3cbManifest.txt *.class
    ]java -jar ThreeCopyButtons.jar
    (The latter command simply tests, but it is running as program, not applet.)
    And here is a short HTML file to run it as an applet. I call it "3cb.html".
    <html>
    <head><title>TestApplet</title></head>
    <body>
    <applet code="ThreeCopyButtons.class"
            archive="ThreeCopyButtons.jar"
            width="450" height="300">
    Your browser is completely ignoring the <i>applet</i> tag!
    </applet>
    </body>
    </html>The three buttons match our three approaches:
    * Kleo -- Jeanette's approach
    * Walt -- Walt's approach
    * Rich -- my approach
    All three methods work fine as a program, whether running directly as classes or from the .jar. None however work as an applet, from the HTML page.
    To test either as applet or program:
    1) open a text editor
    2) type something short
    3) Ctrl+C copy what you typed
    4) click the Kleo button
    5) in editor, click <enter> and Ctrl+V to paste
    6) observe whether you see the text from step 3 or "Larry Moe Curly", with <tabs> between words.
    7) repeat steps 3-6 for the Walt and Rich buttons
    If you can figure out how to get the applet to bypass its security wall, great. We've found a bug in Java's applet security. If not, I am resigned to having the button in my actual app copy info to the table instead of to the clipboard.

    RichF wrote:
    You are right, but aw gee whiz. Have you ever written something that you think is pretty neat, then have to throw it away? hahahahahaha ... sure, happens nearly every day :-)
    My class QEPanel, which handles each row of the statistics, is like that.yeah, have seen it: pretty nasty mixing of view and data <g>
    Hmm, I wouldn't actually have to throw most of it away. :) correct ...
    The JLabel <b>label</b>s would become the table column labels, and the other JLabels would become integers specifying column. except that I don't completely understand what you are after here (ehem: get your vocabulary right, sir) a clean separation would map the data-part of a QEPanel into a QEBean, with properties title (was: label), percentRed ... etc. Something like:
    public class QEBean extends AbstractBean {
        private float sumRed, sumGrn, sumBlu;
        private float minDist = 9999999;
        private float maxDist = 0;
        private double sumDist;
        private int count;
        private int entries;
        private CountPerEntries countPerEntries;
        private String title;
        public QEBean(String title) {
            this.title = title;
        public void reset() {
            // do reset
            firePropertyChange(null, null, null);
        public void updateData(Color quantized, Color actual) {
            // do update internals
            firePropertyChange(null, null, null);
    //------------ getters...
        public String getTitle() {
            return title;
        public float getPercentRed() {
            if (count == 0)
                return 0f;
            return sumRed / count;
        // more getters
    }Then implement a specialized TableModel which knows about QEBean
    public class QEBeanTableModel extends AbstractTableModel {
        List<QEBean> errors = new ArrayList<QEBean>();
        private PropertyChangeListener errorChangeListener;
        @Override
        public int getColumnCount() {
            return 7;
        @Override
        public int getRowCount() {
            return errors.size();
        @Override
        public Class<?> getColumnClass(int columnIndex) {
            switch (columnIndex) {
                   // implement as appropriate
            return Object.class;
        @Override
        public Object getValueAt(int rowIndex, int columnIndex) {
            QEBean error = errors.get(rowIndex);
            switch (columnIndex) {
            case 0:
                return error.getTitle();
            case 1:
                return error.getPercentRed();
              // more as appropriate
            return null;
        public void addError(QEBean error) {
            int oldSize = getRowCount();
            error.addPropertyChangeListener(getPropertyChangeListener());
            errors.add(error);
            fireTableRowsInserted(oldSize, oldSize);
        public QEBean getError(int row) {
            return errors.get(row);
        private PropertyChangeListener getPropertyChangeListener() {
            if (errorChangeListener == null) {
                errorChangeListener = new PropertyChangeListener() {
                    @Override
                    public void propertyChange(PropertyChangeEvent evt) {
                        int row = errors.indexOf(evt.getSource());
                        fireTableRowsUpdated(row, row);
            return errorChangeListener;
        public void resetAll() {
            for (QEBean error : errors) {
                error.reset();
    }Then use the model in HelpBox:
    // init model and keep in field
         qErrors = new QEBeanTableModel();
         qErrors.addError(new QEBean("Hex QE"));
         qErrors.addError(new QEBean("Name QE"));
         qErrors.addError(new QEBean("Mismatch QE"));
         qErrors.addError(new QEBean("SearchAccuracy"));
            // can't resist - JXTable would make customization so much easier :-)
         // JXTable errorTable = new JXTable(qErrors);
         JTable errorTable = new JTable(qErrors);
         errorTable.setBackground(Color.BLACK);
         errorTable.setSelectionBackground(Color.BLACK);
         errorTable.setForeground(Color.WHITE);
         errorTable.setSelectionForeground(Color.WHITE);
         errorTable.setGridColor(Color.BLACK);
            // install renderers which produce an output similar to the labels
           panel.add(errorTable)
    // in the update methods - update the QEBeans stored in the model
        public void updateQE(int which, String q, String a)
         Color     quantized = Color.black;
         Color     actual = Color.black;
         int     rgb[] = { 0, 0, 0 };
         NTC.getRGB(q, rgb);
         quantized = new Color(rgb[0], rgb[1], rgb[2]);
         NTC.getRGB(a, rgb);
         actual = new Color(rgb[0], rgb[1], rgb[2]);
         qErrors.getError(which -1).updateData(quantized, actual);
    // similar in reset, updateEntriesThat's all and will give you an output very similar to the rows of individual labels, only more symetric.
    The toString() method would go away because row toString() is already built into JTable.ehhh? No, not that I know of :-) The default renderer uses the toString of the cell value, the row is not involved.
    >
    Then you can implement the button's action to copy that error table's content to the clipboard. Better usability ensured, IMO.I'll just throw away the darn button. The colorTable doesn't have one, so why should the statisticsTable? sure, that's an option - the visual setup outlined above is for hiding the table-nature, if you want it expose, just do - no problem.
    Cheers
    Jeanette

  • Low-quality copy (to the clipboard) in Keynote and Pages

    Hello,
    I am running Keynote 6.5 under OS 10.10 on MacBook Air. Just after updating to Yosemite I have noticed that if I copy (command-c) something from Keynote (say, some text, or a graphic) and try to paste it outside (in Preview, or in Word) I get a low-quality image (bitmap rather than vector). It was not like this before. Also, I have verified that this problem is limited to Keynote and Pages; i.e., copying something out of (e.g.) Powerpoint works perfectly (vector image).
    Anyone can help?

    I can confirm this is also a problem with Numbers. Anything copied out of the iWork apps appear to lose the ability to be pasted as a .PDF, even in applications that can accept the higher quality .PDF format. (In looking into it, there's additional weirdness I'm seeing related to iWork and the clipboard, but that's for elsewhere).
    At this time, the only possible thing you can do to get high quality output from Keynote is to Export as a PDF, then open that and crop it.
    Just to help a bit more, when you check Preview for how to crop a PDF, the help is incorrect. The command you're looking for is not
    Choose View > Show Edit Toolbar,
    it's
    Choose View > Show Markup Toolbar
    However, I haven't tried to see if you can get PDF's without backgrounds... checking now
    I've also confirmed that Keynote '09 can still produce .PDF's from copied content. And, I am using a MacBook Pro.

  • Is it possible to copy text to the clipboard in Illustrator via Javascript ?

    I am working on a very basic script that exports coordinates from Illustrator.
    At the moment I am just outputing the values via $.writeln()
    I was wondering if I could copy the output values to the clipboard. If so, what
    am I looking for in the API ?
    Thanks,
    George

    For an actionscript project I will need to animate a few hundred objects to certain destinations. These destinations are given by a designer who works on the look and feel of things in Illustrator.
    I would like to make it as simple as possible for the designer to adjust things visually in Illustrator, then he can get a snippet to test in Flash as well.
    Thank you very much for the applescript idea!
    I'll use something like:
    app.system("osascript -e 'set the clipboard to \"" + code + "\"'");

  • How to transfer data using the clipboard

    Does anyone know how to transfer data (string) from the clipboard to labview?
    I am trying to write C++ code using win32 API using the calls, OpenClipboard, Getclipboard and CloseClipboard functions. The problem is LV crashes when there is a call to the library function. Perhaps I am going about this the wrong way.
    Any ideas are appreciated.

    Perhaps this approach will give you the answer. I wrote a VI that uses the Win32 API directly. It calls OpenClipboard with the calling VI's window handle, then calls GetClipboard with the GW_TEXT constant to get a memory block handle. I lock the memory block with GlobalLock so other applications can't mess with it. I next call lstrcopynA , initializing a arg1 as a C String with 256 bytes and using the memory block handle as arg2, with the length of arg1 minus one as arg3. Your clipboard text is in the string output. Now call GlobalUnlock and CloseClipboard and you're done!
    Attachments:
    getclipboarddata.llb ‏168 KB

  • Error when i try to paste to textinput when the clipboard is null

    Hi,
    I get below error when I try to paste to a textinput when the clipboard doesn't have any value,
    TypeError: Error #1009: Cannot access a property or method of a null object reference.
        at spark.components::RichEditableText/handlePasteOperation()[E:\dev\4.0.0\frameworks\projects\spark\src\spark\components\RichEditableText.as:3611]
        at spark.components::RichEditableText/textContainerManager_flowOperationEndHandler()[E:\dev\4.0.0\frameworks\projects\spark\src\spark\components\RichEditableText.as:4253]
        at flash.events::EventDispatcher/dispatchEventFunction()
        at flash.events::EventDispatcher/dispatchEvent()
        at flashx.textLayout.container::TextContainerManager/dispatchEvent()[C:\Vellum\branches\v1\1.0\dev\output\openSource\textLayout\src\flashx\textLayout\container\TextContainerManager.as:1470]
        at flash.events::EventDispatcher/dispatchEventFunction()
        at flash.events::EventDispatcher/dispatchEvent()
        at flashx.textLayout.elements::TextFlow/dispatchEvent()[C:\Vellum\branches\v1\1.0\dev\output\openSource\textLayout\src\flashx\textLayout\elements\TextFlow.as:773]
        at flashx.textLayout.edit::EditManager/doInternal()[C:\Vellum\branches\v1\1.0\dev\output\openSource\textLayout\src\flashx\textLayout\edit\EditManager.as:612]
        at flashx.textLayout.edit::EditManager/doOperation()[C:\Vellum\branches\v1\1.0\dev\output\openSource\textLayout\src\flashx\textLayout\edit\EditManager.as:462]
        at flashx.textLayout.edit::EditManager/pasteTextScrap()[C:\Vellum\branches\v1\1.0\dev\output\openSource\textLayout\src\flashx\textLayout\edit\EditManager.as:1376]
        at flashx.textLayout.edit::EditManager/editHandler()[C:\Vellum\branches\v1\1.0\dev\output\openSource\textLayout\src\flashx\textLayout\edit\EditManager.as:213]
        at flashx.textLayout.container::ContainerController/editHandler()[C:\Vellum\branches\v1\1.0\dev\output\openSource\textLayout\src\flashx\textLayout\container\ContainerController.as:2374]
        at flashx.textLayout.container::TextContainerManager/editHandler()[C:\Vellum\branches\v1\1.0\dev\output\openSource\textLayout\src\flashx\textLayout\container\TextContainerManager.as:1746]
    Is there any solution for this?
    Amila Domingo

    Use FlexLib PromptingTextInput.  It doesnt have that problem.
    http://flexlib.googlecode.com/svn/trunk/docs/flexlib/controls/PromptingTextInput.html
    This will work how you want it to.
    See   http://code.google.com/p/flexlib/wiki/ComponentList
    PromptingTextInput
    The PromptingTextInput component is a small enhancement to standard TextInput. It adds the ability to specify a prompt value that displays when the text is empty, similar to how the prompt property of the ComboBox behaves when there is no selected value.
    Documentation | Example | Contributor: Darron Schall

  • Hack the OS to completely remove non-txt information from the Clipboard ?

    Hi,
    I wonder if I can hack the OS somehow to completely disable text formats in the Clipboard. I don't need this feature at all; on the contrary. It's annoying to remove this superfluous information from text clips that I copy from Web pages, RTF / Word documents etc. and adjust the clips to the format in my e-mails, RTF files...
    Someone gave me a Script to do this manually every time I need it, but I don't want RTF data in my Clipboard at all. The only output from copy/pasting ist TEXT.
    Thanks a lot!

    ⌥⇧⌘V ?
    Wow. Can /you/ handle this shortcut?
    I play guitar, but this is by far worse.
    Thanks though!

  • How to copy a picture to the clipboard.

    Hallo,
    I'm writing a program that allows the user to take data measurements and display them in a window. The output of this window is easy to put on the clipboard for the user to select the image and rigth-click and select "copy data".
    For scaling reasons however I want to let the user be able to put the picture in a larger/smaller size on the clipboard and preverbly without the mouse button functions since allowing pop-up items allows the user to change all kind of data on the front panel (for instance: emptying an array).
    In short: Is it possible to put a picture programatically on the clipboard without even displaying this picture on the front panel, just like saving a picture to a file.
    Thanx
    in advance for answers,
    Marcel kalf.

    Marcel Kalf wrote:
    > Hallo,
    >
    > I'm writing a program that allows the user to take data measurements
    > and display them in a window. The output of this window is easy to put
    > on the clipboard for the user to select the image and rigth-click and
    > select "copy data".
    >
    > For scaling reasons however I want to let the user be able to put the
    > picture in a larger/smaller size on the clipboard and preverbly
    > without the mouse button functions since allowing pop-up items allows
    > the user to change all kind of data on the front panel (for instance:
    > emptying an array).
    >
    > In short: Is it possible to put a picture programatically on the
    > clipboard without even displaying this picture on the front panel,
    > just like saving a picture to a file.
    >
    > Thanx in advance for answ
    ers,
    >
    > Marcel kalf.
    Download "CopytoClipboard" at:
    http://george-zou.sinacity.com/gtool51.htm
    It can capture a rectangular area on the screen, and save it as
    a bitmap onto clipboard.

  • How do I set upmy Imac to allow using both my computer speakers and a Bose SoundLink system as outputs at the same time.  I can use one or the other, but not both.

    how do I set up my Imac to allow using both my computer speakers and a Bose SoundLink system as outputs at the same time.  I can use one or the other, but not both.  From systems Preferences I must select one or the other.  I want both to work all the time.

    Hi,
    I would recommend you to use 0FI_AP_4 rather using both, particularly for many reasons -
    1. DS: 0FI_AP_4  replaces DataSource 0FI_AP_3 and still uses the same extraction structure. For more details refer to the OSS note 410797.
    2. You can run the 0FI_AP_4 independent of any other FI datasources like 0FI_AR_4 and 0FI_GL_4 or even 0FI_GL_14. For more details refer to the OSS note: 551044.
    3. Map the 0FI_AP_4 to DSO: 0FIAP_O03 (or create a Z one as per your requirement).
    4. Load the same to a InfoCube (0FIAP_C03).
    Hope this helps.
    Thanks.
    Nazeer

  • Copying text to the clipboard in AVDocDidOpen event handler causes Acrobat 9 to crash

    I'm trying to copy the filename of a document to the clipboard in a plugin with my AVDocDidOpen event handler.  It works for the first file opened; however when a second file is opened, Acrobat crashes.  The description in the application event log is: "Faulting application acrobat.exe, version 9.1.0.163, faulting module gdi32.dll, version 5.1.2600.5698, fault address 0x000074cc."
    I've confirmed that the specific WIN32 function that causes this to happen is SetClipboardData(CF_TEXT, hText);  When that line is commented out and remaining code is left unchanged, Adobe doesn't crash.
    Is there an SDK function that I should be using instead of WIN32's SetClipboardData()?  Alternately, are there other SDK functions that I need to call be before or after I call SetClipboardData()
    Bill Erickson

    Leonard,
    I tried it with both "DURING, HANDLER, END_HANDLER" and "try catch," as shown below.  However, it doesn't crash in the event handler; it crashes later, so the HANDLER/catch block is never hit.
    The string that's passed to SetClipboardData() is good, because I'm able to paste it into the filename text box of the print dialog when I try to create the "connector line" PDF.  I also got rid of all the string manipulation and tried to pass a zero-length string to the clipboard but it still crashes.
    Here's the code:
    ACCB1 void ACCB2 CFkDisposition::myAVDocDidOpenCallback(AVDoc doc, Int32 error, void *clientData)
        PDDoc pdDoc = AVDocGetPDDoc(doc);
        char* pURL = ASFileGetURL(PDDocGetFile(annotDataRec->thePDDoc));
        if (pURL)    {
            if (strstr(pURL, "file://") && strstr(pURL, "Reviewed.pdf")) {
                // Opened from file system so copy filename to clipboard for connector line report
                char myURL[1000];
                strcpy(myURL, pURL);
                ASfree(pURL);    // Do this before we allocate a Windows handle just in case Windows messes with this pointer
                pURL = NULL;
                HGLOBAL hText = GlobalAlloc(GMEM_MOVEABLE, 1000);
                if (hText)    {
                    try
                        // Skip path info and go right to filename
                        char *pText = (char *)GlobalLock(hText);
                        char *pWork = strrchr(myURL,'/');
                        if (pWork)    {
                            strcpy(pText, pWork+1);
                        } else {
                            strcpy(pText, myURL);
                        char *pEnd = pText + strlen(pText);    // Get null terminator address
                        // Replace "%20" in filename with " "
                        pWork = strstr(pText, "%20");
                        while (pWork)    {
                            *pWork = ' ';
                            memmove(pWork+1, pWork+3, (pEnd - (pWork+2)));
                            pWork = strstr(pText, "%20");
                        // Append a new file extension
                        pWork = strstr(pText, ".pdf");
                        *pWork = 0;    // truncate the string before ".pdf"
                        strcat(pWork,".Connectors.pdf");
                        GlobalUnlock(hText);     // Must do this BEFORE SetClipboardData()
                        // Write it to the clipboard
                        OpenClipboard(NULL);
                        EmptyClipboard();
                        SetClipboardData(CF_TEXT, hText);     // Here's the culprit
                        CloseClipboard();
                        GlobalFree(hText);
                    } catch (char * str) {
                        AVAlertNote(str);
            if (pURL)
                ASfree(pURL);

  • My Fall 2009 system DVI output to our HDTV doesn't include audio.  Connecting the Macbook headphone output to the TV's RCA plugs works if TV is in AV (PC) mode, but no picture.  DVI to HDMI adapter to TV works fine for picture, but no audio.

    My Fall 2009 model Macbook Pro DVI output apparently doesn't include audion.  Adapting DVI to HDMI works with new LG TV, but doesn't provide sound.  Connecting the Macbook headphone output to the TV's RCA jacks give sound with the TV in AV (PC) mode, but no video.  Is there a fix for this?  Search for a DVI to HDMI adapter that includes a plug for the headphone jack comes up empty, so far.

    DVI has never included audio, sorry.
    There is also no DVI->HDMI adapter including a plug for audio; such thing cannot work without quite a bit of electronic extra effort.
    Instead of much bla-bla, why don't you tell the exact TV model, and we'll try to come up with a solution?
    BTW, no home theater AV receiver present, correct? Sound to come from the TV, correct?

  • I am trying to take a picture of a web page and paste on a one drive powerpoint. I tryed pressing the print screen button, and pasting. But it is giving me message saying that my browser can not fine the clipboard, and I need to use the keyboard shortcuts

    I need to take a picture of a web page, insert it onto a powerpoint online, and crop the picture. I am pressing the print screen button, and right cliking paste. But I am getting the warning message saying that my browser can not use the clipboard, and I am unsure of how to take a picture, then paste it, and crop it all on to a power point.

    http://portableapps.com/apps/internet/firefox_portable/localization#legacy36

  • How do I enable the clipboard options on my MacBook Pro?

    I need to post information into a discussion thread for class. I copied the information from Pages and I tried to paste the information in the compose section of the discussion board. Every time I try this an error message pops up on my screen...
    Copy, Cut, Paste is disabled in your Mozilla browser. You can use keyboard shortcuts instead or visit http://www.mozilla.org/editor/midasdemo/securityprefs.html for more information on how to grant access to the clipboard. However, when I proceed to this website there isn't anything that's helpful to me. Help!!!!

    ''Samarion22 wrote:''
    You can use keyboard shortcuts instead
    You can press '''Command + V''' on your keyboard to paste.
    * [[Keyboard shortcuts - Perform common Firefox tasks quickly]]
    ''Samarion22 wrote:''
    visit http://www.mozilla.org/editor/midasdemo/securityprefs.html
    If you absolutely need to grant websites access to your clipboard, you can try the following extension.
    * https://addons.mozilla.org/firefox/addon/allowclipboard-helper/

Maybe you are looking for

  • Some fonts aren't working in Pages

    I type in characters, then select them, then try to change the font, either in the Fonts window, or in the font chooser above the text area in the Pages document window, certain fonts aren't available. I have the full families for two Adobe fonts for

  • How to forward my router

    I have a lacie NAS disk connected at a airport extreme. The problem is that i can't connect from a guest computer. The advise is to portforward the airport extreme. I need to forward port 80 from extern ip adress to intern ip adress. My router is the

  • Soundblaster Wireless Music - receiver is connected but no so

    I have a SB Wireless music receiver (purchased in March '05). It was working just fine for 3 months, then nothing. After several attempts reistalling, rebooting, etc (including several emails back and forth with Creative Americas Cusotmer Support, it

  • Posting Links in Messages

    I'm a photograper and I'm always posting web links to people to see their pictures; often they reply that the link doesn't work. I've found out that many of the links are being cut off in their email software because the URLs are so long. Is there a

  • Batch processing images of various sizes

    I'm trying to create 125 pixel square thumbnail images using a batch process and I'm having trouble getting it to work consistently with images that have different aspect ratios. I think I know why it's working the way it is, but I don't know how to