staciedaisy Posted May 1, 2008 Share Posted May 1, 2008 i am trying to copy from excel and paste the clipboard as key stokes (like a macro), and not just pasting data.this is my first script, and i learned this 2 days ago, so please be nice as i am a very newbie!!!Set WshShell = WScript.CreateObject("WScript.Shell")For a = 1 To 1WshShell.AppActivate "MICROSOFT EXCEL"WScript.Sleep 300WshShell.SendKeys "{F2}"WScript.Sleep 300WshShell.SendKeys "{END}"WScript.Sleep 300WshShell.SendKeys "+{Home}"WScript.Sleep 300WshShell.SendKeys "^©"WScript.Sleep 400WshShell.AppActivate "MICRO KEY"WScript.Sleep 1000WshShell.SendKeys "{F2}"WScript.Sleep 2000WshShell.SendKeys "^(v)"WScript.Sleep 4000WshShell.SendKeys "~"WScript.Sleep 1000WshShell.SendKeys "%(Q)"WScript.Sleep 300WshShell.SendKeys "®"WScript.Sleep 300WshShell.SendKeys "(U)"WScript.Sleep 4000WshShell.SendKeys "^{INSERT}"WScript.Sleep 300WshShell.SendKeys "+{TAB}"WScript.Sleep 300WshShell.SendKeys "+{TAB}"WScript.Sleep 300WshShell.SendKeys "+{TAB}"WScript.Sleep 1000WshShell.AppActivate "MICROSOFT EXCEL"WScript.Sleep 1000WshShell.SendKeys "{TAB}"WScript.Sleep 300WshShell.SendKeys "{F2}"WScript.Sleep 300WshShell.SendKeys "{END}"WScript.Sleep 300WshShell.SendKeys "+{Home}"WScript.Sleep 300WshShell.SendKeys "^©"WScript.Sleep 400WshShell.AppActivate "MICRO KEY"WScript.Sleep 400NextWScript.Quitso after WshShell.AppActivate "MICRO KEY"WScript.Sleep 400i am needing to know how to paste the contents of the clipboard as keystrokes as if someone was actually typing the contents of the clipboard out. i am needing this done like this because the other application it is pasting into has drop down boxes which you can type into to select but not paste!any input would be greatly appreciated!!!!thanks soo much!thanks in return!!!!!!!!!!!!!!!! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now