Jump to content


  • Content Count

  • Donations

  • Joined

  • Last visited

Community Reputation

1 Neutral

Flight Sim Profile

  • Commercial Member
  • Online Flight Organization Membership
  • Virtual Airlines
  1. I got a lot of help of the AAO developer when i started developing my own gauges and wanted to summarize that in this tutorial for others. The new layout editor of AAO makes it a lot easier to start without any knowledge and this tutorial is describing step by step how to use it. It is thought for people who are designing their first gauge or are beginners with little or no knowledge about creating 2D cockpit gauges. You will first learn with a dummy Test-Gauge-Example all functions of the AAO layout editor. Next some simple example gauges are describing base techniques to create gauges. The zip file contains all images needed for that. Have fun to try it yourself! It is available now at flightsim.to https://de.flightsim.to/file/58848/aao-gauge-layout-editor-tutorial-for-beginners
  2. Thank you so much for your help! With this example i understand now the webapi.yaml file and got also other calls working. This is great!
  3. First of all a big thanks for the wonderful program! I am using the Webserver and I succeeded to write my first server page and can control now a LNM map with Axis and Ohs using an Xtouch Mini Controller. The test.html example was very helpful. The only question l have is if there is a way to get the airport information as .json object from the server. I saw a docu for an api interface in the web folder but was not successful to use it. I tried http://localhost:8965/api/airport/info?name=eddm Or is there a way to send a .json sql query object to the server to get information from the sqlite database via the server? Any help in form of an example would be very much appreciated.
  4. Just want to post one item which did cost me some time to find out: If you want to use the following SHIFT combinations with virtual keys in AAO you must turn off the numpad or it will not work and you will get the function of the numpad keys. SHIFT LEFT SHIFT RIGHT SHIFT UP SHIFT DOWN SHIFT POS1 SHIFT END SHIFT PAGEUP SHIFT PAGEDN SHIFT INSERT SHIFT DELETE This is only for a combination with the SHIFT key, all other worked also with the numpad turned on. This is not related to AAO, but how the virtual keys are processed.
  5. Hi colmoschin94, I just posted a HowTo on sending vitrtual keys to another computer. This is working for me toggling the active Pause on my networked computer. It is not easy, but allows me now to send any key command to a networked computer via VB scripting.
  6. I want to share a solution how to send virtual keys to another computer if you are running AAO and FS2020 on different computers: This can be used to send all the "nonworking" Simevents of the Asobo SDK like Toggle Pause , Toggle ATC window, or VIEW and CAMERA events via key strokes to another computer You need to attach with ONCE this initialization script to aircraft automated scripts, where you can direct the virtual keys either to the same computer or to a networked computer by macros: //·Use·0·if·FS2020·runs·on·the·same·computer·like·AAO //0·(>L:AAO_ON_OTHER_COMPUTER)· //·Use·1·if·FS2020·runs·on·a·different·computer·like·AAO 1·(>L:AAO_ON_OTHER_COMPUTER)· //In·that·case·the·IP·address·and·the·AAO·WebAPI·port·must·be·specified·for·the·FS2020·computer: ''·(>L:FS2020_IP_ADDRESS_PORT,·String)· //Location·of·the·.vbs·script·to·send·commands·to·the·FS2002·computer 'C:\Users\<username>\Documents\LorbyAxisAndOhs·Files\Scripts\huha001-Cessna152\VB_Scripts\SendAAOScript.vbs'·(>L:VB_SCRIPT_FILE,·String) (SPLIT:100) //Define·the·generic·(SPLIT:100) '(SPLIT·:·100)·'··(>L:SPLIT,·String) //Define·the·generic·command·string·variable·part1:·and·store·in·(L:VBS_SEND_MACRO,·String) '·'·(>L:VBS_SEND_MACRO1,·String)· '(EXEC:wscript.exe,·"'·(L:VB_SCRIPT_FILE,·String)·scat· '"·"'·scat· (L:FS2020_IP_ADDRESS_PORT,·String)·scat· '"·"'·scat·(>L:VBS_SEND_MACRO1,·String) //Define·the·generic·command·string·variable·part2 '")'·(>L:VBS_SEND_MACRO2,·String) //switch now depending on L:AAO_ON_OTHER_COMPUTER the configuration of the macro with local variables (L:AAO_ON_OTHER_COMPUTER)·0·==·if{ '·'·(>L:VBS_SEND_MACRO1,·String) '·'·(>L:VBS_SEND_MACRO2,·String) //Define·the·real·(SPLIT:100) '(SPLIT'·':100)·'·scat·(>L:SPLIT,·String) } You have to replace your user account name <username> and ip address of the FS2020 computer and to check all your paths. Then you can use the following VB script which must be in C:\Users\<username>\Documents\LorbyAxisAndOhs·Files\Scripts\huha001-Cessna152\VB_Scripts\SendAAOScript.vbs : '*********************************************************************************************** ' .vbs script to send an AAO script sequence to the Fs2020 computer via the AAO webinterface '*********************************************************************************************** ' Version 1.0 ' AAO must be run offline in admin mode on the FS2020 computer with the WEB API enabled ' The windows firewall must have a rule defined for both the FS2020 and the AAO computer ' Call: wscript.exe SendAAOScript.vbs ' Store the arguments in a variable: ' ipaddress: ipaddress of the FS2020 computer with the AAO port number (example: localhost:9080 or ' scriptvar: string with AAO script sequence being executed on the FS2020 computer (example: "99 (>L:MYDEBUGVAR)" Dim o, scriptVar,ipaddress, debug On Error Resume Next debug = True ipaddress = "" scriptVar = "" 'DEBUG: If debug Then Set objFSO=CreateObject("Scripting.FileSystemObject") 'INSTALLER_CHANGE_BEGIN outFile="C:\Users\<username>\Documents\LorbyAxisAndOhs Files\Scripts\huha001-Cessna152\VB_Scripts\logfile.txt" 'INSTALL_CHANGE_END Set objFile = objFSO.CreateTextFile(outFile,True) objFile.Write "count=" & Wscript.Arguments.Count & vbCrLf End If If Wscript.Arguments.Count > 0 then ipaddress = Replace(Wscript.Arguments(0),"&gt;",">") end if ' you must replace > and < and : and probably a few more for all script commands if Wscript.Arguments.Count > 1 then scriptVar = Replace(Wscript.Arguments(1),"&gt;",">") scriptVar = Replace(scriptVar,"&lt;",">") scriptVar = Replace(scriptVar,"&colon;",":") scriptVar = Replace(scriptVar," : ",":") end if 'send the script now to the Fs2020 computer Set o = CreateObject("MSXML2.XMLHTTP") o.open "POST", "http://" & ipaddress & "/webapi?json={""scripts"": [ { ""code"":"" " & scriptVar & " "" }]}", False o.send If Err.Number <> 0 Then If debug Then objFile.Write "ipaddress=" & ipaddress & vbCrLf objFile.Write "scriptVar=" & scriptVar & vbCrLf objFile.Write "There's been an error sending the http request to the AAO webserver" & vbCrLf objFile.Write "Is the AAO WEBAPI enabled and is AAO running in Admin mode?" & vbCrLf objFile.Close WScript.Quit 1 End If End IF ' o.responseText now holds the response as a string. 'you could access with a running .vbs script to AAO via the WEB interface for simvars or also send via .vbs scripts events to AAO 'DEBUG: if debug Then objFile.Write "ipaddress=" & ipaddress & vbCrLf objFile.Write "scriptVar=" & scriptVar & vbCrLf objFile.Write "responseText=" & o.responseText & vbCrLf objFile.Close End If Last, the virtual key is then sent by a RPN script just with a single line depending on your configuration in the initialization script either directly on the same computer or via vb script to another computer: //************************************************************************** //·Script·for·Virtual·Keys·for·PAUSE //************************************************************************** //·Virtual·Key:·Pause @VBS_SEND_MACRO1·(FOCUS:flightsimulator)·@SPLIT·(VKD:69-197-19)·@SPLIT·(VKU:69-197-19)·@VBS_SEND_MACRO2 Explanations: The main idea is that you are sending by macro definitions the virtual key(s) either directly to the same computer or via a VB script to another computer using the AAO webinterface. For that AAO must run on the Fs2020 computer in admin mode without being connected to the Fs2020 computer in the offline modus. This instance of AAO just receives via the webinterface virtual key commands from the AAO computer. Please note that you must define separate @SPLIT macros, because AAO does not allow within a String the SPLIT command (or any other simulation variable!!!). AAO would execute it as a command or replace the simvariable by its value. Then the macro definitions start in an EXEC command the VB script with the virtual key commands as an argument. The VB script removes the spaces before and after the colon (which prevents AAO to execute the Split command from the string) and sends via http request the virtual script command to the other computer via the AAO webinterface Most of the script is just for debugging and could be removed. Needless to say that this concept of starting VB scripts via AAO with arguments, VB script processing and transferring back the results to AAO via the Web interface enables a lot more complex procesing opportunities. I know this is complicated but you can watch the execution depending on the configuration in the 'Watch AAO Script processing' window step by step.
  7. Thanks a lot for your help! I also want to say thanks for what you did in the previous versions with the xml panels for desktop and web-fips. This gave so many new options with the program.
  8. I tried in a xml gauge for my Cessna 152 Xtouch Mini project at https://flightsim.to/file/32189/cessna-152-template-and-gauge-for-behringer-xtouch-mini-and-axis-and-ohs-aao to display the content of a string, but did not succeed. Is there a way or a specific format to do that? I tried formatting with <Value>%(L:ACTION, String)%!30s!</Value> and <Value>%(L:ACTION, String)%!s!</Value> but could not get it to work.
  9. It looks like import/export scripts does not include the <edition> tag for formatting scripts and including comments. This does work for exporting/importing templates, but not for scripts. Is that something which could be added in the future?
  10. Thanks for the clarification and the link. I was interested in the altimeter and needles .png files, but will make my own now. Good news for me was that i can use the screws and instrument panel from the AAO site.
  11. I do have 2 questions on my first gauge design: 1) Are your AAO gauges copyright proteced or can users reuse/modify them and publish on flightsim.to? 2) Does AAO support grouping of elements? This would enable a more performance friendly programming of the visible property based on groups. The general syntax of elements does enable nesting, but when i tried, it did not work or I used the wrong format.
  12. Wow, I was always hoping someone would discover that at some day. touchdown 84, the modus can be set on the active layer by the cc command. The following test script sumarizes all the combinations I found but without outputting your value it did not make sense before. I have not found a modus where the LEDs can be completely turned off. //velocity·(>MIDI:<DeviceId>:<Action>:<channel>:<note>) //<Action>·can be one of the following: „NoteOn“, „NoteOff“, „CC“, „PrgChng //Encoder 1 Modus single LED with no LEDs at value 0 // values larger than the maximum value or smaller than the minimum value will // result in no LEDs // Only the modus of the active layer will be changed 0 (>MIDI:3:CC:1:1) //Output values //0 (>MIDI:3:CC:11:1) 30 (>MIDI:3:CC:11:1) //127 (>MIDI:3:CC:11:1) //Encoder 2 Modus single LED with first LEDs at value 0 // values larger than the maximum value or smaller than the minimum value will // result in the first LEDs 1 (>MIDI:3:CC:1:2) //Output values //0 (>MIDI:3:CC:11:2) 60 (>MIDI:3:CC:11:2) //127 (>MIDI:3:CC:11:2) //Encoder 3 Modus FAN, LEDS increasing from 0 to 13 LEDs with value // 0 is no LEDs and 127 is all LEDs 2 (>MIDI:3:CC:1:3) //Output values //0 (>MIDI:3:CC:11:3) 60 (>MIDI:3:CC:11:3) //127 (>MIDI:3:CC:11:3) //Encoder 4 Modus PAN, symmetric increase of LEDS left and right of LED 7 // 0 is LED 7, 127 all LEDs 3 (>MIDI:3:CC:1:4) //Output values //0 (>MIDI:3:CC:11:4) //30 (>MIDI:3:CC:11:4) 127 (>MIDI:3:CC:11:4) //Encoder 5 Modus TRIM, // 0 is left half of LED ring, 127 is right half of LED ring 4 (>MIDI:3:CC:1:5) //Output values //0 (>MIDI:3:CC:11:5) //90 (>MIDI:3:CC:11:5) 127 (>MIDI:3:CC:11:5) //Other comnmands //Goto Layer A //0 (>MIDI:3:PrgChng:1) //Goto Layer B //1 (>MIDI:3:PrgChng:1) // Fake LEDs: 0 off, 1-13 on, 14-26 blink, 27 all on, 28 all blinking // Device id:3, Global channel 1, Encoder 1 // Encoder 1 all LEDs blinking //28 (>MIDI:3:CC:1:09) //LED Button 2 on layer A 1 (>MIDI:3:NoteOn:11:09)
  13. So it all existed already in AAO (thanks a lot to Oliver for his help). Attached I am showing an example for other newbies: Below is a simple script to swap the COM or NAV frequency defined by param1 and flash the xtouch mini LED encoder ring (param2) for 100ms. ----------------------------------------------------------------------------------------------------- //Swap Active and standby frequency for a long click and flash all LEDs on xtouch mini //param1 event to swap frequencies e.g. K:COM1_RADIO_SWAP //param2 Encoder led ring e.g. MIDI:3:CC:1:9 //flash encoder LED ring on xtouch mini 27 (>param2) 1 (>param1) (WAIT:100) //turn off encoder LED ring on xtouch mini 0 (>param2) ----------------------------------------------------------------------------------------------------- This script can now be called from a test script in C:\Users\your_user_name\Documents\LorbyAxisAndOhs Files\Scripts\DebugParams.txt by starting it from the AAO window: Scripting -> Run Script Files It replaces the params by the actual values. The "select scripts to run" window allows to choose a line number to start the script which I am using for the different combinations of params. Before starting the script I export all variables. This exports all variables from the AAO cache with the value into a file myvariables.tsv. After the :END label I am waiting 300ms as scripts are always executed in a separate task and then I am writing the changes of variables (AAO will save two columns of numbers) into another file changes.tsv. Before starting from different line numbers, you need to make sure that all the replaced variables are in the AAO cache and have been written to myvariables.tsv once. In the future this export will no more be needed as Oliver is doing great work on better debug support right now. Testscript for params: ----------------------------------------------------------------------------------------------------- // Debug script for params which can be started from the menu item: Scripting -> Run Script Files // It will replace the 2 params in huha-test-COM_NAV_SWAP // Export before frequency swap variables from AAO cache into a file with values at C:\Users\your_user_name\Documents\LorbyAxisAndOhs Files\Scripts\myvariables.tsv (EXPORTVARS:myvariables.tsv) (WAIT:300) // now call param script with all different variables to test one by one // swap frequencies and flash encoder LED ring with MIDI command 1 (>K:huha-test-COM_NAV_SWAP;K:COM1_RADIO_SWAP;MIDI:3:CC:1:9) (GOTO:End) 1 (>K:huha-test-COM_NAV_SWAP;K:COM2_RADIO_SWAP;MIDI:3:CC:1:10) (GOTO:End) 1 (>K:huha-test-COM_NAV_SWAP;K:NAV1_RADIO_SWAP;MIDI:3:CC:1:11) (GOTO:End) 1 (>K:huha-test-COM_NAV_SWAP;K:NAV2_RADIO_SWAP;MIDI:3:CC:1:12) (GOTO:End) :End // AAO is starting scripts in as a separate task and is not waiting for its execution, so use WAIT to wait for the script execution (WAIT:300) // Export changes into file C:\Users\your_user_name\Documents\LorbyAxisAndOhs Files\Scripts\changes.tsv (REPLACEVARS:myvariables.tsv, changes.tsv)
  14. Please ignore my comments on the variable debugging. I just realized how the (EXPORTVARS:xxxx) and the (REPLACEVARS:xxxx,yyyy) work in scripts and this is better and was exactly what i was looking for. Sorry for confusing here. I was so far only using the variable window for debugging, but this is much better.
  15. Thanks a lot for your fast response and help. I will send you an email to wildfiretrainingsolutions.ca with proof of purchase. On the debug of variables it may be easier just to read from an ascii file with a special name at a special location if it exists (e.g. variables.txt). The names of the variables could then be just listed line by line e.g: L:COM1_TOGGLE L:COM2_TOGGLE The idea would be that after closing axes and ohs and starting later in another session you do not have to input again all the names. But this is only a minor item for me.
  • Create New...