CAPTAIN SIM FORUM
757 Captain >> 757 version 4.x (FSX ONLY) >> I need an SDK for the 757
https://www.captainsim.org/forum/csf.pl?num=1246759974

Message started by andreotti60 on Jul 5th, 2009 at 2:12am

Title: Re: I need an SDK for the 757
Post by SEAN ZARELLA on Nov 5th, 2015 at 6:42pm
Lol.    It would be nice for me to show how I figured it out :)

ok here goes !




Navigate to your FS9 folder then /Gauges

Inside find and backup cs.b757.ap.CAB

Open it and extract its contents to a new folder, Rename the origional Cab file something else but keep the .CAB

name your new folder cs.b757.ap.CAB with the extension .CAB

Inside youll find CG_AP_DisBar.xml

Open it with your favorite XML editor, there are free ones on CNET, and copy the contents below!

Each button on a keyboard is represented by a number, also Shift and control with a number add 256 to the origional character #   if you add CNTR+ SHIFT then a character then you add 512 + the character value.

This is the string for autopilot disconnect.





<Gauge Name="AutopilotSwitch_CG005sw2" Version="1.0">
<Update Frequency="10"/>
<Element>
<Position X="0" Y="0"/>
<Select>
<Value>(E:TIME OF DAY, enum) 1 != (A:LIGHT PANEL, bool) && if{ 2 } els{ 0 } (L:AP_Dis,bool) +




</Value>
<Case Value="0">
<Image Name="AP_DisengageBar.bmp" Bright="No">
<Axis X="0" Y="0"/>
</Image>
</Case>
<Case Value="1">
<Image Name="AP_DisengageBar.bmp" Bright="No">
<Axis X="0" Y="-3"/>
</Image>
</Case>
<Case Value="2">
<Image Name="AP_DisengageBar_n.bmp" Bright="Yes">
<Axis X="0" Y="0"/>
</Image>
</Case>
<Case Value="3">
<Image Name="AP_DisengageBar_n.bmp" Bright="Yes">
<Axis X="0" Y="-3"/>
</Image>
</Case>
</Select>
</Element>
<Mouse>
<Area>
<Tooltip>Disengage Bar</Tooltip>
<Cursor Type="Hand"/>
<Click>1 (>L:AP_Dis_On,bool)




103 (>L:iSndPl, position)




</Click>
</Area>
</Mouse>
<Keys>
<On Key="74">1 (>L:AP_Dis_On,bool)




103 (>L:iSndPl, position)</On>





</Keys>
</Gauge>



XXXXXXXXXXXXXXXXXXXXXXX


This Means if you go into each XML in each cab, you can add the

<Keys>
<On Key=" "> do stuff </On>
</Keys>

after the mouse section. and copy the mouse commands,. insert it into where " " is and you can find out what each key sequences into a number that XML reads you can go to this site
http://javascript.info/tutorial/keyboard-events

and it will tell you what each keystroke means by number to insert in the " " remarks. and assign that keyboard into joystick assignment !


Now when you press J or via FSUIPC assign a Joystick button on a yoke or wht ever you need Go to Buttons and switches, select " FOR KEY PRESS " and press your appropriate Button and then select J for the Button.
Now when you press J it will toggle your autopilot disengage bar up and down with each key press !!!!!!!!!
ENJOY!


CAPTAIN SIM FORUM » Powered by YaBB 2.6.0!
YaBB Forum Software © 2000-2024. All Rights Reserved.