Jump to content
The simFlight Network Forums

Recommended Posts

Posted

Hello all,

I have assigned buttons of a virtual joystick to different camera positions, which already works pretty fine. Now I would like to change camera every 30 seconds through pressing a virtual button. So, I would like to have a script, which presses a certain button, waits 30 seconds, presses the next button, waits 30 seconds again and so on in a loop until a different button is being pressed.

Can this be done with FSUIPC? I downloaded the full version with the trial licence and checked it out. Didn't find a function like this at the first glance. Do I need something else to do this? Is it generally possible to do it? (Don't want to start C programming for this....)

Thanks in advance!

Cheers,

Chris

www.flightsim-adventures.at

Posted
1 minute ago, AUA348 said:

I have assigned buttons of a virtual joystick to different camera positions, which already works pretty fine. Now I would like to change camera every 30 seconds through pressing a virtual button. So, I would like to have a script, which presses a certain button, waits 30 seconds, presses the next button, waits 30 seconds again and so on in a loop until a different button is being pressed.

Can this be done with FSUIPC? I downloaded the full version with the trial licence and checked it out. Didn't find a function like this at the first glance. Do I need something else to do this? Is it generally possible to do it? (Don't want to start C programming for this....)

You can use a lua script. You can use the event.timer library function to call a handling function, in which you can send the control that changes your camera position (i.e. the control or one of the controls that you have assigned to your virtual button) by using the ipc.control function. You can either start the script manually or have it auto-ran from an [Auto] pr profile specific [Auto.xxx] section.

John

Posted

Hi John,

thanks for your fast response! I was hoping that this would have been more common and straight forward, but now I understand, that I kond of have to deep dive into this topic. Scared about it....

Thanks again,

Chris 

Posted

Hi John again,

 

after a quick research I don't think I might be successful with this project. I would literally start from scratch and it would take me ages to scceed. Do you know a platform / person where I could ask someone to do this for me. Editing and customizing scripts once understood is no problem, but doing the script from scratch is a problem. I'm of course willing to pay for this. Any idea?

Thanks,

Chris 

Posted
13 minutes ago, AUA348 said:

after a quick research I don't think I might be successful with this project. I would literally start from scratch and it would take me ages to scceed

It really isn't that difficult, you should just try it. How are your virtual buttons assigned to control the virtual camera positions? You could try activating logging for Events in FSUIPC, press those virtual buttons and see what events are logged. It is then simply a matter of sending those controls in the timer function.

17 minutes ago, AUA348 said:

Do you know a platform / person where I could ask someone to do this for me. Editing and customizing scripts once understood is no problem, but doing the script from scratch is a problem. I'm of course willing to pay for this. Any idea?

No, sorry. But if you activate the event logging as suggested and show me your FSUIPC7.log file, I can provide you with a basic script to send those controls on a timer for you to try.

John

Posted

Hi John,

thanks for your proposal! Indeed, I'm familiar with vba and I principally know how to organize scripts, but if I have literally no starting point in this case. If you would give me a little support and a few hints I might be able to do it!

OK, I have attached the FSUIPC7.log of two camera events in a row and commented it. Within MSFS I have binded it to "ALT+1". In the end I would like to start this script with the press of a button.  

Thanks in advance!

Cheers,

Chris

Posted

First, the next time can you please attach your full FSUIPC7.log and not start a continuation logfile (DO NOT select the New Log menu entry!), and also exit FSUIPC before attaching your log file. There is information at the start and end of the log that I need to see.

5 minutes ago, AUA348 said:

OK, I have attached the FSUIPC7.log of two camera events in a row and commented it.

Did you activate event logging as suggested? I can only see that you have enabled logging for Buttons + Keys, wjich is not what I asked, and I cannot tell if you enabled logging for Events as you only provided a continuation log.

8 minutes ago, AUA348 said:

Within MSFS I have binded it to "ALT+1".

Well, the log shows one (Left) ALT + 1 keypress, but the second keypress is ALT + 2.
What is the complete sequence of keypresses - any more?

Anyway, please try the event logging, as suggested, and show me a full FSUIPC7.log file (you can keep the button _ key logging activated). I would like to see if any events are logged, as I would prefer sending these controls directly. However, if non are logged (which means they are internal events only and not available via SimConnect) then the lua can send the keypresses instead.

11 minutes ago, AUA348 said:

In the end I would like to start this script with the press of a button.  

That should be fine. You probably want to kill the script on a press of a button as well, no? Or do you want it to cycle through the views and then stop (or repeat)?

John

Posted

Hi John,

thanks so much for your kind support in this case! I do appreciate this a lot!! I redid the whole procedure. Logging events has been activated during my first log file. I jus wanted to keep it short. I have attached a log file (FSUIPC7_Keypresses.log), which was created during pressing ALT+1 until ALT+0. Each Keybinding stands for a different camera I want to switch through.

I also created a different log file, which was created while pressing the virtual buttons on the virtual joystick. I will attach it to the next comment, as I'm limited here with 18 kB max. upload. I checked the file, but for me it seems that nothing has been recorded, but while pressing the buttons, the cameras switched. So, the buttons were working.

Cheers,

Chris

Posted

Hi John,

I did this with the software vJoy (https://vjoy.en.softonic.com/). With the help of this tool you can define virtual Joysticks, which normally adds to FS2020 as a selectable device like any other physical joystick . A second tool named "vJoy Feeder" allows for pressing these virtual buttons, which then get recognized normally by FS2020. I assigned the buttons then within FS2020 That's it. Pretty easy and straight forward. Unfortunately it's not possible to script the "vJoy Feeder"

I'm wondering why do you ask? Did this tool something special?

Cheers,

Chris

Posted
2 minutes ago, AUA348 said:

I assigned the buttons then within FS2020
...
I'm wondering why do you ask? 

But what did you assign to within FS2020? I can't see where to assign there to change the view....

Posted

Hi John,

I'm outing me as a complete idiot here. First of all, thanks for your support! I understood the script and got the idea! But I am obviously too dumb to assign it to a button. I copied the lua file into the FSUIPC installation folder and am lost now. I thought I might be able to select it in the dropdown menu, but I didn't find it there. Should I look for the name cycleViews there? 

Cheers,

Chris

 

BTW: I just bought a copy of FSUIPC on simmarket. Shorty after that I found that it was the version 4! I then bought anoher copy of FSUIPC 7, which is registered now 🙂 🙂 But no problem. The tool is absolutely great and such an important piece of software! I see this as a donation to your efforts! 🙂 

Posted
6 minutes ago, AUA348 said:

I'm outing me as a complete idiot here. First of all, thanks for your support! I understood the script and got the idea! But I am obviously too dumb to assign it to a button. I copied the lua file into the FSUIPC installation folder and am lost now. I thought I might be able to select it in the dropdown menu, but I didn't find it there. Should I look for the name cycleViews there? 

It should be there as Lua CycleViews ... (amongst other entries)...

Ah - you just responded and have found it - good!

8 minutes ago, AUA348 said:

BTW: I just bought a copy of FSUIPC on simmarket. Shorty after that I found that it was the version 4! I then bought anoher copy of FSUIPC 7, which is registered now 🙂 🙂 But no problem. The tool is absolutely great and such an important piece of software! I see this as a donation to your efforts! 🙂 

Sorry about that...you should really check before you buy! Your additional donation will go to Pete, as he still is on control and has ownership of FSUIPC4 at the moment.
Thanks for this additional donation!

Regards,

John

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.