|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
automated screenshots with vbs
this is a two part question.
first here's what I have so far that launches an instance of explorer, loads a page, then closes explorer when the page is done loading. =============================== Set IE = CreateObject("InternetExplorer.Application") IE.Visible = True IE.Navigate "http://site.com/" While IE.Busy WScript.Sleep 100 Wend IE.ExecWB 6, 2 WScript.Sleep 5000 IE.Quit =============================== How can I make "http://site.com" a parameter that is passed to the script when I call it? for example...if I named it script.vbs call it by script.vbs http://site.com/ I don't know much if any vbs and have no idea how to pass parameters to a vbs script. second, how can I make it then take a screenshot of explorer before closing the browser with the IE.Quit command? Ideally, I want to have it save to a xxxxx.jpg where xxxxx = incremental number. this is for a much larger system I'm working on that will allow someone to enter a url on my site and then they get back a screenshot of what it looks like in IE. |
|
#2
|
|||
|
|||
|
Something like this:-
if (WScript.Arguments.Count = 1) then arg0 = WScript.Arguments.Item(0) else arg0 = InputBox("Enter the argument:") end if using the WScript.exe. Hope this helps. Nick |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > Visual Basic Programming > automated screenshots with vbs |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|