Jump to content
The simFlight Network Forums

new to Lua


Recommended Posts

dear Pete,

I have been trying to use Lua for some time but no luck so far.

first: If I use Fsuipc and assign 69751 to costum control with param 2 to joystick 1, button 2 it works fine.

so i made a lua file name NGX_buttons.

fsuipc.ini = [start]

1=NGX_buttons

the file contains.

if ipc.testbutton(1,2) == true then

ipc.control(69751,2)

end

nothing happens. I'm undoubtedly missing something and i hope you can help out.

regards,

henri

Link to comment
Share on other sites

i made a lua file name NGX_buttons.

fsuipc.ini = [start]

1=NGX_buttons

Sorry, but what is this part about. are you creating a new section in FSUIPC.INI called [start]? Why? Where do you get this from?

the file contains.

if ipc.testbutton(1,2) == true then

ipc.control(69751,2)

end

nothing happens.

Well, if you don't run the Lua plug-in, I'm not surprised.

Also if the file only contains those two lines, as just written, it will run when it is started and probably not find the button pressed so do nothing and end. Once it finishes doing what you ask it is finished, done, gone. The only way a Lua plug-in stays running is if there's a loop keeping it so, or it establishes events to act upon -- in the latter case it suspends itself till the next such event.

I've no idea why you would ever want a plug-in to do something so basic in any case, when you can do it by direct assignment.

You seem to be suffereing from several misunderstandings. If you want to mess with Lua why not first study some of the examples provided with FSUIPC, and those contributed by others in the User Contributions subforum?

Regards

Pete

Link to comment
Share on other sites

Thnx Pete,

Sorry I know it should be [auto] as new section in fsuipc.ini file.

Sure I'll try it with a loop or event.

Just trying to practice and understand how things are working.

Got it working. Thats what i needed to focus again.

Thnx a lot,

henri

Link to comment
Share on other sites

hello Pete

i have bought and registered the fsuipc, since then i am having problems.

1. whenever i use my saitek autopilot, it is not allowing me to use it.

2. my saitek radio is not functioning well, whenever i put in a frequency lets say in COM1, COM2 changes to that frequency also.

3. samething to the NAV1 and NAV2.

please help me out as i am really worried about this matter.

regards

Link to comment
Share on other sites

but my saitek devices were working perfectly before i installed fsuipc.

would you know at least what can be the problem?

Saitek use FSUIPC3 on FS9 and before without any license or permission, so I'm rather loathe to support anything to do with them. They simply refused to pay the agreed license fee.

However, if the Saitek devices work when you are unregistered in FSUIPC (i.e. if you temporarily remove the FSUIPC.KEY file), but don't when you are registered, then FSUIPC thinks your FSUIPC key is wrong -- illegal or pirated. It might do this, though, if it is simply that your PC has a date set which is before your registration purchase date.

Also, it may simply be that you are using an old version of FSUIPC. if you purchased your registration this year you mst use 3.999z or later. I cannot support any older versions in any case.

Pete

Link to comment
Share on other sites

hello again,

i appreciate your prompt replies.

my version of fsuipc is fsuipc4 4.86 thats the latest one you have on the site.

thats what i installed and then registered 2-3 days afterwards.

is there anyway i can fix this? i have also wrote to saitek, waiting for a reply, its really frustrating as my whole system is useless, i cant use my autopilot,trim tab,and radio controls.

regards

Link to comment
Share on other sites

my version of fsuipc is fsuipc4 4.86 thats the latest one you have on the site.

thats what i installed and then registered 2-3 days afterwards.

FSUIPC4? FSX? You never mentioned this! Saitek devices do not use FSUIPC on FSX, only on FS9!

I suspect your problems lie elsewhere -- maybe you've not installed the Saitek drivers? I think your finding that the devices worked before you installed FSUIPC to have been misleading you.

Remember I said "if the Saitek devices work when you are unregistered in FSUIPC (i.e. if you temporarily remove the FSUIPC.KEY file) ...". did you test that idea at all?

If you want me to check your FSUIPC installation, please show me the FSUIPC4 Log file -- paste it in a message here. Make sure you close FS first.

Pete

Link to comment
Share on other sites

ok so i deleted the .key file, and then tried again, it still is doing the same thing.

this below is the logfile, if i am not mistaken, sorry i am not a technical guy.

********* FSUIPC4, Version 4.86 by Pete Dowson *********

Running inside FSX on Windows 7

Module base=666F0000

User Name=""

User Addr=""

FSUIPC4 not user registered

WIDEFS7 not user registered, or expired

452 System time = 30/04/2013 09:43:16

452 FLT path = "C:\Users\hovig\Documents\Flight Simulator X Files\"

515 Trying to connect to SimConnect Acc/SP2 Oct07 ...

