Jump to content
The simFlight Network Forums

Run programs from button screen


Recommended Posts

I am still trying to make my system mouse and keyboardless but have run into a problem.

Sometimes when I load Wideclient I want either GA Panel (if I'm flying GA) and sometimes VASfmc (if I'm flying heavies), and sometimes Flight Sim Commander with FDC Live cockpit, or Plan G- again dependant on what I'm flying.

The only way I can see to do this without a mouse/keyboard is to, somehow if poss, use the touch screen and Button Screem facility to do it. I cant' just use the touch screen and touch the relevant program icons as the Button Screen covers the whole screen when it is running. There are also parts of the screen behind the MIP ( including the task bar at the bottom), just to make it even more awkward!

Also both GA panel and VASfmc are set for "always on top" so that the button screen appears round the outside of whichever one is in use, covering or revealing different buttons depending on the mode.

I would also like to be able to start programs on the FSX machine from the Button Screen if possible.

Any Suggestions?

Den

Link to comment
Share on other sites

The only way I can see to do this without a mouse/keyboard is to, somehow if poss, use the touch screen and Button Screem facility to do it. I cant' just use the touch screen and touch the relevant program icons as the Button Screen covers the whole screen when it is running. There are also parts of the screen behind the MIP ( including the task bar at the bottom), just to make it even more awkward!

The WideClient button screen only ever occupies the WideClient window. you can size it and position it as you like, to share the screen as you like too. It sounds like you have maximised the WideClient window. simple restore it and size it to suit!

Pete

Link to comment
Share on other sites

It's true that the wideclient window fills the screen, but I need it to because the 2 instrument programs cover stratregic parts of the window whist leaving other parts clear for the buttons to show depending on what type of plane I am using.

There are buttons all round the instrument clusters and reducing the size of the wideclient window would not work as these buttons would be hidden.

Den

Link to comment
Share on other sites

It's true that the wideclient window fills the screen, but I need it to because the 2 instrument programs cover stratregic parts of the window whist leaving other parts clear for the buttons to show depending on what type of plane I am using.

There are buttons all round the instrument clusters and reducing the size of the wideclient window would not work as these buttons would be hidden.Den

Sorry, I really do not understand. The WideClient screen occupies whatever size window you size it to. If you maximise it, of course it occupies the whole screen, just like any other program! so why are you doing that?

You can make the WideClient button screen occupy any part of your screen you like. What else can you expect? WideClient cannot magic screen space out of nothing. I do not understand what you are expecting of it! If you have no space for it you cannot use it --- is that not blindingly obvious?

Pete

Link to comment
Share on other sites

What is blindingly obvious is that I have not explained myself very clearly, judging by your reply.

The button screen can only be rectangular in shape. I have buttons down the sides and along the bottom of the instrument panel. These go from top to bottom and right across the width of the screen at the bottom. In order to do this the button screen window has to fill the whole screen. This forms the base layer of the system.

The instruments are then displayed on the remainder of the screen over the top of part of the wideclient window using an "always on top" property. This forms the 2nd layer and occupies roughly the top right three quarters of the screen with the buttons arranged down the side and along the bottom.

There is then an instrument panel fascia, with appropriate cut outs, covering the display to form the MIP. This works very well, except for the fact that I need to use the keyboard and mouse to setup and alter things, depending on what tytpe of aircraft.

What I want to do is get rid of the keyboards and mice, the plan is to add 1, maybe 2, more pcs to the network and there just isn't room for 4 keyboards and mice. This is why I am looking for another way to start and stop programs without using a mouse.

Hope this clarifies things better.

Den

Link to comment
Share on other sites

What is blindingly obvious is that I have not explained myself very clearly, judging by your reply.

Sorry.

What I want to do is get rid of the keyboards and mice, the plan is to add 1, maybe 2, more pcs to the network and there just isn't room for 4 keyboards and mice. This is why I am looking for another way to start and stop programs without using a mouse.

Ahjust use the "RunKey" and "CloseKey" options in WideClient.INI, programming buttons (whether real or from the button screen) in FSUIPC to send the appropriate "KeySend" values.

Regards

Pete

Link to comment
Share on other sites

You can use one mouse and keyboard across many computers with something called "Input Director" best of all it's free too. You literally move your mouse off the edge of the screen and then it automatically appears on the next computer across the network and then controls it till you move the mouse pointer back again. It acts a bit like an extended desktop, its very clever.

