Jump to content
The simFlight Network Forums

run external program on a specific offset status ?


Recommended Posts

Hello,

I have a question if this is possible with FSUIPC or LUA script:

If a certain FSUIPC offset is set to 1 an external .cmd file should be executed.

If it is 0 another .cmd file sould be executed on a machine.

The file should be executed on a machine which runs WideFS Client.

I am using FS2004 and the latest FSUIPC module version.

As I am not a programmer, maybe someone can provide me a code where I need to adopt the FSUIPC offset and the external programm that need to be executed.

Is this possible?

Thank you very much with your help.

Mark

Link to comment
Share on other sites

I have a question if this is possible with FSUIPC or LUA script:

If a certain FSUIPC offset is set to 1 an external .cmd file should be executed.

If it is 0 another .cmd file sould be executed on a machine.

The file should be executed on a machine which runs WideFS Client.

Yes. You'd need to detect that change in the FSUIPC offset using the event.offset Lua library function, and when it changes send an appropriate "KeySend" control. The WideClient parameters for that KeySend would by "RunKeyN" (where N is 1 to 8), and a line "RunKeyN=...." would provide the full path and filename of the program or .CMD file to be executed.

Regards

Pete

Link to comment
Share on other sites

Hello Pete,

thanks for you reply.

I have tried the following now:

Assigned in FSUIPC Buttons and Switches section - when the button is pressed hte option "Keysend 1-255 (WideFS)" to 5 and when its released to 6.

In Wideclient.ini I added for testing the following:

RunKey5="C:\Program Files (x86)\ImgBurn\ImgBurn.exe"

RunKey6="C:\Program Files (x86)\FileZilla FTP Client\filezilla.exe"

But nothing happened when the Button was pressed or released.

Maybe I missed something?

Is LUA (which I never made anything before) really required for that?

Thanks again for your help,

Mark

EDIT: Got It now!

RunKey5=C:\Programme\FileZilla FTP Client\filezilla.exe

RunKey6=C:\FSADDONS\Vr Callout\Vr.exe

KeySend5=Runkey5

KeySend6=Runkey6

I found an older thread where the procedure was described.

Link to comment
Share on other sites

EDIT: Got It now!

RunKey5=C:\Programme\FileZilla FTP Client\filezilla.exe

RunKey6=C:\FSADDONS\Vr Callout\Vr.exe

KeySend5=Runkey5

KeySend6=Runkey6

I found an older thread where the procedure was described.

Yes. The 5 and 6 from the KeySend don't relate to the 5 and 6 for your two programs. KeySends can be 1 to 255, but you can only have up to 8 RunKey programs.

Regards

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.