Jump to content
The simFlight Network Forums

Recommended Posts

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;


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?

Share this post

Link to post
Share on other sites

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?


Share this post

Link to post
Share on other sites


There is a double-quote missing in your command:
handle, error= ext.run("C:\\SIOC.exe", "EXT_KILL").


Share this post

Link to post
Share on other sites

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


Share this post

Link to post
Share on other sites

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.


Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...

Important Information

By using this site, you agree to our Terms of Use. Guidelines Privacy Policy We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.