lancairmiller
-
Posts
9 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Gallery
Downloads
Posts posted by lancairmiller
-
-
Does one have to have the registered vers. of FSUIPC. to use lua plugins?
I developed a routine for the club I'm in but not everyone has the registered ver.
Mark
-
Pete,
However, as a matter of convenience, you might want to retain the Lua as a separate file, and only put a call into an ipcReady.lua file to start it. Then, if you have other Lua actions to add later, you can keep them separate (better as they all run in their own threads, and easier to keep track of and debug etc).To do this simply use the ipc.macro() facility. i.e. in an ipcReady.lua file just have a line like this:
ipc.macro("Lua xxxxx") where "xxxxx" is the name of your Lua file (without the .lua part).
Super idea, Thanks again for your help.
Mark
-
Pete,
Thank you for the quick response.
I come from a VB background and it looks like Lua is a bit different.
See if I understand this correctly.
If I put this code in file Ipcready.lua, it will process the code when
the flight sim is ready to fly. Once it code is processed the function is created and the event
is created and is ready to use. Once the event is created I don't have to create a loop to
rescan it at given intervals.
Thanks again,
Mark
-
while 1 do event.key(122,0,"fnident") ipc.sleep(20) end
The log shows 122 as the keypressed.
What am I doing wrong?
The problem is that the section shown stops the program ever exiting. It loops forever continually adding the function "fnident" as a routine to be called whenever keypress 122,0 occurs. It would be eating up your memory at the rate of something like 16 bytes per 20 mSecs until it crashed FS, eventually (it might take a long long time, though).
Nothing will ever call "fnident" because when the event occurs (i.e. you press the key), the Lua program is already running and the "fnident" function is not directly accessible.
It seems that you are mixing up two different ways of programming Lua for FSUIPC.
One is to have the program looping, testing something at intervals, as in:
while 1 do if then end ipc.sleep(20) end
This loops, never ending, and checks on some condition at intervals.
That is not the best way for many things, especially if the thing you are waiting for is a rare occurrence. Better by far is the Event system, in which your program merely tells FSUIPC what it wants it to monitor and what to call if it occurs, then ends. In your case, simply this:
event.key(122,0,"fnident")
In other words, just replace your entire while loop with the event.key call only.
Regards
Pete
-
I'm writing a VB6 program and connecting to FSX via fsuipc. Is there an offset assigned to "MP voice capture start" and
"MP broadcast voice capture stop"
No. In general there aren't offsets for many controls -- even where there are, in most cases they simply cause FSUIPC to send the control for you. However, you can send any control you like, using its numerical equivalent (see the controls list in your FSX Modules folder), via offset 3110.
Regards
Pete
Pete,
Worked great. Thanks for your help.
-
Thanks for the quick response. In the FSX Setting- controls it is listed as Transmit voice start and transmit voice stop.
The chat window make active is also listed under the multiplayer catergory.
If it is assignable in FSX you could assign your buttons to it in FSX!
If is it so assignable, it will be one of those FS controls I mentioned. If you enable Event logging in FSUIPC's Logging tab, then operate those actions, you should find the correct FS control name logged in FSUIPC's Log. then you can assign them directly in FSUIPC.
But I would have thought the names would be obviouslike, perhaps, MP voice capture start and MP voice capture stop or maybe the other pair listed, MP broadcast voice capture start and MP broadcast voice capture stop? Why not just try them?
Regards
Pete
I'm writing a VB6 program and connecting to FSX via fsuipc. Is there an offset assigned to "MP voice capture start" and
"MP broadcast voice capture stop" I did not see one in the offset list I have. I may have overlooked it.
Thanks again
Mark
-
Thanks for the quick response. In the FSX Setting- controls it is listed as Transmit voice start and transmit voice stop.
The chat window make active is also listed under the multiplayer catergory.
-
Pete,
Great program, I've created a few programs now with VB6 with much success.
I've been given a project that will require my app to use a key press to key the mic in FSX.
When my app has focus(window active) the key strokes are not sent to FSX. If the user has
assigned a button on a joystick or yoke is works OK.
Is there anyway to send the transmit command to FSX via fsuipc?
Thanks,
Mark
Lua program help
in FSUIPC Support Pete Dowson Modules
Posted
Does one have to have the registered vers. of FSUIPC. to use lua plugins?
I developed a routine for the club I'm in but not everyone has the registered ver.