Hello,
ops: How to launch a application with LUA script
Thanks
Hello,
ops: How to launch a application with LUA script
Thanks
execute ()
See attached.
Also see the lua systems function plugin
:lol: Thanks for our reply Mike C, it's OK now
What if I want to send a parameter at the same time that needs " around it? I have tried these two:
But it didn't work. I tried different versions of the " placings, but they didn't help either. Any advice?Code:execute("C:\\Windows\\notepad.exe" "d:\\test.txt" ) execute("C:\\Windows\\notepad.exe .. "d:\\test.txt"" )
Tor - managing director of the Cinema Inferno home theater and multi-zone sound system with Girder running the show in the back, NetRemote as the GUI and Media Center 17, PowerDVD and ZoomPlayer as playback software
Hobsyssel mastiffs: http://www.hobsyssel.no
try:
orCode:execute("C:\\Windows\\notepad.exe d:\\test.txt" )
If either (or both) of the values are in variables, use one of these:Code:execute("C:\\Windows\\notepad.exe".." ".."d:\\test.txt" )
Please note that I have place a space between the executable and the parameters in each case.Code:-- assume: -- executable = "C:\\Windows\\notepad.exe" -- parameters = "d:\\test.txt" execute("C:\\Windows\\notepad.exe "..parameters) execute(executable.." d:\\test.txt") execute(executable.." "..parameters)![]()
Mark F
After further review, I would use something like this:
The start command spawns the application to run asynchronously. This allows the CMD window to close and Girder to continue processing events prior to the application completing.Code:execute( "start " .. ExecuteableAndParameters )
If you use the stuff from my previous post, Girder will wait until notepad exits before processing any more events. If you use
orCode:execute( "start C:\\Windows\\notepad.exe d:\\test.txt" )
orCode:execute( "start" .. " " .. "C:\\Windows\\notepad.exe" .. " " .. "d:\\test.txt" )
Girder will continue to process events while notepad is running.Code:-- assume: -- executable = "C:\\Windows\\notepad.exe" -- parameters = "d:\\test.txt" execute( "start " .. "C:\\Windows\\notepad.exe " .. parameters ) execute( "start " .. executable .. " d:\\test.txt" ) execute( "start " .. executable .. " " .. parameters )
Mark F
Talk about wizz!Thanks, Mark! I only needed this one for now:
And of course it works! :wink: I may find a good use for the parameter versions later, though. I'm about to clean up some home theater code. Thanks again!Code:execute( "start" .. " " .. "C:\\Windows\\notepad.exe" .. " " .. "d:\\test.txt" )
Tor - managing director of the Cinema Inferno home theater and multi-zone sound system with Girder running the show in the back, NetRemote as the GUI and Media Center 17, PowerDVD and ZoomPlayer as playback software
Hobsyssel mastiffs: http://www.hobsyssel.no
Btw should we go even further? Is it possible to execute the file hidden? So I don't see that quick flash of a window when i fire it up. It may disturb what I'm watching on the screen.
Tor - managing director of the Cinema Inferno home theater and multi-zone sound system with Girder running the show in the back, NetRemote as the GUI and Media Center 17, PowerDVD and ZoomPlayer as playback software
Hobsyssel mastiffs: http://www.hobsyssel.no
The LAU execute() command does not support this. However, the Execute command on the Girder OS tab does.
Mark F
Yes, I know. I was trying to tidy up so I didn't have to use two commands for each of these (there are a bunch of them), but as long as that's not possible, I'll have to use the Girder execute for the ones that are supposed to run while I'm watching anything.
Btw I thought it worked with the "'s, but it didn't. The parameter isn't sendt the correct way. The parameter for this program (not notepad) needs to be sendt within "parameter", and I think it only sends it with the first " . Can this be right?
Tor - managing director of the Cinema Inferno home theater and multi-zone sound system with Girder running the show in the back, NetRemote as the GUI and Media Center 17, PowerDVD and ZoomPlayer as playback software
Hobsyssel mastiffs: http://www.hobsyssel.no