515 FS path = "C:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\"

952 LogOptions=00000000 00000001

952 SIM1 Frictions access gained

952 Wind smoothing fix is fully installed

952 G3D.DLL fix attempt installed ok

952 SimConnect_Open succeeded: waiting to check version okay

952 Trying to use SimConnect Acc/SP2 Oct07

3198 Running in "Microsoft Flight Simulator X", Version: 10.0.61472.0 (SimConnect: 10.0.61259.0)

3198 Initialising SimConnect data requests now

3198 FSUIPC Menu entry added

3245 c:\users\hovig\documents\flight simulator x files\CaPtNhOvIGs.FLT

3245 C:\Users\hovig\Documents\Flight Simulator X Files\IFR Montreal Pierre-Elliott-Trudea to Ottawa Macdonald-Cartier Intl.PLN

3245 C:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\SimObjects\Airplanes\Lear45\Lear45.AIR

3245 C:\Users\hovig\Documents\Flight Simulator X Files\IFR Montreal Pierre-Elliott-Trudea to Ottawa Macdonald-Cartier Intl.PLN

24710 System time = 30/04/2013 09:43:41, Simulator time = 09:43:21 (08:43Z)

24773 Starting everything now ...

26083 Advanced Weather Interface Enabled

140697 Sim stopped: average frame rate for last 116 secs = 19.8 fps

331346 Sim stopped: average frame rate for last 178 secs = 19.8 fps

349473 C:\Users\hovig\Documents\Flight Simulator X Files\IFR Montreal Pierre-Elliott-Trudea to Ottawa Macdonald-Cartier Intl.PLN

349473 Weather Mode now = Real World

349473 C:\Users\hovig\AppData\Roaming\Microsoft\FSX\Previous flight.FLT

356135 System time = 30/04/2013 09:49:12, Simulator time = 09:43:19 (08:43Z)

356135 *** FSUIPC log file being closed

Average frame rate for running time of 296 secs = 19.8 fps

G3D fix: Passes 9090, Null pointers 0, Bad pointers 0, Separate instances 0

Memory managed: 139 Allocs, 139 Freed

********* FSUIPC Log file closed ***********

Link to comment
Share on other sites

and this is the installation log

Installer for FSUIPC4.DLL version 4.86

Looking in registry for FSX install path:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft Games\Flight Simulator\10.0

Parameter"SetupPath"

... >>> OK! FOUND FSX! <<< ...

Looking in registry for ESP install path:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft ESP\1.0

Parameter"SetupPath"

Not there, so looking in:

HKEY_CURRENT_USER\ESP

Parameter"AppPath"

... NOT found! ...

Looking in registry for Prepar3D install path:

HKEY_LOCAL_MACHINE\SOFTWARE\LockheedMartin\Prepar3D

Parameter"SetupPath"

Not there, so looking in:

HKEY_CURRENT_USER\Prepar3D

Parameter"AppPath"

... NOT found! ...

===========================================================

INSTALLATION FOR FSX:

SetupPath="C:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\"

Checking version of FSX.EXE:

... Version 10.0.61472.0 (Need at least 10.0.60905.0)

Checking compatibility with installed SimConnect:

Found SimConnect build 60905 (Original)

Found SimConnect build 61242 (SP1 May07)

Found SimConnect build 61259 (Acc/SP2 Oct07)

Checking if there's already a version of FSUIPC4 installed in:

C:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\FSUIPC4.DLL

... Version 4.860 found.

FSX Modules folder already exists.

Okay -- installed FSUIPC4 into "C:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\FSUIPC4.DLL"

Looking for the current user's Application Data path:

... found as "C:\Users\hovig\AppData\Roaming"

Now finding \Microsoft\FSX\FSX.CFG for all users, including this one

Looking in "C:\Users\hovig\.pc_galk\Roaming"

... No FSX.CFG there

Looking in "C:\Users\hovig\Adobe\Roaming"

... No FSX.CFG there

Looking in "C:\Users\hovig\AppData\Roaming"

Found FSX.CFG in "C:\Users\hovig\AppData\Roaming\Microsoft\FSX\FSX.CFG"

Now checking DLL.XML ...

... There is a previous DLL.XML, checking for FSUIPC4 section.

... FSUIPC4 section already exists but will be replaced.

(for FSUIPC4, without Loader)

... FSUIPC4 section of DLL.XML written okay

Now checking for a SimConnect.XML file ...

... There is a SimConnect.XML, checking for "local" section.

... "local" section already exists, file not modified.

Looking in "C:\Users\hovig\Application Data\Roaming"

... No FSX.CFG there

Looking in "C:\Users\hovig\Contacts\Roaming"

... No FSX.CFG there

Looking in "C:\Users\hovig\Cookies\Roaming"

... No FSX.CFG there

