markturner1960 Posted October 17, 2022 Posted October 17, 2022 (edited) Hi, a mate has passed me an edited version of the F18 Macrosequencies script for autostart, that adds specific settings for the radar etc, which is handy. However, obviously it only works if you use the autostart feature on a cold jet...... I dont know enough about scripts and .lua files to figure this out, but in the same way that Lwin home starts the autostart script, it should be easy enough to make a version of the autostart script, without all the autostart stuff, that just adds in the radar etc settings? And make it so another key press does this? How would that be done? I can see at the start of the autostart macrosequencies file, it references this: dofile(LockOn_Options.script_path.."command_defs.lua") dofile(LockOn_Options.script_path.."devices.lua") And that in the F18 keyboard default .lua file it defines the keybinds for autostart. But I cant figure out the rest of the puzzle! He has a version WITHOUT all the autostart stuff, but this takes the place of the autostart file and so if you use this, you lose the option of having autostart as well.....I need a way to have both! Thanks! Edited October 17, 2022 by markturner1960 System specs: PC1 :Scan 3XS Ryzen 5900X, 64GB Corsair veng DDR4 3600, EVGA GTX 3090 Win 10, Quest Pro, Samsung Odyssey G9 Neo monitor.
Habu_69 Posted October 19, 2022 Posted October 19, 2022 I worked on something like this and was never able duplicate the push_start_command() type action in a script that would function other than by the auto start. One could program the key presses in a voice recognition program like Voice Attack.
Trigati Posted October 19, 2022 Posted October 19, 2022 I use the macro sequences STOP section to put my code in it as I am never going to <profanity> a jet down after flying….that way you can optionally have the scripted start and the separate config.Sent from my iPhone using Tapatalk
markturner1960 Posted October 19, 2022 Author Posted October 19, 2022 great idea....of course!!!! thanks!! System specs: PC1 :Scan 3XS Ryzen 5900X, 64GB Corsair veng DDR4 3600, EVGA GTX 3090 Win 10, Quest Pro, Samsung Odyssey G9 Neo monitor.
markturner1960 Posted October 19, 2022 Author Posted October 19, 2022 However, despite cutting and pasting what I think is needed where....I cant make it work....can someone chip in who knows this stuff? I have deleted teh auto stop section and in it place pasted in the start sequence I have that JUSt does the radar settings etc changes...but it wont load when I use the key press that normally starts the autostop....here is my alterered file if someone can spot my mistake.... Macro_sequencies.lua System specs: PC1 :Scan 3XS Ryzen 5900X, 64GB Corsair veng DDR4 3600, EVGA GTX 3090 Win 10, Quest Pro, Samsung Odyssey G9 Neo monitor.
Trigati Posted October 19, 2022 Posted October 19, 2022 OK, I've not tested it yet but I spotted 1 big thing as soon as I looked at your file....everything in the section you want to run on a hot jet he stop section is still linked to the start sequence so tries to run when you AutoStart. To get it to run only when you run the AutoStop you need to change the start of every code line from "push_start_command" to "push_stop_command" That way it runs when you run AutoStop (whatever KB you setup...default is LWIN + END) I did a quick Find & Replace for you to test as I won't get a chance till tomorrow...only other thing I can think of from looking at the script is it will not actually work if the Right DDI/MDI/MFD (...how many different names do they have?) is in either the TAC or SUPT menu when you run it and the AMPCD has to be showing the HSI (and if MAP is showing it turns it off, if MAP already off it will turn it on). Macro_sequencies.lua
Habu_69 Posted October 28, 2022 Posted October 28, 2022 Looking for help. I am attempting to introduce a new function into the Macro_sequencies.lua script for the Hornet and I can not get the code to work. Here is the basics of my attempts: function TEST_MSG() message = _("TEST MESSAGE"), message_timeout = dt_mto end push_start_command(dt, {TEST_MSG}) I have tested dozens of minor modifications of the above with no success: the script will not even load. I suspect the error is in the format or parameters. Any help appreciated, as I am but a very amateur coder. My objective is to isolate some lua commands to either the Auto-start or Auto-stop areas of the script by calling a function with push_start or push_stop.
Recommended Posts