AK Mongo Posted November 2, 2010 Report Posted November 2, 2010 My apologies if this question has been asked and answered elsewhere. Is there a way to make the GFpower lua run automatically when the default flight in FSX is loaded? I found how to assign a spare key to it, and when pressed it works perfectly. Is there a simple way to run it without pressing a key? Thanks in advance for your assistance. Reid
Pete Dowson Posted November 2, 2010 Report Posted November 2, 2010 Is there a way to make the GFpower lua run automatically when the default flight in FSX is loaded? As documented in the Lua documentation (see the FSUIPC documents folder inside your FS Modules folder), the Lua files automatically loaded are ipcInit.lua, which is run right at the beginning of FS, before anything is loaded, and ipcReady.lua which is run when FS is ready to fly. Use the latter. You can either rename your file to ipcReady.lua, or, probably better for future expansion, have an ipcReady.lua file which runs any others you wish, via one statement for each like: ipc.runlua("GFpower.lua") Pete
AK Mongo Posted November 3, 2010 Author Report Posted November 3, 2010 As documented in the Lua documentation (see the FSUIPC documents folder inside your FS Modules folder), the Lua files automatically loaded are ipcInit.lua, which is run right at the beginning of FS, before anything is loaded, and ipcReady.lua which is run when FS is ready to fly. Use the latter. You can either rename your file to ipcReady.lua, or, probably better for future expansion, have an ipcReady.lua file which runs any others you wish, via one statement for each like: ipc.runlua("GFpower.lua") Pete Pete, Thanks for your quick response. I renamed the GFpower.lua file in the modules folder. I changed it to ipcReady.lua and it failed to work--then I dropped the .lua from the name and it worked great. Just wanted to document that here, so someone else can search the answer out and not bother you with it. Would the ipc.runlua("GFpower.lua") statement be the only line in the file named ipcReady.lua if I wanted to do it your recommended way in the future? If so, would that be the exact syntax I would use for that function, and how would I add more lua scripts? Sorry to be a pain, programming is something I have not done any of since a 20 line BASIC program in an intro to computer science class.
Pete Dowson Posted November 3, 2010 Report Posted November 3, 2010 I changed it to ipcReady.lua and it failed to work--then I dropped the .lua from the name and it worked great. Just wanted to document that here, so someone else can search the answer out and not bother you with it. something is very seriously wrong on your system if FSUIPC managed to locate and load a Lua program without the "lua" filetype. It sounds like you have Windows hiding filetypes from you or something. FSUIPC searches for All *.Lua files, it will not see any others as Lua. Would the ipc.runlua("GFpower.lua") statement be the only line in the file named ipcReady.lua if I wanted to do it your recommended way in the future? Yres, as I said. You could add other RunLua lines to it if you wanted more Lua programs automatically running in future. If so, would that be the exact syntax I would use for that function, and how would I add more lua scripts? The exact syntax was exactly as I told you, and i also told you that you could add similar lines! It seems you did not really read my reply! I repeat the relevant part here: ... have an ipcReady.lua file which runs any others you wish, via one statement for each like: ipc.runlua("GFpower.lua") Sorry to be a pain, programming is something I have not done any of since a 20 line BASIC program in an intro to computer science class. It's not exactly "programming" to make a file with one line in it copied from a message as I showed! :-( Pete
AK Mongo Posted November 3, 2010 Author Report Posted November 3, 2010 something is very seriously wrong on your system if FSUIPC managed to locate and load a Lua program without the "lua" filetype. It sounds like you have Windows hiding filetypes from you or something. FSUIPC searches for All *.Lua files, it will not see any others as Lua. Yres, as I said. You could add other RunLua lines to it if you wanted more Lua programs automatically running in future. The exact syntax was exactly as I told you, and i also told you that you could add similar lines! It seems you did not really read my reply! I repeat the relevant part here: ... have an ipcReady.lua file which runs any others you wish, via one statement for each like: ipc.runlua("GFpower.lua") It's not exactly "programming" to make a file with one line in it copied from a message as I showed! :-( Pete Pete, I assure you I read your reply. Not understanding what your reply was saying is why I asked for clarification. It is very frustrating as someone trying to learn from scratch how FSUIPC works, to read all of the documentation you have provided, still have questions and be afraid to ask them of you for fear of being berated. I have been working on this problem for literally months and exhausted all of my other options before asking you. http://www.mycockpit.org/forums/showthread.php/19980-Goflight-Cold-and-Dark?highlight=cold+and+dark Sorry to have been such a nuisance, you obviously do not suffer fools gladly, and I am an unsufferable fool.
Pete Dowson Posted November 3, 2010 Report Posted November 3, 2010 I assure you I read your reply. Not understanding what your reply was saying is why I asked for clarification. there wasn't much to understand, just make one file with one line in it, exactly as shown and stated. It is very frustrating as someone trying to learn from scratch how FSUIPC works, to read all of the documentation you have provided, still have questions and be afraid to ask them of you for fear of being berated. I really don't know how much more I could possibly have done as well as telling you EXACTLY what to put in the file! how on Earth would you suggest i word it? I don't understand where you are coming from at all! Sorry to have been such a nuisance, you obviously do not suffer fools gladly, and I am an unsufferable fool. No comment. ;-) Pete
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