Quantcast

Maximum PC

It is currently Thu Sep 18, 2014 6:52 am

All times are UTC - 8 hours




Post new topic Reply to topic  [ 8 posts ] 
Author Message
 Post subject: quick batch file question.
PostPosted: Tue Jan 27, 2009 11:56 am 
8086
8086

Joined: Fri Jun 27, 2008 3:48 am
Posts: 14
Does anybody know if it's possible to write a simple batch file that opens IE to a location and waits for the page to load completely before moving on and doing the same thing to several locations? Or will I need to break out some more complex scripting.

I am limited to IE 6


Top
  Profile  
 
 Post subject:
PostPosted: Tue Jan 27, 2009 12:10 pm 
Java Junkie
Java Junkie
User avatar

Joined: Mon Jun 14, 2004 10:23 am
Posts: 24224
Location: Granite Heaven
You can use a batch file to launch an application from the command line.

If you can specify the webpage that explorer will open from the command line, then you can use a batch file to do what you've asked. You may not be able to make it 'wait' (I don't think that batch files are capable of responding to input from an application), but you can simply have the batch file launch multiple instances of IE.


Top
  Profile  
 
 Post subject:
PostPosted: Tue Jan 27, 2009 12:20 pm 
8086
8086

Joined: Fri Jun 27, 2008 3:48 am
Posts: 14
Thanks for the reply.

The waiting part is what I am most concerned about. I basically need to run a scheduled batch job that will cache a few really large pages (between 1mb and 4mb each). I have already written a small commandline program in vb.net that uses the WebClient class to automatically download these pages but since the setup here at work is less than speedy, times out before the bigger files finish.

any ideas would be helpful


Top
  Profile  
 
 Post subject:
PostPosted: Tue Jan 27, 2009 12:45 pm 
SON OF A GUN
SON OF A GUN
User avatar

Joined: Mon Nov 01, 2004 5:41 am
Posts: 11605
I can think of a REALLY easy way to do that in .NET I think... you can launch a process and wait till it finishes... but IE might not report "finished". Or it might just wait till the process closes? I don't know.

hrm... maybe. I am not sure how that would work. Lemme think on it. I don't know that you could do it with a normal batch script... we have a powershell expert around here that might know how to do it with that...


Top
  Profile  
 
 Post subject:
PostPosted: Wed Jan 28, 2009 7:31 am 
Team Member Top 500
Team Member Top 500
User avatar

Joined: Mon Jan 08, 2007 1:41 pm
Posts: 2033
this isn't the most technical solution, but couldn't you just hard code a certain waiting period into your program so there will be a delay before the next webpage opens?

isn't there also a feature in IE6 that allows you to make a webpage available offline? wouldn't that give the same effect as caching it?


Top
  Profile  
 
 Post subject:
PostPosted: Wed Jan 28, 2009 10:47 am 
8086
8086

Joined: Fri Jun 27, 2008 3:48 am
Posts: 14
Quote:
this isn't the most technical solution, but couldn't you just hard code a certain waiting period into your program so there will be a delay before the next webpage opens?


Yeah. That is the only way I would know how to do it using a batch file. However, since the time to download varies, taking stabs at the waiting intervals would be unreliable and inefficient at best.

I actually got it to work using .Net with the HttpWebRequest and HttpWebResponse classes. The WebClient class is just an oversimplification of these two and hides the timeout property. You would think that it's set to unlimited by default. But I guess not...


Top
  Profile  
 
 Post subject:
PostPosted: Fri May 22, 2009 8:13 am 
Java Junkie
Java Junkie
User avatar

Joined: Mon Jun 14, 2004 10:23 am
Posts: 24224
Location: Granite Heaven
Previous post by 'Jenni' deleted for violating Rule 15: Astroturfing and shilling.


Last edited by Jipstyle on Mon May 25, 2009 5:00 am, edited 1 time in total.

Top
  Profile  
 
 Post subject:
PostPosted: Fri May 22, 2009 8:24 am 
SON OF A GUN
SON OF A GUN
User avatar

Joined: Mon Nov 01, 2004 5:41 am
Posts: 11605
I was going to mention the old post thing, but this is the kind of resurrection that I don't mind. Even if the OP doesn't need it, somebody else might.


Top
  Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 posts ] 

All times are UTC - 8 hours


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group