Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to execute the two vb scripts Consecutively
#2
Solved: 10 Years, 9 Months, 1 Week ago
There might be a few ways to handle this one.

My first thought would be to create a file test or something using FSO..

Something like.....Script 1
'start by deleting the file
fso = CreateObject("file.scripting")
fso.Delete("path\name")
'the rest of script 1
here......
'When complete write a file someplace
fso.open("path\name", ForAppend, True) 'True to create if missing
fso.writeline "Completed" 'doesn't really matter unless you want to poll for results
fso.close

Script 2
'Start by checking if script 1 is complete.
fso = CreateObject("file.scripting")
while found = false
on error resume next 'just incase FSO throws an error for doesn't exist
found = fso.Exist("path\name") 'same path\file as script 1
wait(60) 'Sleep for 1 min
loop
on error goto 0 'Reset error trapping
'continue with the rest of the script

This is not the exact code. I'm a little rusty on the FSO (File Scripting Object) capabilities, but I know it can check if a file exists. The loop in the second script will wait and continue to test for the file existence before continuing with the script. You could also use a database or even a registry key and poll the value before continuing, but I think the FSO will be easier especially with a non-monitored system script.

Hope this helps.
Reply


Messages In This Thread
RE: How to execute the two vb scripts Consecutively - by jsknight1969 - 10-12-2009, 10:58 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Is it possible to execute Remote Agent witout ALM? CharlieMadrid 0 1,065 05-12-2020, 01:26 PM
Last Post: CharlieMadrid
  How to execute a UFT script when computer is in locked state akilamurugesh 4 12,578 08-25-2014, 07:41 PM
Last Post: akilamurugesh
  Execute the QTp scripts when i lock my computer balreddy 4 21,534 10-19-2012, 04:45 AM
Last Post: sujoysen1
  How to execute batch file from command prompt using QTP sachindhote 2 18,146 08-13-2012, 04:47 PM
Last Post: sneha2409
  4GB RAM= number of QTP scripts can execute chaithanya84 1 2,513 07-23-2012, 06:08 PM
Last Post: Tarik Sheth

Forum Jump:


Users browsing this thread: 1 Guest(s)