Jump to content
The simFlight Network Forums

mustangsim

Members
  • Posts

    6
  • Joined

  • Last visited

Profile Information

  • Gender
    Male
  • Location
    usa

mustangsim's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Hi All, I am trying to write a LUA script to to use Joy inputs to control the volume on my Mustangs audio panel in FSX. Here is the snippet of code from the xml <MouseArea id="VolumeControl"> <FloatPosition>34.000,794.000</FloatPosition> <Size>113,104</Size> - <MouseArea id="VolumeDecrease"> <FloatPosition>0.000,0.000</FloatPosition> <Size>56,104</Size> <CursorType>DownArrow</CursorType> - <MouseClick id="MouseClick"> <Script>9 (>K:THROTTLE4_SET)</Script> <ClickType>LeftSingle</ClickType> </MouseClick> - <Tooltip id="Tooltip"> <DefaultScript>Music Volume Decrease (%((L:fuckyoaudio,numbers))%!d!%%)</DefaultScript> [/CODE] Since this writes to K: and not an L: i'm not sure how to do it. <Script>9 (>K:THROTTLE4_SET)</Script> will decrease and <Script>8 (>K:THROTTLE4_SET)</Script> will Increase it Can LUA send this command? Mouse Macro couldn't do it. Maybe use the Mouse ID area shown above in the code? Not sure if it works that way. Thanks, Rob
  2. ipc.readLvar("L:G1000ComPushPFD") if (ipc.readLvar("L:G1000ComPushPFD") == 0) ipc.writeLvar("L:G1000ComPushPFD",1) else if (ipc.readLvar("L:G1000ComPushPFD") == 1) ipc.writeLvar("L:G1000ComPushPFD",0) end end [/sub] [sub] [/sub] [sub] [/sub] [sub][/CODE][/sub] [sub]That is my code i tried which runs when I hit shift+tab+c on my keyboard I have that keyprees assigned to run the above LUA named ComPushed It doesn't work and i'm not sure why.[/sub] [sub] ipc.writeLvar("L:G1000ComPushPFD",1) or ipc.writeLvar("L:G1000ComPushPFD",0) by themselves in the lua work fine. This is tied to a push button in my sim on the G1000 hardware that generates a keystroke input to fsuipc.[/sub] [sub]Thanks,[/sub] [sub]Rob[/sub]
  3. I have an Lvar that needs to be triggered via a single push button and do the following, If it's a 0 then when I push the button it needs to change to a 1, and if it's 1 and I push the button it needs to change to 0. It is the ComPush button on the G1000 and it switches the radio from com1 to com2 and vice versa for tuning with one push. The Lvar is L:G1000ComPushPFD I am using my button mapped in fsuipc as a keysend. Can a LUA do this, check the current status of the Lvar and toggle it with every push of my hardware button that is sending a key press? Hope that all makes sense. Thanks, Rob
  4. Thanks Pete. I did indeed find the dll there as well as on my PC for the polabs software. Now I need to figure out where it needs to go. Main FSX folder, Lua Folder within the fsx\modules folder?? I'm going to order the book on LUA programming to get better at this. Also, I noticed LUA 5.2 is out. Not sure if there would be any advantage to upgrading from 5.1? Thanks, Rob
  5. If anyone knows where I can get it I would appreciate it. Google search just gets me a bunch of software that wants to fix my PC.lol
  6. I'm trying to run the Pokeys LUA script written by Terry Hall from user contributions section. I keep getting this failure, and am lost as to why or what im missing. Any ideas? Thanks Error: Unable to create PoKeysDevice_DLL object
×
×
  • 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.