Visual Basic Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreVisual Basic Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old November 24th, 2003, 03:01 AM
Sax Sax is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Posts: 23 Sax User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via AIM to Sax
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.

Reply With Quote
  #2  
Old December 9th, 2003, 02:41 PM
nickjc nickjc is offline
Banned
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2003
Location: UK
Posts: 23 nickjc User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreVisual Basic Programming > automated screenshots with vbs


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway