Also apparently there is no way to pass arrays as functions parameters..?

EDIT: and no while or for loops?! What year is this already??

EDIT2: and no logical "and" nor "or" in if-then-else either? That's it, I'm out of here...
 
Last edited:
How exactly can I bind a key to running a function?

I tried

MapKey(&Peripheral, ResKey, firstCommand(Reset));

but doing so instantly executed it.
 
One last problem: this may sound dumb, but I can't for the life of me find a way to straight out send a bunch of commands to the game during the execution of a function.

Button 1 is mapped to execute myFunction(). myFunction should send a number of commands to the game based on any number of things - and I'm struggling to make it do just that.
Perhaps, could it be that any submission of directX button must be forcibly bound to a key, and never sent via a method?
 
Hi AD,

Re the PIP Manager thing...I've had a play and here's some interesting observations...

1) In initPIPManagement() function you do not need the "if(Joystick[H3x])" in front of each MapKey statement
2) If you move the code inside initPIPManagement function into the "tmc" file, everything works fine !!!
The only real difference here is we MapKey each key once only.

Code:
//		MapKey(&Joystick, H3U, EXEC("initPIPManagement();"));
//		MapKey(&Joystick, H3D, EXEC("initPIPManagement();"));
//		MapKey(&Joystick, H3L, EXEC("initPIPManagement();"));
//		MapKey(&Joystick, H3R, EXEC("initPIPManagement();"));

		if(UserPIPPref == 0) {	
			MapKey(&Joystick, H3U, TEMPO(
						EXEC("initPIPMapper(ENG,SYS);"), PowerEng,
						PIPPressDelay)); 
			MapKey(&Joystick, H3D, TEMPO(
						EXEC("initPIPMapper(SYS,WEP,MID);"), BalancePower,
						PIPPressDelay));
			MapKey(&Joystick, H3L, TEMPO(
						EXEC("initPIPMapper(SYS,WEP);"), PowerSys,
						PIPPressDelay));
			MapKey(&Joystick, H3R, TEMPO(
						EXEC("initPIPMapper(WEP,SYS);"), PowerWep,
						PIPPressDelay)); }

...etc.

Why? who knows...I'd say this is a bug in the TARGET script code or compiler somewhere.

Clicker

p.s Thrustmaster have released new versions of the firmware and TARGET
 
Last edited:
How exactly can I bind a key to running a function?

I tried

MapKey(&Peripheral, ResKey, firstCommand(Reset));

but doing so instantly executed it.

Hey mate,

That should be all that is required (should be able to see the same setup in my script). Once you map that function then each time it is pressed it will execute that code. What I believe does happen though, is on script run is that it will parse the code once and run it to ensure its valid (I assume) so will fire once without a keypress directly.

One last problem: this may sound dumb, but I can't for the life of me find a way to straight out send a bunch of commands to the game during the execution of a function.

Button 1 is mapped to execute myFunction(). myFunction should send a number of commands to the game based on any number of things - and I'm struggling to make it do just that.
Perhaps, could it be that any submission of directX button must be forcibly bound to a key, and never sent via a method?

Does sound odd, but I might not be understanding too well. Unless you are mapping directly to DX mappings in ED, then I would generally opt to mapping to a keyboard command instead (this is how I tackled most controls). I may use DX once or twice though (maybe the primary fire etc), but mainly keyboard mappings. Once mapped in the script then update in your bindings file to align.


Hi AD,

Re the PIP Manager thing...I've had a play and here's some interesting observations...

1) In initPIPManagement() function you do not need the "if(Joystick[H3x])" in front of each MapKey statement
2) If you move the code inside initPIPManagement function into the "tmc" file, everything works fine !!!
The only real difference here is we MapKey each key once only.

Code:
//        MapKey(&Joystick, H3U, EXEC("initPIPManagement();"));
//        MapKey(&Joystick, H3D, EXEC("initPIPManagement();"));
//        MapKey(&Joystick, H3L, EXEC("initPIPManagement();"));
//        MapKey(&Joystick, H3R, EXEC("initPIPManagement();"));

        if(UserPIPPref == 0) {    
            MapKey(&Joystick, H3U, TEMPO(
                        EXEC("initPIPMapper(ENG,SYS);"), PowerEng,
                        PIPPressDelay)); 
            MapKey(&Joystick, H3D, TEMPO(
                        EXEC("initPIPMapper(SYS,WEP,MID);"), BalancePower,
                        PIPPressDelay));
            MapKey(&Joystick, H3L, TEMPO(
                        EXEC("initPIPMapper(SYS,WEP);"), PowerSys,
                        PIPPressDelay));
            MapKey(&Joystick, H3R, TEMPO(
                        EXEC("initPIPMapper(WEP,SYS);"), PowerWep,
                        PIPPressDelay)); }

...etc.

Why? who knows...I'd say this is a bug in the TARGET script code or compiler somewhere.

Clicker

p.s Thrustmaster have released new versions of the firmware and TARGET

Hey mate,

Oh WOW you found how to fix it!!!! Thank you! I'll need to check this out and test my end. More likely an issue in my code (was a bit tricky to get working as I recall) than a compiler issue, but who knows.

That is really, really strange though, would never have thought to try that! Make the main script a bit messier but if it works, I'll change it over.

Keep this up Clicker, I will have to release a new version with all your fixes LOL! :p

Thanks again, AD
 
Last edited:
I’m almost certain it has something to do with remapping the key.
Why it only affects the very first press of the key, would be an internal issue.

