Important Question?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • John Fletcher
    No longer a forum member
    • Aug 2007
    • 88

    Important Question?

    Hello all,

    Hope you can help!

    Can Autoplay run a Javascript from within itself while it is running itself?

    The javascript is as follows:

    <script type="text/javascript" language="javascript">
    <!--
    function do_err()
    {
    return true
    }
    onerror=do_err;
    function no_cp()
    {
    clipboardData.clearData();setTimeout("no_cp()",100 )
    }
    no_cp();
    //-->
    </script>

    This code provents the possibility of Print Screen functionality... yet when I looked into the AMS help files of the program - there is no discussion about running javascript from within the AMS project itself...

    Or, do I need to launch a webpage with this javascript in the html and then somehow have the webpage minimize so it cannot be seen while the AMS application is running....


    Any help would be appreciated... This is rather urgent!!!

    Best Regards,

    John
  • srussell
    Indigo Rose Customer
    • Sep 2005
    • 77

    #2
    John, try this...

    - Create an emtpy input box and make it hidden
    - Create a function that uses Input.Copy, specificying the name of your new hidden input object
    - Use a timer to periodically call the function... the Windows Clipboard should be empty
    - you can also call the function from any other action in your project to erase the clipboard.

    Comment

    • John Fletcher
      No longer a forum member
      • Aug 2007
      • 88

      #3
      Important Question!

      SRussell,

      Excellent... I will look into doing this... so as I do not make an error... are there any examples available that you know of?

      I hope this works!

      Best Regards,

      John

      Comment

      • John Fletcher
        No longer a forum member
        • Aug 2007
        • 88

        #4
        Is this correct?

        SRussell,

        Is this correct... I am very new to this!

        Input.Copy("Input1");
        Page.StartTimer(5000) --fires On Timer actions once every 5 seconds
        Input.Cut (string "Input1")


        John

        Comment

        • srussell
          Indigo Rose Customer
          • Sep 2005
          • 77

          #5
          Erase The Clipboard

          Here's some sample code you can use that will erase the Windows Clipboard by copying a blank hiddden input object once every five seconds. Look at the global function "EraseClipboard" and the OnShow and OnTimer events for the page.

          Change the timer duration to something less ( i.e. 1000) if you want to erase it more frequently.

          I've tried this as a solution to prevent users from copying the contents of an unprotected PDF to the Windows Clipboard. It's not flawless, but it's pretty annoying if you keep trying to copy/paste a doc and nothing shows up.
          Attached Files
          Last edited by srussell; 12-04-2007, 08:30 PM.

          Comment

          • srussell
            Indigo Rose Customer
            • Sep 2005
            • 77

            #6
            One minor alteration...
            It appears the input can't be left in order to set a text selection. Just insert a period or other single character in the invisible field, then set the input field selection.

            Modifiy project attached.
            Attached Files

            Comment

            Working...
            X