Clipboard contents detection problem

My Goal is to detect what myself or someone has copied to the clipboard, using CTRL+C, or the right click and using the context menu.
I know my AIR Application isn't always in focus, since other things are going on in the desktop (switching from browser to browser, editing photos in Fireworks, etc.....) 
But I do tend to copy text to the clipboard often.  And I really want to detect when I do, even if my AIR App is minimized or Headless.
So, I created the following code that simply uses the Javascript setInterval() method, set at 1 second.  And it basically runs another function that is supposed to get the clipboard details.
It's not working.   Can someone see if I'm doing it wrong, or if it even can be done?
<div id="infoDiv"></div>
<script>
function everysecond() {
          setInterval("checkClipBoard()",1000);
function checkClipBoard(){
          if(air.Clipboard.generalClipboard.hasFormat("text/plain")){
                    var text = air.Clipboard.generalClipboard.getData("text/plain");
          }else{
                    var text = "nothing in clipboard";
          $("#infoDiv").html(text);
everysecond();
</script>
Thank you!

Works fine here: Ctrl-C in Excel, Ctrl-V in Forms ... and voila there it is.
I would assume, that your problem is related to Java:
applet rules, security rules, ......
(I remember that we had similiar problems until we signed frmall.jar with a company certificate, as well as that years ago java applets weren't ready for cut+paste at all).
Do you get any messages in your java console when trying to paste text into a form?
yours
Volker

Similar Messages

  • Adobe Content Viewer problem. Please Help me...

    Hi after updating online. Folio, I tried to update the trial version of the publication on my iPad but I get this message: "the issue isavailable for dowload, but new signing for an application version. Update the application from the App Store. "I went to the AppStore and was not any update of the Content Viewer ... I deleted the version on my iPad I downloaded again ... but without success gives me the same problem ... Please help me ... how can I do??
    thanks

    Hello Bob and thank you for responding so quickly ... Would you be kind enough to send me the link where I can download older versions of Folio Builder and Folio Producers Panel tools for InDesign 5.5. I'm looking for them but I can not find them.
    Thank you for your patience.
    Il giorno 21/gen/2012, alle ore 16:18, Bob Levine ha scritto:
    Re: Adobe Content Viewer problem. Please Help me...
    created by Bob Levine in Digital Publishing Suite - View the full discussion
    As discussed in numerous threads already, the new viewer has not been approved by Apple yet.
    If you’re a pro or enterprise customer you can create your own viewer app. If not, you’ll have to wait or roll back to the older tools.
    Bob
    Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page: http://forums.adobe.com/message/4155907#4155907
    To unsubscribe from this thread, please visit the message page at http://forums.adobe.com/message/4155907#4155907. In the Actions box on the right, click the Stop Email Notifications link.
    Start a new discussion in Digital Publishing Suite by email or at Adobe Forums
    For more information about maintaining your forum email notifications please go to http://forums.adobe.com/message/2936746#2936746.

  • How to create, place, format and paste the clipboard contents into a text frame

    I am new to scripting and need help. I have an existing Indesign document. I need to be able to create a text frame on my current page, the width of my margins with the top of the text frame at the top margin and 1" in height, then format it to be 1-column, and then paste the clipboard contents into it and tag the text with a particular paragraph style. I am using Indesign CS4 on a mac, if that makes any difference. Thanks for any help.

    May this will help you. It will create an anchored object with a text what you desired, with object style. You should create an object style before with the x and y co ordinates. You can choose either para style or character style.
    var the_document = app.documents.item(0);
    // Create a list of paragraph styles
    var list_of_paragraph_styles = the_document.paragraphStyles.everyItem().name;
    // Create a list of character styles
    var list_of_character_styles = the_document.characterStyles.everyItem().name;
    // Create a list of object styles
    var list_of_object_styles = the_document.objectStyles.everyItem().name;
    // Make dialog box for selecting the styles
    var the_dialog = app.dialogs.add({name:"Create anchored text frames"});
    with(the_dialog.dialogColumns.add()){
    with(dialogRows.add()){
    staticTexts.add({staticLabel:"Make the anchored frames from ..."});
    with(dialogRows.add()){
    staticTexts.add({staticLabel:"This character style:"});
    var find_cstyle = dropdowns.add({stringList:list_of_character_styles, selectedIndex:0});
    with(dialogRows.add()){
    staticTexts.add({staticLabel:"Or this paragraph style:"});
    var find_pstyle = dropdowns.add({stringList:list_of_paragraph_styles, selectedIndex:0});
    with(dialogRows.add()){
    staticTexts.add({staticLabel:"Leave one dropdown unchanged!"});
    dialogRows.add();
    with(dialogRows.add()){
    staticTexts.add({staticLabel:"Delete matches?"});
    var delete_refs = dropdowns.add({stringList:["Yes","No"], selectedIndex:0});
    dialogRows.add();
    with(dialogRows.add()){
    staticTexts.add({staticLabel:"Anchored text frame settings:"});
    with(dialogRows.add()){
    staticTexts.add({staticLabel:"Object style:"});
    var anchor_style = dropdowns.add({stringList:list_of_object_styles, selectedIndex:0});
    with(dialogRows.add()){
    staticTexts.add({staticLabel:"Frame width:"});
    var anchor_width = measurementEditboxes.add({editUnits:MeasurementUnits.MILLIMETERS, editValue:72});
    with(dialogRows.add()){
    staticTexts.add({staticLabel:"Frame height:"});
    var anchor_height = measurementEditboxes.add({editUnits:MeasurementUnits.MILLIMETERS, editValue:72});
    the_dialog.show();
    // Define the selected styles
    var real_find_cstyle = the_document.characterStyles.item(find_cstyle.selectedIndex);
    var real_find_pstyle = the_document.paragraphStyles.item(find_pstyle.selectedIndex);
    var real_anchor_style = the_document.objectStyles.item(anchor_style.selectedIndex);
    // Check if a style is selected
    if(find_cstyle.selectedIndex != 0 || find_pstyle.selectedIndex != 0) {
    // Define whether to search for character styles or paragraph styles
    app.findChangeGrepOptions.includeFootnotes = false;
    app.findChangeGrepOptions.includeHiddenLayers = false;
    app.findChangeGrepOptions.includeLockedLayersForFind = false;
    app.findChangeGrepOptions.includeLockedStoriesForFind = false;
    app.findChangeGrepOptions.includeMasterPages = false;
    if(find_cstyle.selectedIndex != 0) {
    app.findGrepPreferences = NothingEnum.nothing;
    app.findGrepPreferences.appliedCharacterStyle = real_find_cstyle;
    } else {
    app.findGrepPreferences = NothingEnum.nothing;
    app.findGrepPreferences.appliedParagraphStyle = real_find_pstyle;
    app.findGrepPreferences.findWhat = "^";
    // Search the document
    var found_items = the_document.findGrep();
    myCounter = found_items.length-1;
    do {
    // Select and copy the found text
    var current_item = found_items[myCounter];
    if(find_pstyle.selectedIndex != 0) {
    var found_text = current_item.paragraphs.firstItem();
    var insertion_character = (found_text.characters.lastItem().index) + 1;
    var check_insertion_character = insertion_character + 1;
    var alt_insertion_character = (found_text.characters.firstItem().index) - 1;
    var the_story = found_text.parentStory;
    app.selection = found_text;
    if(delete_refs.selectedIndex == 0) {
    app.cut();
    } else {
    app.copy();
    } else {
    var found_text = current_item;
    var insertion_character = (found_text.characters.lastItem().index) + 2;
    var check_insertion_character = insertion_character;
    var alt_insertion_character = (found_text.characters.firstItem().index) - 1;
    var the_story = found_text.parentStory;
    app.selection = found_text;
    if(delete_refs.selectedIndex == 0) {
    app.cut();
    } else {
    app.copy();
    // Make text frame from selection
    try {
    app.selection = the_story.insertionPoints[check_insertion_character];
    app.selection = the_story.insertionPoints[insertion_character];
    } catch(err) {
    app.selection = the_story.insertionPoints[alt_insertion_character];
    var the_anchored_frame = app.selection[0].textFrames.add({geometricBounds:["0","0",anchor_height.editContents,anch or_width.editContents],anchoredObjectSettings:{anchoredPosition: AnchorPosition.ANCHORED}});
    app.selection = the_anchored_frame.insertionPoints[0];
    app.paste();
    // Apply the object style now to "force apply" paragraph style set in the object style
    if(anchor_style.selectedIndex != 0) {
    the_anchored_frame.appliedObjectStyle = real_anchor_style;
    myCounter--;
    } while (myCounter >= 0);
    } else {
    alert("No styles selected!");

  • How to debug file content conversion problems?

    Hi,
    I'm trying to debug a file content conversion problem.  I'm mapping a few nodes in an IDOC to a file of fixed length fields.  I'm using the "<Node A>.fieldFixedLengths", "<Node B>.fieldFixedLengths", "<Node C>.fieldFixedLengths", etc. parameters to specify the fixed length records.
    However, a certain node (for e.g. Node B) is causing a problem and if it is present in the IDOC, the output file does not get created.  Upon checking the XI monitor, I notice that the file gets mapped correctly and thus the problem lies when the file adapter does the file content conversion.  How do I debug this because there is no descriptive error in the XI log?  If this node is not present, the file gets generated fine.
    Thanks,
    Basant Gupta

    Hi,
    If your SXMB_MONI shows, success status, then go to RWB->Message Monitoring->Message display tool and then check Audit log for the analysis,
    So it wil help you debug the situation.
    If there is no error, then check RWB->Component Monitoring->Adapter Monitoring for you file communciation channel..
    /people/michal.krawczyk2/blog/2005/01/02/simple-adapter-and-message-monitoring
    Regards,
    Moorthy

  • Detection problems in IE?

    I discovered last night that the Javascript Flash detection
    is no longer working in Internet Explorer on either of my
    computers. The script cannot recognize that I have Flash installed.
    I'm not sure exactly when it quit working, but I went back and
    looked at sites I haven't touched in months that WERE working, and
    it doesn't work on any of them now. I recently did a Windows update
    on both computers so it's possible something happened, but I
    haven't been able to find any info online about any issues. If I
    disable Flash detection, everything runs fine, so my Flash
    component itself seems to work properly.
    On this computer, I have Internet Explorer 6.0.2900... and
    the Shockwave Flash object lists file Flash9.ocx. I tried updating
    to the most recent version of Flash on my laptop and that didn't
    fix the detection problems.
    I'm using the standard script detection from Flash
    Professional 8.0. The problem seems to be with the lines:
    set swControl =
    CreateObject("ShockwaveFlash.ShockwaveFlash." + CStr(i))
    if (IsObject(swControl)) then
    The If statement is returning false for every version. Anyone
    have any ideas about what could be causing this?
    Edit: Ok, if I change the line above to:
    set swControl = CreateObject("ShockwaveFlash.ShockwaveFlash")
    Then the IsObject() function returns true. And the line below
    that:
    swVersion = swControl.GetVariable("$version")
    seems to return the correct version.
    So far, in my testing, this actually seems to work. (Although
    I can't be sure if it works on browsers that aren't broken the way
    mine seems to be.) So did something happen that suddenly makes IE
    not allow you to create the object using the version number? And do
    you NEED to use the version number?

    Sounds like there may be a problem with your install ..
    perhaps you have two
    different play version on your PC (eg you've installed a
    newer version, but
    old one didn't fully uninstall itself).
    One possible solution (if that is the case) is to run the
    uninstall utility
    from Adobe, then search your harddrive for any files matching
    *flash*.ocx ..
    and if they are actually flash players (look at properties
    version info tab
    to ensure they are macromedia/adobe flash player ocx's -
    don't want to kill
    something to do with flash memory (say)) then delete them.
    Also kill off
    the c:\windows\system\macromed\flash folder .. so then you
    have no flash
    player ocx left. Then go to the Adobe web site and
    re-download/install the
    latest Flash Player. NOTE: if you do this, be very careful
    you only delete
    things that can safely be deleted without causing problems
    elsewhere.
    Jeckyl

  • "Spotlight Comments" in Finder Get Info window doesn't accept Clipboard contents

    I wanted to paste caption and credit info from a NASA video download into the file's Spotlight Comments in the Get Info window. Done it in the past no problemo. Today it doesn't work.
    Tried pasting the copied web page content to TextEdit and converting to plain text, copy again, paste still a no-go. Tried typing in the Spotlight Comments window, that works ok. Looked at the contents of the Clipboard and the text appears there, labeled either as rtf or text depending on where the text was pasted from (web or TextEdit).
    Tried copying a couple of letters from the converted text, and they pasted ok into Spotlight Comments.
    Suggestions to make the Clipboard contents paste?
    Thanks.

    On further inspection, it appears that the contents of the old Comments field are carried forward into the Spotlight Comments field.

  • Using Clipboard content in script

    file:///C:/Documents%20and%20Settings/uSER/Desktop/clipboard%20forum.indd
    Hi friends,
    While i am using "find & change or GREP clipboard content" it automated lot of things in Indesign file. But i dont know how can i used in the script. We are using Grep option in the indesign file, the same thing we are used in the script also. But I am using Clipboard content lot in the Indesin file. But i dont know how can i implement that. Please give solution to me. I have attached my file. Please go through it and give feedback to me.
    Regards
    Lara

    Hi,
    First of all your attachment is not in valid state.
    Thanks
    ashok

  • Content protection problem

    Hi. I've got that content protection problem when downloading from blackberry app world. Every time I try to download something, a message comes up that says, "An error has occurred communicating with the BlackBerry App World Client. If you have content protection enabled on your device, please disable and try again,". I'm sure a lot of people had this problem and many of them have had their problem solved, but i've already tried solutions like disabling the encryption and doing the battery pull but the message still comes up.
    Are there any other solutions that I can try?
    Thank you in advance

    Hello timothyW, 
    Welcome to the forums. 
    Have a look at this article for help changing the content protection settings on your BlackBerry® smartphone. 
    KB11963
    How to change the setting for Content Protection on the BlackBerry smartphone
    Hope this helps. Have a good day. 
    -SR
    Come follow your BlackBerry Technical Team on twitter! @BlackBerryHelp
    Be sure to click Kudos! for those who have helped you.Click Solution? for posts that have solved your issue(s)!

  • "Malicious content detected" alerts in Mail app

    I have recently received several emails with "[MALICIOUS CONTENT DETECTED]" inserted at the beginning of the Subject.
    The emails come from various organisations / associations and do not seem to be related.
    At the end of the messages the following appears (in bold):
    "***************************************************************************** ***************************************************************************** ***************************************************************************** *** *** *** WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING *** *** *** *** Malicious virus or phishing content has been identified in this email *** *** Any malicious attachments have now been removed *** *** *** ***************************************************************************** ***************************************************************************** *****************************************************************************"
    Is this a function of my Mail app detecting suspicious content or has the sender's email system detected something and removed it?
    Anyone else seen this?
    Mike

    I don’t think it is Mail. More than likely it is an email server somewhere along the chain the message has passed through.

  • Access clipboard content's icc-profile in javascript

    Good day to all of You!
    Does any one know if/how one can get information on the clipboard content’s measurements and most importantly icc-profile via JavaScript?
    Thanks
    pfaffenbichler

    There is no way of finding out directly but you may be able to do so by:
    1) Chage your Color Settings so that 'Ask When Pasting' is turned off
    2) Create a new temporary document larger than you expect the clipboard to be
    3) Paste in the clipboard contents.
    4) Check the layer.bounds to get the size
    5) Check the doc profile name to get the profile
    If it can be done at all, the technique should be similar to what I've described.

  • IDCS6(MAC) 10.9.4 - a script that will make an anchored object and paste in clipboard contents

    I'm trying to create a script that will create an anchored object that will paste in clipboard contents.
    So far I have:
    var frameRef = app.selection[0];
        var parentObj = frameRef.insertionPoints.item(0);
        var anchorFrame = parentObj.rectangles.add();
    And this works fine, creating an inline object, that can further be defined (with anchor point settings etc).
    However, it is when I go to use app.paste() or app.pasteInto() that all hell breaks loose.
    The line of code I added was:
    anchorFrame.content = app.pasteInto();
    and the error I get is:
    What am I doing incorrectly?
    Colin

    @Colin – For the paste command you like to use, you have to:
    1. First select an object, in your case the added rectangle object
    2. Then use the pasteInto() method from the app object
    3. There is no content property for a rectangle object
    Watch out what is selected after you added the rectangle.
    What you have is a selection of the text frame when you start your code in line one.
    Adding a rectangle will not change that selection.
    The following code will do the job.
    However, if you use pasteInto() the pasted objects could be only partly visible inside the frame.
    Depends on the size and position of the added rectangle relative to the original copied page items.
    Make sure that you give the rectangle a proper size after or while you are adding it:
    var frameRef = app.selection[0];
    var parentObj = frameRef.insertionPoints.item(0);
    //Will add a rectangle sized 40 x 40 mm
    var anchorFrame = parentObj.rectangles.add({geometricBounds:[0,0,"40mm","40mm"]});
    app.select(null); //Optional
    app.select(anchorFrame);
    app.pasteInto();
    Uwe

  • Installer failed to initialize.this could be due to missing file.please download adobe support adviser to detect problem.

    getting the message while installing cs 6 trial
    -installer failed to initialize.this could be due to missing file.please download adobe support adviser to detect problem.
    please help

    Error "Installer Failed to Initialize" | Install desktop application | Windows

  • Extended Content type problem

    Extended Content type problem
    I want to extend the content type 'ExtendDocument' from 'Document'.
    So I use 'Oracle Internet File System Manager' to create a new Class Object named 'EXTENDDOCUMENT', which is extend from 'DOCUMENT', and add a attribute 'EXTENDURL'.
    This Class Object's bean class is 'ifs.beans.ExtendDocument' and server class is 'ifs.server.S_ExtendDocument'.
    I create these 2 java class and put the class files to ORACLE_AS_HOME\ifs\cmsdk\custom_classes directory.
    As I want to set the object type as 'ExtendDocument' when uploading a file which expend name is '*.wmv', so that need to change 2 default value 'ParserLookupByFileExtension' and 'IFS.PARSER.ObjectTypeLookupByFileExtension'
    So I add 'name=wmv, datatype=STRING, value=oracle.ifs.beans.parsers.ClassSelectionParser' to ParserLookupByFileExtension.
    And then add 'name=wmv, datatype=STRING, value=EXTENDDOCUMENT' to IFS.PARSER.ObjectTypeLookupByFileExtension.
    After done above actions, i restart my oracle application.
    I use CUP to upload a test file 'test.wmv' to CMSDK repository, and its type is 'EXTENDDOCUMENT'.
    But if I use FTP or WebStarterApp application to upload 'test.wmv' file to CMSDK repository, then its type is 'DOCUMENT'.
    Why and how to change to make FTP and WebStarterApp application can upload *.wmv file's type as 'EXTENDDOCUMENT'?
    anybody can help me?
    thanks.

    Nirav-P-Thakar wrote:
    FileNameMap  fnmMime        = URLConnection.getFileNameMap ( ) ;
    fnmMime.getContentTypeFor(fileName);
    URLConnection.guessContentTypeFromName(fileName);I have tried out both methods but it returns null when the file is of type MS Office or Open Office.In reply 1 BalusC said..
    "Alternatively you can use ServletContext#getMimeType() for this. It guesses the content type based on the mime mapping as it is been definied in the web.xml of the application server and the webapplication. If it returns null, then you need to add new <mime-mapping> entry to the web.xml."
    I would try doing it this way. Try including entries for the mime mappings in the deployment descriptor of the web application.

  • Windows 7 detects problem with iPod shuffle and after troubleshooting say it can't fix and disconnects it.  What's up?

    Windows 7 detects problem with iPod shuffle and after troubleshooting say it can't fix and disconnects it.  What's up?

    You might get some help over on the shuffle discussions.
    http://discussions.apple.com/forum.jspa?forumID=822

  • 'Error during import of clipboard contents' runing from ITS server

    Dear Friends,
    when I execute the report and smartform program from ITS server it is giving a error message 'Error during import of clipboard contents' in the web page.
    Please guide me how to resolve this issue.
    Thanks & Regards
    Tapas Dutta

    Hi Victor,
    Good Morning.
    Can you please confirm you are installing new SAP NW Java system on the same host where SAP NW ABAP is running or you are trying to install SAP NW JAVA as addin installation to existing SAP NW ABAP?
    Regards
    Naveen Garg

Maybe you are looking for

  • Where can I learn more about the Logic Environment?

    I've been using LogicPro for a while now - since version 7 came out - and I'm ready to learn more about the mysterious Logic Environment. Anyone know of a good tutorial or website on this topic? I don't have a specific question - what I need is a gen

  • How do I upload docs off my iPad onto the internet

    I am trying to apply for a job and I need to upload my resume on their website but when I click the browse button it only allows me to upload a picture. Please help

  • Fetching ABAP connection information from SLD

    Hi Experts, I had created one SLD. so i want to use the ABAP connection information of SLD in JCo programming.  how can we achieve this one? Thanks, Maha

  • In-house developed applications

    Hi Friends, We have developed an in-house (home grown) application called LOANS SYSTEM using Dev6i with 9i DB, it is a complex and a big module just like the average module it EBS. Now I want to use the architecture of EBS R12 interms of security, th

  • Partner redetermination in transactions

    Hi, I'm trying to configure partner determination procedures for service transactions in order to allow redetermination of partners, but I hanen't been able to find a solution. Let suppose I have transaction types Z001 and Z002 The parties involved a