It’s a pity they only ever released the “Basic” scripting manual and not something more substantial.

BTW - the new firmware and Target does not fix this or the spawn issue in Win10...and the new TARGET script editor has a bug where after about a half dozen script runs or so, stops working properly, a manual re-compile before run seems to get it back though.
As there’s no release notes, it’s impossible to know what’s been added, removed or fixed in this release other than to include some new hardware (including an F18 Joystick!? )

Cheers
 
So hold off on the TARGET update for now? Sounds like no particular improvements (not that we would know by the sounds of it lol).

Yeah, I have constantly battled for information for all this scripting stuff. I am sure there is so much more that can be done, but just don't know enough programming to create it from scratch.

Good to know about the spawn issue is still there, thanks for letting me know.

F18 Joystick, sounds interesting :)
 
Definitely hold off upgrading both the firmware and TARGET for now.

The joystick (when combined via the script or GUI) on my setup intermittently goes unresponsive since the upgrade.
Recompiling the script or restarting the app seems to work sometimes although the issue didn't resolve until I rebooted the PC last night.
I believe this is due to the new TARGET software but will need to test with old version (not sure if the new firmware on the stick will cause issues though).

I'll have more of a play when I get a chance and report back how I go.
(I'm going to have a look at the USBDview software from nirsoft that CMDR Touille suggested a few pages back as well)

FWIW, if anyone else has upgraded, I'm running an external powered USB HUB and Win10.

Clicker
 
I've upgraded both. Somtimes ED does not recognise the combined Warthog/the TARGET script.
Here I have to stop/restart the script in TARGET and the it works as it always used to.

Running an external passive USB 3.0 HUB and latest Win10.
 
Interesting.

Sometimes restarting the script works for me. Sometimes not.
Sometimes doing a manual compile before a script starts, helps, sometimes not.
Sometimes restarting TARGET helps when the above doesn’t.
If that fails a reboot usually fixes things.

I’ve completely removed TARGET and drivers and all their artifacts and cleaned the registry, then reinstalled everything.
So far so good but I’m not confident.

Clicker
 
Playing in Borderless mode, 2 side screens for discord and "my notes".
Sometimes it seems ED lost focus, even if it seems to have it. Then Only "Alt-Tabbing" to ED brings back the focus.

Shrugs
 
...and one more thing...

Aussiedroid...they've changed the TARGET font in the "console view" when running the script, which munts your formatting!

If you know how to reset this, please let me know.

Clicker
 
...and one more thing...

Aussiedroid...they've changed the TARGET font in the "console view" when running the script, which munts your formatting!

If you know how to reset this, please let me know.

Clicker

Hey Clicker,

Getting all that aligned was a bit of a manual process. I'll have to review it when I upgrade the software and see if it can be fixed. Perhaps now its a fixed width formatted font, which would help get things aligned properly instead of all the tabs and bits I used to get it looking ok. You will see what i mean if you check the code lines. Its housed in the AD_EDFunctions file, right at the bottom by the way.

Could comment out that function in the mean time and prevent the startup printout.

Would it be possible to post a screenshot? I am curious to how it looks.


Cheers, AD
 
Playing in Borderless mode, 2 side screens for discord and "my notes".
Sometimes it seems ED lost focus, even if it seems to have it. Then Only "Alt-Tabbing" to ED brings back the focus.

Shrugs

For what it is worth mr. Gr3y, I get this about once a month or so, sometimes less often (older version of TARGET). Some rare thing. I play borderless too.

For me the workaround is to minimise, maximise, minimise then max again. Not sure what causes it. Tabbing can keep it unfocused still.

AD
 
I take it all back...Your print status page looks fine and so do the function related printf statements.

On the otherhand, my heavily modified script output now looks like a dog's breakfast.

:-(

Cheers
 
August Update!

Update 3.2.0: BEYOND CHAPTER 2

-> The great improvements in this release are courtesy of CMDR Clicker. Thanks for solving some of these outstanding limitations/bugs mate! Along side these improvements, a few mapping conflicts have been addressed.


List of Changes:

IMPROVEMENT: PIP Management now works on first press! (First long/shot press in any direction would not register previously).
IMPROVEMENT: FAOff Toggle (Hold) will now return to active joystick curve setting (based on Autopilot Toggle position).

FIXED: Conflict between CQC Scoreboard & Mouse Headlook mode (CQC remapped to F6 in script).
FIXED: Conflict between Ship/SRV Boost & Side Panel/Camera Mode (SRV remapped to 'O').

ADDED: GalNet Audio hotkeys are now coded into the script (Remapped to PIP Hatswitch. Note: Long Hold to Clear Queue).
ADDED: Missing Mouse Headlook Mode Enable/Disable keymapping 'LookToggle' F5 in script (Good for Pinky Double Tap etc). Also added F5 Mapping for SRV Headlook.

REMOVED: Digital SRV Boost Mapping on Throttle Arm (as tends to fire when steering SRV with digital controls in turret & analog right next to it anyways).



[alien] Fly Safe CMDRs! [alien]

** Please visit the ModDB link to get the latest version *** Steam Guide can be found here **
 
target software

hi Aussiedroid is it safe to upgrade now to new versions of the firmware and target software also thanks for your good work.[yesnod]
 
hi Aussiedroid is it safe to upgrade now to new versions of the firmware and target software also thanks for your good work.[yesnod]

Hey Ironside,

I haven't used it myself yet, but some reports above said there were some issues. I'm holding off for now.

Cheers, AD
 
Back
Top Bottom