Primesim Posted October 17, 2019 Report Posted October 17, 2019 Hey guys, I'm trying to get a LUA script to run an external exe program, but it's not working and i'm pretty sure i'm doing something wrong with my extremely limited LUA capabilities. The program is a simple bat file compiled in an EXE that when opened, runs it's few lines of code and closes automatically, so all I want to do is have a button mapped in FSUIPC that calls on this script that uses the ext.run command to run this file. Lua script is as follows; ext.run("c:\panel.exe") I go into FSUIPC, press the button I want and select Lua Panel from the drop down and would guess that's it...but when pressing the button nothing happens. What am I missing?
Primesim Posted October 17, 2019 Author Report Posted October 17, 2019 Disregard, fixed it myself. After a lot of searching, finally figured out it was my syntax and I needed the '\\'.
Pilot1801 Posted February 13, 2020 Report Posted February 13, 2020 Hello, I have got a similar problem - I launched my software from lua file with handle, error= ext.run("C:\\SIOC.exe, "EXT_KILL") Sioc starts successfully. But the Parameter "EXT_KILL" has no effect, i.e. SIOC is not terminated after closing FSX. Maybe there is a mistake in Syntax? I got error =-3. Alternatively, I tried to start sioc directly in fsuipc.ini (last update) via Run command. But this does only work for all aircrafts. I only want to start sioc for PMDG 737 aircrafts. This can only be done for Lua scripts. May be there is another option? Christoph
aua668 Posted February 13, 2020 Report Posted February 13, 2020 Hi, There is a double-quote missing in your command:handle, error= ext.run("C:\\SIOC.exe", "EXT_KILL"). Rgds Reinhard
Pilot1801 Posted February 13, 2020 Report Posted February 13, 2020 Hello Reinhard, thank you for quick answering. I am sorry, but this was only a copy and paste error in my post. In my lua script it is correct. There is still the problem with the EXT_KILL parameter. sioc is not terminated after fsx is shut down. Regards Christoph
spokes2112 Posted February 14, 2020 Report Posted February 14, 2020 Just a hunch, Shouldn't this be - handle, error= ext.run("C:\\SIOC.exe", EXT_CLOSE) The second optional parameter is a string for command line options, after that one could have up to 4 more options, but they do not seem to be strings. You really shouldn't use EXT_KILL unless EXT_CLOSE doesn't work.. SIOC might not like a forced close, IE time to write saved settings and the like. Roman
Pilot1801 Posted February 14, 2020 Report Posted February 14, 2020 Hi Roman, That's it! Thank you so much. Christoph 1
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now