December 24, 201312 yr Hi. For reasons I won't bore you with, I am trying to run Pete Dowson's makerunways programme as part of a batch script programme. It is activated by this vbs script: intAnswer = _ Msgbox(" Do you want to run MakeRunways?", _ vbYesNo, " ") If intAnswer = vbYes Then WScript.Sleep 2000 Dim objShell Set objShell = WScript.CreateObject( "WScript.Shell" ) objShell.Run("""D:\FS9\MakeRwys.exe""") Set objShell = Nothing Else End If This starts the programme up just fine, but for some strange reason, it stops (not hangs - says it is finished) after locating only 46 runways in my entire FS9 setup! If I run it from the file itself the programme finds 30000, or whatever. Why would the programme, once started, show these differences, depending on whether I start it directly, or via a script? Thanks, Martin Martin Stebbing, EGLF (UK)
December 24, 201312 yr I'm not sure why you have included either the sleep command or the double set of quotes on the run command. Both should be harmless, but maybe they are messing up the script compiler. If there were embedded blanks in the path, then you would need three quotes on either side of the string. With no embedded blanks, one quote on either end works. The only other thing that I can think of is that by scripting, somehow, you are "starting off" in the wrong folder and this is causing trouble.
December 24, 201312 yr Author I can try changing the quotes, but this format works in every other vbs script I use. The sleep command is not essential but makes the whole batch file, of which this vbs script is part, more 'user friendly'. What is odd to me is that the programme starts up, as I imagined, but stops says it is done after finding just 46 airports. No txt, csv or xml files are created either, so something is very wrong. Martin Stebbing, EGLF (UK)
December 28, 201312 yr Author As you say, the script is for some reason starting off in the 'wrong' folder: placing the vbs file in the FS9 main folder (where the makerwys.exe file is) solves the problem. Martin Stebbing, EGLF (UK)
Create an account or sign in to comment