Looking in "C:\Users\hovig\Creative Suite 5.5 Design Premium\Roaming"

... No FSX.CFG there

Looking in "C:\Users\hovig\Desktop\Roaming"

... No FSX.CFG there

Looking in "C:\Users\hovig\Documents\Roaming"

... No FSX.CFG there

Looking in "C:\Users\hovig\Downloads\Roaming"

... No FSX.CFG there

Looking in "C:\Users\hovig\Favorites\Roaming"

... No FSX.CFG there

Looking in "C:\Users\hovig\Links\Roaming"

... No FSX.CFG there

Looking in "C:\Users\hovig\Local Settings\Roaming"

... No FSX.CFG there

Looking in "C:\Users\hovig\Music\Roaming"

... No FSX.CFG there

Looking in "C:\Users\hovig\My Documents\Roaming"

... No FSX.CFG there

Looking in "C:\Users\hovig\NetHood\Roaming"

... No FSX.CFG there

Looking in "C:\Users\hovig\Phtoshop\Roaming"

... No FSX.CFG there

Looking in "C:\Users\hovig\Pictures\Roaming"

... No FSX.CFG there

Looking in "C:\Users\hovig\PrintHood\Roaming"

... No FSX.CFG there

Looking in "C:\Users\hovig\Recent\Roaming"

... No FSX.CFG there

Looking in "C:\Users\hovig\Saved Games\Roaming"

... No FSX.CFG there

Looking in "C:\Users\hovig\Searches\Roaming"

... No FSX.CFG there

Looking in "C:\Users\hovig\SendTo\Roaming"

... No FSX.CFG there

Looking in "C:\Users\hovig\Start Menu\Roaming"

... No FSX.CFG there

Looking in "C:\Users\hovig\Templates\Roaming"

... No FSX.CFG there

Looking in "C:\Users\hovig\Tracing\Roaming"

... No FSX.CFG there

Looking in "C:\Users\hovig\Videos\Roaming"

... No FSX.CFG there

"Modules\FSUIPC Documents" folder already exists.

Now installing additional files into the "Modules\FSUIPC Documents" folder:

Installed "FSUIPC4 User Guide.pdf" okay

Installed "FSUIPC4 for Advanced Users.pdf" okay

Installed "FSUIPC4 History.pdf" okay

Installed "List of FSX controls.pdf" okay

Installed "GlobalSign Root.exe" okay

Installed "FSUIPC Lua Library.pdf" okay

Installed "FSUIPC Lua Plug-Ins.pdf" okay

Installed "Lua License.pdf" okay

Installed "Lua Plugins for VRInsight Devices.pdf" okay

Installed "LuaFileSystem.pdf" okay

Installed "Example LUA plugins.zip" okay

Installed "Offset Mapping for PMDG 737NGX.pdf" okay

Installed "FSUIPC4 Offsets Status.pdf" okay

FSUIPC4.DLL installed and signature checked out okay!

Deleted GlobalSign Root fix program ... no longer relevant

===========================================================

All installer tasks completed.

Registration for FSUIPC4 was successful! (result code 00)

*************** End of Install Log ***************

Link to comment
Share on other sites

ok so i deleted the .key file, and then tried again, it still is doing the same thing.

this below is the logfile,

Okay, that shows that FSUIPC is running fine, and the fact that you get the same problem whether registered or not shows it is definitely a problem with the Saitek software. Is it actually running? Do they use an EXE program or a DLL do you know? If they need something loaded and run by SimConnect then possibly you have a corrupted EXE.XML or DLL.XML file. I'm afraid there's no way I can help without more information, and as it now definitely appears it is nothing to do with my program, I think you need to get Saitek support on the job.

Regards

Pete

Link to comment
Share on other sites

  • 2 weeks later...

i just unistalled fsuipc completely.

All you needed to do was rename the DLL to, sa,y DLX, so it doesn't load.

what do i do now?

What do you want to do? If you want to use FSUIPC you'll need to install it.

Without Regstration FSUIPC doesn't touch any devices whatsoever.

Regards

Pete

Link to comment
Share on other sites

sorry i keep on persuing this problem.

but i still dont understand how it cant be fsuipc when im uninstalling the program and everything is working fine.

i install it, and everyting is just a big mess.

If FSUIPC is not registered, and there are no programs using its application interface, then it doesn't do anything.

Sorry, but you simply must look elsewhere. If it only happens when FSUIPC is installed then you have something else installed which is using FSUIPC and therefore only does whatever it does when FSUIPC is installed. If you don't know what you have installed I think you will simply have to resort to uninstalling FS and starting again. There's no way I can see your system from here and work out what you've done.

BTW since it isn't doing anything, why on Earth are you installing it in any case? You presumsbly MUST have something using it!

Pete

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.