I know I'll feel dumb when I see the answer, but I've searched this site and found nothing even close.
How can I make this into a simple loop rather than having 24 if statements?
/// Find Install Directory ////////////
//////////////////////////////////////////////////
IfDirExists>C:\script
Let>v_Install=C:\script
GoTo>CONFIG_INSTALL_END
Endif
IfDirExists>D:\script
Let>v_Install=D:\script
GoTo>CONFIG_INSTALL_END
Endif
IfDirExists>E:\script
Let>v_Install=E:\script
GoTo>CONFIG_INSTALL_END
Endif
.......and so on to Z
Finding the install path?
Moderators: Dorian (MJT support), JRL
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
Like so:
VBSTART
VBEND
Let>c=65
Repeat>c
VBEval>Chr(%c%),drive
IfDirExists>%drive%:\script
Let>v_Install=%drive%:\script
Goto>CONFIG_INSTALL_END
Endif
Let>c=c+1
Until>c=91
VBSTART
VBEND
Let>c=65
Repeat>c
VBEval>Chr(%c%),drive
IfDirExists>%drive%:\script
Let>v_Install=%drive%:\script
Goto>CONFIG_INSTALL_END
Endif
Let>c=c+1
Until>c=91
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?