lvanoli Posted October 26, 2012 Report Share Posted October 26, 2012 How can I run an external program when loaded a specific airplane? Something like: [Programs.aircraft ] Runif Quote Link to comment Share on other sites More sharing options...
Pete Dowson Posted November 5, 2012 Report Share Posted November 5, 2012 How can I run an external program when loaded a specific airplane? You'd need to write a small (one-line) Lua plug-in to do this, and have it executed by a profile or aircraft-specific [Auto ...] section in the FSUIPC INI. Pete Quote Link to comment Share on other sites More sharing options...
lvanoli Posted November 9, 2012 Author Report Share Posted November 9, 2012 Thanks for the suggestion. I have written the single line program, this is the istruction: handle, error = ext.runif("E:\PROGRA~1\IFLYTO~1.03\IFLYTO~1.EXE") i used long names and short names but the result is always the same: 128139 LUA.0: Global: handle = 0 128155 LUA.0: Global: error = 2 "file not found" is correct? i did copy and paste the text string in widows+r and everything works. Quote Link to comment Share on other sites More sharing options...
Pete Dowson Posted November 10, 2012 Report Share Posted November 10, 2012 handle, error = ext.runif("E:\PROGRA~1\IFLYTO~1.03\IFLYTO~1.EXE") i used long names and short names but the result is always the same: 128139 LUA.0: Global: handle = 0 128155 LUA.0: Global: error = 2 "file not found" is correct? Yes. In strings the \ character is an escape character, so that, for example, \n can be used for "new line". To get a true \ character you need to put \\ each time. Also, I'm not too sure about those 8-char DOS abbreviated names. They may not work in the normal C library API calls which the Lua interpreter is using. Pete Quote Link to comment Share on other sites More sharing options...
lvanoli Posted November 10, 2012 Author Report Share Posted November 10, 2012 Thank Pete, Now all work, also with DOS abbreviated names. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.