View Full Version : Simple Scripting Question
Halcyon
19th February 2008, 04:01 AM
I don't know anything about scripting, and I've honestly spent the last 2 hours searching for an example or documentation to tell me how to do what I want to do.
All I want to do is assign a button on my yoke to act as if I hit, for example, the A key on my keyboard.
I know this is a super stupid question but I'm beyond frustrated trying to interpret the scripting language.
Thanks.
Bob Church
19th February 2008, 05:14 AM
Hi Halcyon,
>> I don't know anything about scripting, and I've honestly spent the last 2 hours searching for an example or documentation to tell me how to do what I want to do.
All I want to do is assign a button on my yoke to act as if I hit, for example, the A key on my keyboard. <<
You don't really need to script anything for that. Start a new map. Add the yoke using the "Add" button on the tool bar. You'll get a picture of the yoke on the left side of the screent. Click on the button you want to program. The right half of the screen will change to show the programming fro that button. Uncheck the box that says "DX Mode". You should end up with a screen that shows "Normal Action" and "Shifted Action" sections. In the Normal Action section, one of the edit boxes will be labeled "Press". Put the cursor in the box and type an:
a
You don't normally want to use "A", the Control Manager will see that it's shifted and send the Shift button, too.
Anyway, that's about all there is to it. You can use the "Save" button to save the mask to disk. The last step is to click the "Download" button to send the map to the Control Manager. It's not enough to just change the map, that doesn't start it running or change it while it's running. You have to download it.
Anyway, once you've downloaded it, clicking the button should send a repeating "a" character just like a keyboard key.
Hope this helps!
Beset regards,
- Bob
The StickWorks
http://www.stickworks.com
Halcyon
19th February 2008, 05:39 AM
You're the man Bob!
I can't believe it was that easy.
Much thanks!
Bob Church
19th February 2008, 05:51 AM
Hi Halcyon,
Glad it worked for you! There is a little learning curve at first, after a map or two it'll all get a lot easier.
If you run into anything else, just ask!
Best regards,
- Bob
The StickWorks
http://www.stickworks.com
jozepi1
29th March 2009, 05:58 PM
My macro frustration research has ultimately brought me to this forum. I finally just got my quad throttle, took a lot of negotiating with the wife lol. I have a whole list of simple macros ready to go but they dont seem to make it to the game. They download and save okay but the keycheck doesnt respond to them or the game. Could this be a system setup or firewall problem or am I just not doing something stupid. The upside of this is that I found this forum and am looking forward to trying out some of the cool stuff thats in it.
Bob Church
29th March 2009, 08:03 PM
Hi jozepi1,
Firewalls and such don't bother it. The script is usuall programmed to activate a button on the CMS Control tab, those work just like real buttons but are controlled by the script. You program the CMS buttons to send the characters or activate the buttons, etc.
Does that help? If you're still having problems come on back and we'll work it out.
Best regards,
- Bob
The StickWorks
http://www.stickworks.com
jozepi1
29th March 2009, 08:21 PM
Am I to understand that both the " press and or release" box needs to be set as well as a corresponding cms button.
Bob Church
29th March 2009, 08:36 PM
Hi jozepi1,
No. Normally it's enough to just put the character in the "Normal Action" "Press" box. The "Release" box is used when you need to execute some other action when the key is released, and the "Shifted Action" boxes are used when you've designated a "Shift" button and want it to send something completely different. You do need to set the Normal Action Press box, though, or the key will be ignored. It sets the default. If you leave the "Shifted Action" box empty, it will send the same thing as the "Normal Action" box. If you need the Shifted Action to actually do nothing, program it to send:
NULL
if you're using characters or send it to an otherwise unused CM Device axis if you're using DX Mode.
Best regards,
- Bob
The StickWorks
http://www.stickworks.com
jozepi1
29th March 2009, 08:57 PM
???? i tried a, /a, A, null a, a ENT, +a -a and every other combo i could think of or found an example of. downloads ok, saves ok, ??? in the game, aces high 2, pressing any button programmed in dx mode responds correctly. Any button in program or list mode dont respond at all. Im at a loss, it should be so simple.
Bob Church
29th March 2009, 09:57 PM
Hi jozepi1,
Could you post and attach your MAP, CMS, and any CMC files you're using? You can just attach them to the forum post. I'd be happy to take a look and see if I can spot the problem.
Best regards,
- Bob
The StickWorks
http://www.stickworks.com
jozepi1
30th March 2009, 01:11 AM
ty in advance, its probably something simple only a newbie would do. very basic, just the 4 controllers, all the buttons are programmed in the game mapping of the controllers for the variouse modes. In ah2, to start/stop an engine you must first select that engine, start or stop it and then select all engines to restore throttle control to all engines. Hence a = select eng 1, b = select engine 2, e = start/stop and f = select all engines.
Bob Church
30th March 2009, 02:22 AM
Hi jozepi1,
I ran up a quick map with just the Quad in it. I'm assuming it's the programming on buttons 2, 4, 6, and 12 that you're interested in. They all seem to work fine. The one on button two:
key +a -a +e -e +f -f
could as easily be:
a e f
just like the:
b e f
that you have on button 12. The one on button 4:
e
will produce an "e" press when you push the switch and hold it until you release the button, if you watch it in NotePad it will produce a repeating "e".
The one on button 6:
e ENT
produces:
e pressed, e released, enter pressed, enter released as soon as you click it and doesn't repeat because it has more than one character to it.
Anyway, if you downloaded it, it should work. You should see the blue buttons on the tool bar switch to the right-most of the three as far as the highlighting goes to show you it downloaded and switched to Mapped Mode okay. If that happens, click the "KeyCheck" button on the tool bar. Don't do anything that would cause things to focus on a different Window and it should show you those transitions. Alternately, once it's downloaded, just close the GUI down and run NotePad, it will show you the characters getting typed.
There are reasons it might not have the required action in the sim, but it's programmed correctly. In the sim, you might program the "a e" part in the press box, then the "f" in the release part, that way it wouldn't switch back to all engines until you released the button, but download it and try it in NotePad, make sure it's sending the characters just to be sure everything go loaded okay.
Let me know what happens!
Best regards,
- Bob
The StickWorks
http://stickworks.com
jozepi1
30th March 2009, 02:39 AM
lol still no responce from those buttons in key check or notepad.:confused:
Bob Church
30th March 2009, 02:53 AM
Hi jozepi1,
If you just plug the controllers in but don't activate the map, the center blue button should have the highlight line around it? The buttons are shown here (http://home.att.net/~stickworks/modebuttons.htm#mapbutton). There's a picture there of the "Mapped Mode" button being highligted, it the brighter blue line around the block rectangle that will ell you which mode it's in. You want that on the middle button, the one for Direct Mode button. Then click the Test/Calibration button in the GUI and see if all the controllers are listed. If they are, pick the Quad and see if the button works in the test screen. If you map it to a character, it won't work there in Mapped Mode, but in Direct Mode it should still work.
If it doesn't work, or isn't in the list at the very first screen and there's a "Rescan" button in the lower-left corner of the dialog, try clicking that. Windows may have moved the quad to some other position, it usually does that at the first restart after you plug them in, and Windows takes control back. Clicking the Rescan button asks Windows to give it back.
See if that helps and let me know what happens. I don't know if the map will work as you want, but the characters should be getting sent once you've downloaded the map and have the Control Manager in Mapped Mode.
Best regards,
- Bob
The StickWorks
http://www.stickworks.com
jozepi1
30th March 2009, 03:25 AM
without loading the map, I can select the quad from the list, enter test mode and all the buttons work, with the map loaded in direct mode and test all the buttons will light there corresponding numbers but in mapped mode and test the button will not light its corresponding number.
Bob Church
30th March 2009, 04:52 AM
Hi jozepi1,
That's probably normal. When you program a button to send a character, it necessarily disconnects the DX button, otherwise you'd get the action that the character caused plus the action that the DX button caused, so programming the character disconnects the button. It's still declared, and you can still reference it in the map, but it has no effect in the test screen. Would that explain what you're seeing? Are you still having no luck with the characters getting sent?
Best regards,
- Bob
The StickWorks
http://www.stickworks.com
Powered by vBulletin® Version 4.1.4 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.