Previous Thread
Next Thread
Print Thread
Rate This Thread
Hop To
#3289896 - 05/08/11 05:18 PM T.A.R.G.E.T. Script Editor: Running Multiple Scripts & Exclude Mouse AND Keyboard  
Joined: Jan 2006
Posts: 19
cesthree Offline
Junior Member
cesthree  Offline
Junior Member

Joined: Jan 2006
Posts: 19
Republic, MO
Spent a few minutes the other day getting PPJoy and GlovePIE to fix my Warthog throttle in Arma II. Worked pretty good. I must have glanced over how powerful the C script editor is that came with my Warthog HOTAS.

So, I was able to fix the throttle and deadzones in the joystick (thanks dimebug) to work perfectly with Arma II using the T.A.R.G.E.T. script editor.

Now I have a few questions that maybe some of you can answer:

1. Why doesn't Thrustmaster have a support forum? You know for questions like I have?

2. Is there some way to _EXCLUDE the mouse and keyboard from the script? Similar to excluding the 4 out of 6 TM devices that I don't have?

3. I know that the T.A.R.G.E.T. GUI can launch games and scripts; however, is there some way to launch the script only? I want to start Arma II via Steam, have the script start, then the game start, so I don't have to run the game through the T.A.R.G.E.T. GUI. Really, I'd be happy with calling the Steam shortcut, but I don't know if that is possible either.

4. This is the most important of all my questions. Is there any way to run multiple scripts at the same time? I want to run one script for my Warthog Joystick and one for my Warthog Throttle. This way the DX buttons will not be limited to the 32 allowed for a single device.

Any ideas or help will be greatly appreciated. Thanks!

Inline advert (2nd and 3rd post)

#3289990 - 05/08/11 08:01 PM Re: T.A.R.G.E.T. Script Editor: Running Multiple Scripts & Exclude Mouse AND Keyboard [Re: cesthree]  
Joined: Nov 2010
Posts: 37
hsth Offline
Junior Member
hsth  Offline
Junior Member

Joined: Nov 2010
Posts: 37
To my knowledge answers would be:

1. As far as back to the introduction of the Cougar, support sites were always a thing of the users. Thrustmaster does offer direct online support.

2. In the files that are included in your script file the mouse and keyboard are always included, they don't have special names to use for EXCLUDE.

3. No, in the included files is all the functionality required to make the script work.

4. If you try to run TARGET ScriptEditor twice the second won't start. If you try to run TARGET GUI while ScriptEditor is running you'll get a message saying that it isn't allowed. Have not tested what would happen if you combine to scripts together into one. But the DX limitation is in the included files and those you cannot overcome.

#3290348 - 05/09/11 08:11 AM Re: T.A.R.G.E.T. Script Editor: Running Multiple Scripts & Exclude Mouse AND Keyboard [Re: cesthree]  
Joined: Oct 2010
Posts: 83
Nicu Offline
Junior Member
Nicu  Offline
Junior Member

Joined: Oct 2010
Posts: 83
2 - the prototype of the Init() function in target.tmh is:

int Init(alias h, int cfg=CREATE_JOYSTICK+CREATE_KEYBOARD+CREATE_MOUSE)

which means one can exclude the mouse and the keyboard by calling Init in main() as follows:

int main()
{
if(Init(&EventHandle, CREATE_JOYSTICK)) return 1; // create only the virtual joystick
...
}

3 - Select a dummy application to launch instead the game (for instance you can launch spawn.exe which is located in TARGET installation folder).

4 - It is possible to have more than 32 buttons, but you will not be able to access all of them through DX. For this, go in target.tmh line 178:

stGameCfg virtualj = { 32, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0};

and change the 32 with the desired number of buttons.\:

stGameCfg virtualj = { 40, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0};


Pulse the button 39 for 100ms with the following line of code:

MapKey(&Joystick,TG1,EXEC("VirtualOutput(OUT_TYPE_GAME, 39, OUT_VALUE_BUTTON_PRESS_RELEASE, 100);"));

The result can be seen with the TARGET DeviceAnalyzer.

#3290403 - 05/09/11 12:10 PM Re: T.A.R.G.E.T. Script Editor: Running Multiple Scripts & Exclude Mouse AND Keyboard [Re: cesthree]  
Joined: Sep 2010
Posts: 104
Dimebug Offline
Member
Dimebug  Offline
Member

Joined: Sep 2010
Posts: 104
France


3. I know that the T.A.R.G.E.T. GUI can launch games and scripts; however, is there some way to launch the script only? I want to start Arma II via Steam, have the script start, then the game start, so I don't have to run the game through the T.A.R.G.E.T. GUI. Really, I'd be happy with calling the Steam shortcut, but I don't know if that is possible either.

I can have a look to see how to launch a steam shortcut from a script, i'will keep you informed.

If you just want to launch a GUI file or a script, simply select the file in the "GUI Configuration Files" area of the GUI main page, then, click on "run" or mouse right button and select Run in the little window that have just appeared.

4. This is the most important of all my questions. Is there any way to run multiple scripts at the same time? I want to run one script for my Warthog Joystick and one for my Warthog Throttle. This way the DX buttons will not be limited to the 32 allowed for a single device.

This could probaly comes later, as if TM release another directX device (rudder, panel, instrument or whatever DirectX), they will have to solve the DirectX limits problem to support more axis and/ or buttons. Be able to run a unique script for independent DirectX items could be the way.


Guillaume "Dimebug" Leleve
#3291457 - 05/10/11 04:54 PM Re: T.A.R.G.E.T. Script Editor: Running Multiple Scripts & Exclude Mouse AND Keyboard [Re: cesthree]  
Joined: Jan 2006
Posts: 19
cesthree Offline
Junior Member
cesthree  Offline
Junior Member

Joined: Jan 2006
Posts: 19
Republic, MO
Thank you all for the help! I've only taken a few classes on VB.NET (used Visual Studio 2008), and the applications we created were simple and business related. I really appreciate all of your expert help!

I would have replied earlier, but I don't think I have my notifications applied correctly.

Back to reading the scripting guide, and incorporating your ideas. copter

Last edited by cesthree; 05/10/11 04:55 PM.

Moderated by  RacerGT 

Quick Search
Recent Articles
Support SimHQ

If you shop on Amazon use this Amazon link to support SimHQ
.
Social


Recent Topics
Dickey Betts was 80
by Rick_Rawlings. 04/19/24 01:11 AM
Exodus
by RedOneAlpha. 04/18/24 05:46 PM
Grumman Wildcat unique landing gear
by Coot. 04/17/24 03:54 PM
Peter Higgs was 94
by Rick_Rawlings. 04/17/24 12:28 AM
Whitey Herzog was 92
by F4UDash4. 04/16/24 04:41 PM
Anyone can tell me what this is?
by NoFlyBoy. 04/16/24 04:10 PM
10 Years ago MV Sewol
by wormfood. 04/15/24 08:25 PM
Pride Of Jenni race win
by NoFlyBoy. 04/15/24 12:22 AM
It's Friday: grown up humor for the weekend.
by NoFlyBoy. 04/12/24 01:41 PM
OJ Simpson Dead at 76
by bones. 04/11/24 03:02 PM
Copyright 1997-2016, SimHQ Inc. All Rights Reserved.

Powered by UBB.threads™ PHP Forum Software 7.6.0