Jump to content
The simFlight Network Forums

Auto Lua Execution


Recommended Posts

Hi,

I'm trying to run a Lua automatically without key press.
The lua name is 737AutoOps, the ini file looks like this:

[LuaFiles]
1=737AutoOps

[Auto]
1=Lua 737AutoOps

and the lua file script:

function ATRST ()
    var = ipc.readSW(0x088C)
    if var < 1390 then
    ipc.macro("737NGXU:ATRST")
end

event.timer(500, "ATRST")

I want to run a macro file (which works ok if assigned to a key) when thrust levers are less than 1390.
I don't know what I'm missing here.

Thanks in advance.

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • 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.