Hi,
among other things i want to use xojo to start other programs.
Until now i’m using visualbasic for this task.
3 Problems occured to me when trying to do this:
-
I want to start a program.
So in Visulabasic i do:
prg$=“C:\Program Files (x86)\OpenOffice 4\program\swriter”
blah = Shell(prg$, 1)
-> Openoffice Writer startsin xojo i do:
f=gettruefolderitem(“C:\Program Files (x86)\OpenOffice 4\program\swriter”)
if f.Exists then
f.Launch
else
msgbox “not found.”
end
-> xojo tells me ‘not found’i have to do:
f=gettruefolderitem(“C:\Program Files (x86)\OpenOffice 4\program\swriter.EXE”)
-> Openoffice Writer startsIndeed that’s not a real big problem, i’m curious why it’s like that.
-
I want to start a programm and pass a argument to the program.
So in Visulabasic i do:
prg$=“C:\Program Files\XnViewMP\xnviewmp.exe c:\pictures”
-> my pictureviewer starts and show me the path wich i included in the commandline.in xojo i do:
f=gettruefolderitem(“C:\Program Files\XnViewMP\xnviewmp.exe c:\pictures”)
if f <> nil then
if f.Exists then
f.Launch
else
msgbox “not found.”
end
end if
-> xojo does nothingHow can i pass arguments to my programs?
-
I want to start a program and let it run as if i started it in it’s directory.
i.e. start a shellscript that uses a program wich is stored in that directory.
In the script the command ‘rsync.exe’ wich is stored in ‘c:\scripts’ is called.In visualbasic i do:
prg$=“C:\scripts\script.bat”
blah = Shell(prg$, 1)
-> script starts, and executes rsync.exeif i do the same in xojo:
my script tells me: ‘rsync.exe’ not found.So it seems xojo don’t switch to the path of the command.
How can i accomplish that (switch to the path of the called programm/batch etc.)?
I hope that’s not too many questions for 1 post.
Regards