PDA

View Full Version : I also Need a VB script



Patrick_Aps
11-09-2009, 03:34 AM
I have to generate files, and I can do so when I start IExplore to a specific http page.
Now I have a batch script that starts the page,
wait for a minute for the page to be generated and then kills the IEXplore process.

But sometimes a minute is much too long and I'm waisting time...

Could someone make a script that
-Starts IExplore and opens a page.
-As soon as IExplore shows "Done" on the status bar (or a second later) closes IExplore and the scipt
-If IExplore is not ready after nn seconds (60 or so) then IExplore stops and the script closes.

dave
11-09-2009, 08:37 AM
What page do you need it to go to?

What version of IE?

dave
11-09-2009, 09:57 AM
Patrick, I have the code that will open a page and check the status. I can easily implement the timer - just need the details. Also, is this something you are going to schedule nightly?

Patrick_Aps
11-10-2009, 08:33 AM
If you have a SmartPlant Instrumentation
and a SmartPlant Explorer
Users can generate Loop Diagrams and Spec Sheets and see them in Internet Explorer.
Syntax
"C:\Program Files\Internet Explorer\IEXPLORE.EXE" "http://SERVERNAME/WCmain.ASP?WCI=GetReportByName&project=DOMAIN&plant=PLANT&area=G309&unit=UNIT&entity=TAG&reportuid=RADSLOOP&profile=database"


On the SmartPlant Explorer server, an SQL wil write a batch file that contains all the reports to be generated.

The batch file then should call the custom script to start the page and close when the page is done or close after a timeout of, let's say 60 seconds.

dave
11-10-2009, 09:38 AM
can you PM me the actual URL?

Patrick_Aps
11-11-2009, 04:05 AM
its a holiday over here,
end of World War 1

Patrick_Aps
11-11-2009, 08:00 AM
My batch file does the following:

REM the next line starts of SmartPlant Explorer to generate an SmartPlant Instrumentation enhanced SmartLoop
START "C:\Program Files\Internet Explorer\IEXPLORE.EXE" "http://SERVERNAME/WCmain.ASP?WCI=GetReportByName&project=DOMAIN&plan t=PLANT&area=AREA&unit=UNIT&entity=TAG&reportuid=R ADSLOOP&profile=database"
REM the next line makes the batch file to wait for 60 seconds
wait 60
REM the next line makes the Task Manager end Internet Explorer
TSKILL IEXPLORE

DOMAIN, PLANT, AREA, UNIT and TAG are all variabels
also RADSLOOP is a variable, because other reports PRDATA en INSPEC can be generated too.

So what i need is to replace the 2nd line with
START ShowThePage 59 "http://SERVERNAME/WCmain.ASP?WCI=GetReportByName&project=DOMAIN&plan t=PLANT&area=AREA&unit=UNIT&entity=TAG&reportuid=R ADSLOOP&profile=database"

Where ShowThePage is your .VBS or .exe that has two parameters: the wait time and the url. It should start Internet explorer for maximum 59 seconds to show the page, but quits sooner when the page is done completely

Patrick_Aps
11-18-2009, 07:27 AM
So what i need is to something that can be lauched from a commanline like this:

START ShowThePage 59 "http://usa.autodesk.com/adsk/servlet/pc/item?siteID=123112&id=11091608"

dave
11-19-2009, 03:17 PM
Patrick, I am pinned down this week. Hopefully I can have something for you next week.

dave
01-14-2010, 11:26 PM
Patrick, did you get this utility?