lvanoli Posted October 26, 2012 Report Posted October 26, 2012 How can I run an external program when loaded a specific airplane? Something like: [Programs.aircraft ] Runif
Pete Dowson Posted November 5, 2012 Report 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
lvanoli Posted November 9, 2012 Author Report 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.
Pete Dowson Posted November 10, 2012 Report 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
lvanoli Posted November 10, 2012 Author Report Posted November 10, 2012 Thank Pete, Now all work, also with DOS abbreviated names.
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