WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

OLE with MSIE
plus

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

Execute JScript function via OLE


Question:

I want to open an html-file via IE-OLE and execute a javascript-function passing it a certain parameter. Is that possible in any way?

Answer:

Probably depends on what you mean by execute Javascript...executing a script on a page someplace might be possible...
;Winbatch Version: 2006A -- Script by Jay Alverson
oBrowser = ObjectOpen("InternetExplorer.Application")
oBrowser.navigate('javascript:window.clipboardData.setData("Text","Hello from Javascript");')
oBrowser.quit
oBrowser = 0
Message("Clipboard", ClipGet())
Exit

Article ID:   W17172
File Created: 2007:07:03:14:28:36
Last Updated: 2007:07:03:14:28:36