Posted By

szsk on 08/06/06


Tagged

javascript String windows copy wsh jscript activex clipboard


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

jasonseney


wsh_setClipboard


 / Published in: Other
 

  1. function setClip( txt )
  2. {
  3. var ie = new ActiveXObject( "InternetExplorer.Application" );
  4. ie.Navigate( "about:blank" );
  5.  
  6. while( ie.Busy ) WScript.Sleep( 50 );
  7.  
  8. ie.Document.parentWindow.clipboardData.setData( "text", txt );
  9. ie.Quit( );
  10. }

Report this snippet  

You need to login to post a comment.