Link to comment
Share on other sites

Pete

Got the RunKey parameter to work a treat. Having problems with the CloseKey parameter though, and I'm guessing it is something to do with your comments about Class names, so its back to Google to see if I can find them for GAPanel, VASfmc and Flight Sim Commander.

Andydigital

Thanks for the link to Input Director.

I already use TightVNC when I need to do any maintenance on the instrument pc- since the screens are covered with a template with various cut-outs for the instruments. That makes it very difficult to to use the screen in "pc mode" rather than "instrument mode" as the cursor tend to dissapear behind the solid bits of the overlay.

TightVNC lets me use the laptop screen to view the instrument pc's screen on the laptop and- Hey Presto no overlay to hide the cursor!

Den

Link to comment
Share on other sites

Pete

Got the RunKey parameter to work a treat. Having problems with the CloseKey parameter though, and I'm guessing it is something to do with your comments about Class names, so its back to Google to see if I can find them for GAPanel, VASfmc and Flight Sim Commander.

You should need any Class names -- if WideClient creates the process (i.e. runs the program) then it has a Process Id for that process, so it can Close it directly. Just use:

RunKey1=

CloseKey1=Yes

KeySend1=RunKey1

KeySend2=CloseKey1

where of course you change the 1's and 2's to suit your configuration. There's no place to put a "classnname" -- that's only used to send keypresses to programs you've not started in the INI file. THat doesn't apply at all here.

If they won't close with "CloseKey1=Yes" try "CloseKey1=Kill". That forces closing in the same way as Windows task manager does, without tidying up the program.

Pete

Link to comment
Share on other sites

Now got the Closekey to work with everything except FDC Live Cockpit, even the Kill parameter will not work with this program.

Another odd thing is that VASfmc, when closed in the normal way using the Window "X" button on the VASfmc window, will remember which sub-windows were open, their window sizes and positions . Then when it is re-opened all the windows which were open on it's last run then re-open in the remembered places. However when it is closed down with the CloseKey=Yes option it does not, it only opens the main window on it's next run. When the sub-windows are opened in the normal way from the main window it has remembered position and size though. Do you know of any reason for this?

BTW when I was Googling yesterday I found a free program "Active Window" on Source forge Net which displays the class name of all open windows on the pc. ( Yes I know it isn't needed now, but I hadn't read your last post before I found it!) A useful little freebie if anyone need to know the class names though.

Den

Link to comment
Share on other sites

Now got the Closekey to work with everything except FDC Live Cockpit, even the Kill parameter will not work with this program.

So I assume even Task manager won't get rid of it? I've known some awkward programs like that. I don't know how they do it!

Another odd thing is that VASfmc, when closed in the normal way using the Window "X" button on the VASfmc window, will remember which sub-windows were open, their window sizes and positions . Then when it is re-opened all the windows which were open on it's last run then re-open in the remembered places. However when it is closed down with the CloseKey=Yes option it does not, it only opens the main window on it's next run. When the sub-windows are opened in the normal way from the main window it has remembered position and size though. Do you know of any reason for this?

All that happens with CloseKey=Yes is that FSUIPC will send a "WM_CLOSE" message to the topmost window of the process. Maybe it's topmost window isn't processing the messages in the same way, and the window you normally click X on is not that window. However, Windows itself normally sends a WM_CLOSE to each child Window in turn, so it is odd. Maybe the top-level window explicitly clears or sets some values which the lower ones check and thereby do some different actions.

There's really no easy way I can make an automated process for programs which do such things. There's no way possible to automatically determine the Window which is processing the WM_CLOSE the way you want. Assuming the top-most window does work with 99% of programs though.

BTW when I was Googling yesterday I found a free program "Active Window" on Source forge Net which displays the class name of all open windows on the pc. ( Yes I know it isn't needed now, but I hadn't read your last post before I found it!) A useful little freebie if anyone need to know the class names though.

Well, maybe -- just maybe -- I could add an option to the Close facilities to send the WM_CLOSE to the window in the Process with a given ClassName. When you use the utility on VASfmc does it give you different classnames for each window, and if so would you be able to tell which one you close with your 'X'?

Regards

Pete

Link to comment
Share on other sites

