0

I've loaded three library file dynamically using below code. I've overridden few function of A.vbs in B.vbs. So, i want to change the priority order from "A.vbs->B.vbs->C.vbs" to "B.vbs->A.vbs->C.vbs ."

How do i change the priority position of the library file (B.vbs) after executing below code. it's easy to do ExecuteFile "C:\B.vbs" before "C:\A.vbs" but i need to change the position of library based on user specified input position.

ExecuteFile "C:\A.vbs"  
ExecuteFile "C:\B.vbs"  
ExecuteFile "C:\C.vbs" 

-Shreshtha

Toto
  • 89,455
  • 62
  • 89
  • 125
Shreshtha
  • 1
  • 2

1 Answers1

0

Although I couldn't exactly get why you would want to do that,yet the simplest way would be wrapping your Execute statements inside if or switch statements based on the User I/p. eg

select case choice

case 0 : ExecuteFile "C:\A.vbs" 
         ExecuteFile "C:\B.vbs"
         ExecuteFile "C:\C.vbs"

case 1:  ExecuteFile "C:\B.vbs" 
         ExecuteFile "C:\A.vbs"
         ExecuteFile "C:\C.vbs"

and so on.

where "choice" will be an input from the user which will decide the sequence.

If you want the User to give the exact sequence , you could also do something like the below:

case "123" : ExecuteFile ... ' Order A, B, C
case "213" : ExecuteFile ... ' Order B, A, C 

and so on

Rohit P
  • 337
  • 3
  • 12