I am running the small program, code below, to launch a bigger web app. It has worked before but now the program seems to time out even though I have the shell.timeout set to -1 so it should never expire. The Run_StulzCalc.exe and StulzCalc.exe are in the same folder, as well as the lib’s. When I click on the Run_StulzCalc it seems to be loading, but the main program never comes up. If I click the Run_StulzCalc again the main program starts, The shell shouldn’t time out. What am I missing?
Dim FileLoc As String
Dim sh as New Shell
Dim currentFolder as string
sh.timeout = -1
currentFolder = SpecialFolder.CurrentWorkingDirectory.NativePath
FileLoc = currentFolder + “StulzCalc.exe”
You’re executing 2 separate shell commands. Try this:
sh.writeline """" + FileLoc + """"
sh.writeline "start http://10.0.0.3"
However, why are you starting the StulzCalc.exe and then passing a new line of text?
The code I have works, but I have to start the Run_StulzCalc twice to get the browser window to open. Your code doesn’t seem to work for me. Any other ideas?
Apparently, you start your stand alone app in FileLoc, then open the browser to 10.0.0.3.
Since you are doing that from a Xojo app, why go through a shell ?
Also, why use 10.0.03 if the app is on your machine ? Would it not be more logical to use localhost ?
This should probably work better :
dim f as folderitem = GetFolderItem("")
f = f.child("StulzCalc.exe")
I didn’t understand what you were trying to achieve with your code. I thought that you were trying to pass arguments into the started web app. Now that I understand, as Michel said, using the FolderItem’s Launch to start your web app and then using ShowURL to start the browser is the correct way to accomplish what you’re working towards.