So I assume even Task manager won't get rid of it? I've known some awkward programs like that. I don't know how they do it!

That's another strange thing, Task Manager does get rid of it!

When you use the utility on VASfmc does it give you different classnames for each window, and if so would you be able to tell which one you close with your 'X'?

Active Window shows all of the windows in Vasfmc have the same Class-"QWidget" and the same .exe VASfmc.exe, but a different caption for each- ND left, PFD left, ypper ECAM, and vasFMC 2.09a (this latter one is the main window and the one I usually click on to close the program down so it re-opens with all the sub-windows already open and in place).

Den

Link to comment
Share on other sites

Active Window shows all of the windows in Vasfmc have the same Class-"QWidget"

That means they share the same Windows procedure, so only processing WM_CLOSE in one place.

... a different caption for each- ND left, PFD left, ypper ECAM, and vasFMC 2.09a (this latter one is the main window and the one I usually click on to close the program down so it re-opens with all the sub-windows already open and in place).

Well, it will be the "main Window" which receives the same WM_CLOSE message.

So, sorry, I don't know what it is doing differently. Maybe a question to the author might elicit a reason for this behaviour? If it closes normally it should surely save it's state?

Regards

Pete

Link to comment
Share on other sites

I've now discovered that my stand by instruments (Jeehell's Airbus standby from My Cockpits forum) does exactly the same thing as vasFMC. When closed by the Windows X button on the main Window all preferences are remembered and written to the .cfg file. Both programs then open up with the child windows in the correct place and size.

When closed by Wideclient all these preferences are lost. On startup only the main window is opened.

This program is similar to vasFMC in that there are several child windows which are the instruments and a main window that is just used on startup and then ignored.

The only explanation I've thought of for this happening to both programs is that when Wideclient closes down the program it is closing all the child windows first and then closing the main window. This would then write to the .cfg file showing all child windows closed on start up.

Is this what is happening, do you think it's possible?

Kind of defeats the ambition to go mouse and keyboard-less!

Can you possibly suggest a work around for this which means I can still go mouse and keyboard free on the slave pc?

Thanks

Den

Link to comment
Share on other sites

The only explanation I've thought of for this happening to both programs is that when Wideclient closes down the program it is closing all the child windows first and then closing the main window.

Hmm. I don't think I do that, but it was written such a long time ago I honestly don't recall. I'll check now and get back to you...

Regards

Pete

Link to comment
Share on other sites

I'll check now and get back to you...

Right. what it does is this:

By creating the process in the first place it gets the ID of the main thread. It does NOT automatically get the handle of the "top" window -- the one you want me to close. In fact unless all of its other Windows are child windows, there's really no such thing as its "top" or "main" window as far a Windows (the operating system) is concerned.

When it comes time to close, I have no idea which Window it is which should receive the WM_CLOSE message -- unless there's only one Window in the process which isn't a child (then it is trivial). To make sure that Window gets the message to close, I have to ennumerate all non-child (i.e. top-level) windows in the program, sending WM_CLOSE to each one. Generally programs only have one top-level window, so this works fine.

It sounds like in your applications there are a number of top-level windows, and the one to be closed to suit your needs is one of the later ones in the sequence Windows gives them to me. Maybe if I added an option to only close the LAST one that Windows ennumerates, that will be the first one opened and the correct one to close. However, that's only an assumption. I'd really need to trace the actions of one of the applications to see if this could work.

Are they freeware? Can I simply install and run? Where do I get them? I am going to need your help.

Regards

Pete

Link to comment
Share on other sites

Hi Pete

Yes they are both freeware.

vasFMC is from

http://vas-project.org/

Airbus standby is from

http://www.jeehell.org/StandByV3.2.zip

As alway I will be pleased to help but will be away from tonight till Wed pm.

I've just checked the standby program with Active Window and each window has its own Class name (TApplication, TForm1, TForm2, TForm3, and TForm4), unlike vasFMC where they all have the same one. What I don't understand is it shows 5 windows but only 4 are open- the main one and 3 instruments. The main one appears to have 2 entries with captions "A320 Stand-by instruments" for Class TApplication and "Airbus Stand-By instruments V.3" for Class TForm1

regards

Den

Link to comment
Share on other sites

Yes they are both freeware.

vasFMC is from

http://vas-project.org/

Not sure which version of that you are using, and the lastest isn't available there, only on site where I'd need to register, so I tested with this:

