Programmatically Copying a Screenshot to the Clipboard
When extending the functionality of Microsoft Word and Excel, one can program with Visual Basic (VBA) to do some clever things. I had created a small VBA function to take a screenshot. It works well when called from Excel. And when I save it as a local .VBS file and double-click it from my desktop, it works fine.
I would like to do the same thing from Captivate.
Here's a sample of the VBS code:
Sub TakeScreenShot()
With CreateObject("Word.Basic")
.SendKeys "{prtsc}"
End With
WScript.Sleep 1000
End Sub
Call TakeScreenShot
I have two separate problems:
- From Captivate (On Success)
- When I have an object (Click Box or SmartShape used as a button) and then On Success to Open URL or File, the .VBS file generates two separate banners in the browser, neither of which are desired.
- Do you want to open or save [filename.vbs] (460 bytes) from (location) > with Open, Save, and Cancel.
- I click Open (and it leads to the next warning).
- The publisher of [filename.vbs] couldn't be verified. Are you sure you want to run the program > with Open and View Downloads
- I click Open (and it copied the screen as a graphic into the clipboard)
- Do you want to open or save [filename.vbs] (460 bytes) from (location) > with Open, Save, and Cancel.
- When I have an object (Click Box or SmartShape used as a button) and then On Success to Open URL or File, the .VBS file generates two separate banners in the browser, neither of which are desired.
- From Captivate (JavaScript)
- I would think there is a way to translate the code above into a similar JavaScript formatted syntax to accomplish the same thing; however, I've not been able to do that as of yet.
Questions:
- Would you be able to guide me in how to fashion the VBS into the JavaScript syntax that Captivate would require?
- Do you have a method/means (or code) that would enable a full screenshot being copied to the clipboard?
Thanks, in advance.