It seems that all of its windows are top-level ones, not child or owned. That's the problem -- and the windows enumeration of the Process's windows gives them to me in reverse!

So I had a choice: either always assume they would be in reverse, and always ennumerate them just to get a list, then close them in reverse order. Or assume all I needed to do was close the last one, none of the others.

I think the first choice would be dodgy. Unless I left a long enough delay I might still close one of the lesser Windows before the main one had recorded it correctly for resurrection. so I chose the second method. At first that didn't work -- I found this was because the application first opens an invisible Window and closing that does not close the main application!

However, modifying my code so that it closes the last VISIBLE window worked!

Try it. Version 6.822 of WideClient is attached. Change the INI "CloseN=Yes" parameter to "CloseN=Last" to get this alternative behaviour.

Let me know if it also works on vasFMC. If not I'll need TO INVESTIGATE DEEPER -- perhaps you could email the ZIP for it to me at petedowson@btconnect.com.

Regards

Pete

WideClient6822.zip

Link to comment
Share on other sites

Pete

Tried as you suggested and worked perfectly with both vasFMC and Jeehell's standby instrument. I can now open and close them as I wish and all settings are saved for the next time.

Out of curiosity I also tried it with FDC Live cockpit but it didn't work with it. In fact nothing seems to work to close that down except its own Windows X button. I even tried using the "Kill" parameter with no success.

When I checked FDC with Active window it showed 2 entries even though only one window was open- "Flight Deck Comp" with Class name "Thunder TR6 Form DC", and "Flight Deck Pro" with Class name "Thunder RT6 Main".

Might try a post on their forum to see if it elicits any suggestions.

Once again many thanks for your unrivalled assistance.

Regards

Den

Link to comment
Share on other sites

Tried as you suggested and worked perfectly with both vasFMC and Jeehell's standby instrument. I can now open and close them as I wish and all settings are saved for the next time.

Good.

Out of curiosity I also tried it with FDC Live cockpit but it didn't work with it. In fact nothing seems to work to close that down except its own Windows X button. I even tried using the "Kill" parameter with no success.

Well I use the Process ID i get back when creating the process. The only thing I can think is that the process I start is starting another process, and that's the one I'd need to get to.

All I can think is that you use a KeySend with a keyboard code programmed in the Wideclient.INI file to send, say, CTRL+C to the correct Window (the one with the correct Classname, perhaps?)

When I checked FDC with Active window it showed 2 entries even though only one window was open- "Flight Deck Comp" with Class name "Thunder TR6 Form DC", and "Flight Deck Pro" with Class name "Thunder RT6 Main".

What process(es) is(are) listed in Task Manager for FDC? Just the one? With the EXE name you started with?

Might try a post on their forum to see if it elicits any suggestions.

Yes. Dave March might be able to suggest something, or he could discuss it with me. He has my email.

Regards

Pete

Link to comment
Share on other sites

[quoteWhat process(es) is(are) listed in Task Manager for FDC? Just the one? With the EXE name you started with?

]

The program listed under the Applications tab in TM is Flight Deck Pro. The process title under the Processes tab is Flightdeck_Companion.exe.

The program I pointed wideclient to is fdc.exe, which I got from the Properties tab on the shortcut to the program on the desktop. The shortcut was created as part of the install IIRC.

This certainly works to start the program. But I've just had a look at the FDC folder in Program Files and there are two.exe file listed there- fdc.exe and Flightdeck_Companion.exe. The former works to start the program, the second one does nothing when double-clicked on.

The mystery deepens!

Den

Link to comment
Share on other sites

The program listed under the Applications tab in TM is Flight Deck Pro. The process title under the Processes tab is Flightdeck_Companion.exe.

That's the process which needs to be terminated then.

The program I pointed wideclient to is fdc.exe

Right .. so that's just some sort of start-up process, which creates the other one. Hence the problem.

I assume, then, that "pdc.exe" is gone by the time WideClient tries to terminate it?

This certainly works to start the program. But I've just had a look at the FDC folder in Program Files and there are two.exe file listed there- fdc.exe and Flightdeck_Companion.exe. The former works to start the program, the second one does nothing when double-clicked on.

Seems the author has done well to evade any sort of control by another program! I suppose therefore that none of the facilities offered by WideFS to send stuff to it would work?

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.