PDA

View Full Version : Can'd find where to add CMS script in Control Manager



Krenath
26th December 2009, 04:23 PM
Okay, I just got a Multi Function Panel to replace my old Ergodex DX-1 which stopped working when I upgraded to Vista.

Now that I have the MFP, I can't believe I waited to long to get it! While the hardware's pretty much identical, the software is far beyond anything that Ergodex ever put out and really takes this hardware to the next level.

So far I've managed to figure out a lot of the CH manager and have created my own CMC file for a game I'm playing currently, but now I want to script a few buttons and somehow the Control Manager isn't acting like that tutorials I've read say it should.

When I open the CM Editor to edit my CMC files, I'm expecting there to be another tab for the CMS file, or a way that I can add a CMS so that a tab for the CMS will appear. I can find no such option regardless of where I look.

Following the information in the Control manager Help, I sort of expected the CM Editor to create a CMS file once I added the CMS controls as a controller. No dice.

I've considered just adding a CMS file manually in the same folder but I'm not sure that will result in the Control Manager recognizing the file and using it.

Can someone tell me what I'm missing?

Krenath
26th December 2009, 04:27 PM
Just discovered that a blank CMS file is already in the Maps directory, but for some reason the CM Editor doesn't feel like displaying it for me..

Krenath
26th December 2009, 04:30 PM
Aha. At some point after adding the CMS controls, saving the map, and downloading the map to the controller, the CH Editor decided to play nice and display the blank CMS file.

Bob Church
26th December 2009, 06:32 PM
Hi Krenath,

You need to add the CMS Controls to the map first. Use the "Add" button, they're at the bottom of the list that has the FighterStick, ProPedals, etc. You'll get another tab at right end of the other device tabs that says "CMS Controls". Once that's there, the CM Editor button will become active. Click that and the editor should open and there will be an empty script. Some comment lines at the top for Map Name, Author, etc. and then just:


script
endScript

The script/endScript are the empty script. You just need to insert whatever scripting you actually want to use between them. You don't get a tab on the Editor screen unless you specify a CMC file, then there'll be a tab for the CMS file and one for the CMC file since the same editor handles them both.

Best regards,

- Bob

The StickWorks
http://www.stickworks.com

Krenath
27th December 2009, 05:37 AM
My problem seemed to be that until I added the CMS controls to the map, no CMS file tab was created. When opening the CM Editor, there was just the one tab.

Unless and until you do add CMS Controls to the map, apparently no CMS file will be created and no CMS tab will appear.

Bob Church
27th December 2009, 10:27 AM
Hi Krenath,

No, it's never automatic. Somebody has to type it up, and there was a problem awhile back with it loading a blank file under the right circumstances. I didn't get a CMC file with the map you posted at all. I cut it out of the post itself, I don't know if that was complete or not. CMC files are just text-replacements. You make a file up that says:

GearUp g
GearDown G

and so on. Wherever you can use a character command, you can usse the macro name instead. GearUp on the map makes more sense than just "g", but somebody has to look it up and make the file up in the first place. A lot of times, if you check here or, if the sime has its own site, check there, and you'll find that somebody has done that. You may not care for what the map does, but the CMC file only maps command names to characters, doesn't really matter. You can use it in your own map, you just need to specify it on the Program Settings tab.

Best regards,

- Bob

The StickWorks
http://www.stickworks.com

Krenath
27th December 2009, 05:19 PM
I think perhaps your last reply was intended for a different thread or something. My problem was not with the Command File (CMC) at all.

I was trying to find out how to go from not having a CM Script File (CMS) at all to having one and being able to edit it in the CM Editor.

What confused me originally was that you have to add CMS Controls to the map before the CM Script File (CMS) tab will even appear in the CM Editor. Without the CMS controls, the CM Script File (CMS) tab is totally hidden.

Everything I read said they go together, sure, but nothing said that the way to un-hide the CM Script File (CMS) tab is to add the CMS controls to the map. This was somewhat non-obvious to me.


I had a map that had nothing but the MFP controller.
I had a Command File (CMC) with all my macros defined.
I had all my buttons properly assigned to macros and working perfectly.
I did not have CMS Controls added to the map and did not know I needed to.


At this point, I wanted to add some more complicated behavior than the Command File (CMC) alone can provide. I wanted to create a button that would send a mouse-click to a particular X/Y position on the screen.

When I went into the CM Editor try to write some script, there was the Command File (CMC) tab but there was no CM Script File (CMS) tab in the CM editor at all. And no obvious way to create one. Although I did not know it at the time, this was simply because I had not yet added the CMS Controls to the map.

Now it seems obvious that if you want to use scripting, you'll need the CMS Controls so that you have something to assign values to, but I couldn't find anything that documented what you have to do first to get the scripting ball rolling. I was trying to create the CM Script File (CMS) first and then worry about the CMS Controls later. This doesn't work. Without the CMS Controls added to the map, you do not have access to editing a CM Script File (CMS) at all.

Eventually (18 hours later) I discovered that if you want to add a CM Script File (CMS) to a configuration that doesn't already have one, you can:


Click the "Add Controller to Map" button and add the CMS Controls to your map
Click Save
Click Download


Now if you go back into the CM Editor there will finally be two tabs, one containing your Command File (CMC) and its key macros and a new tab which contains an empty CM Script File (CMS) which looks like this:

// CMS Script File
//
// Game Title:
// Written By:
// Date:
//
script

endScript

and lets me now add and edit scripting code just fine.

The rest of my posts in this forum have been simply to leave a trail of information so the next person who tries searching can hopefully find an explanation right off.

Bob Church
27th December 2009, 06:56 PM
Hi Krenath,

You're right, I was thinking CMC files. Actually, there's not a lot of point to making the CMS file available unless you add the CMS Controls. They're the only way that the CMS file has to actually do anything. Offhand, the only thing I can think of that CMS could do without the controls would be to set the Mode. Everything else requires you to use a button or an axis on the CMS tab to have any effect on what the map does.

Best regards,

- Bob

The StickWorks
http://www.stickworks.com

Krenath
27th December 2009, 09:33 PM
Yeah. Without the CMS controls, the CMS file is pretty useless, I agree.

But for a new user trying to get the hang of things, hiding the tab makes things confusing. You can't get where you want to go and there are no clues.

In my personal opinion, the CM editor ought to always display have a tab for the CMS file.

If the user tries to go to that tab when there are no CMS controls mapped, he should be told "To use a CM Script File, you must first add the CMS Controls to your mapping. Do you wish to do that now?" And if the user answers 'Yes' then the CMS controls are auto-added and he's into the scripting file, ready to go. No muss, no fuss, no bother.

Bob Church
28th December 2009, 12:01 AM
Hi Krenath,

Actually, if you hit the button and the CMS Controls haven't been added and no CMC has been specificied on the Program Settings tab, it will pop a dialog telling you that the button is disabled because of those reasons.

You can also click the "What's This?" button over to the right of the yellow book and then click the Editor button, it will pop up with a reference about the need to include the CMS Controls and give you a link into the Users Guide that rambles on about how it all works. Normally it's online too, but the StickWorks is moving and all the old URLs are defunct at the moment.

Some compromises have to be made. It would be nice if eveything was visible, or if people were born with the knowledge for that matter, but it's a 200 page manual, The info just won't all fit on the screen at one time.

Best regards,

- Bob

The StickWorks
http://www.stickworks.com

Krenath
28th December 2009, 12:07 AM
Hi Krenath,

Actually, if you hit the button and the CMS Controls haven't been added and no CMC has been specificied on the Program Settings tab, it will pop a dialog telling you that the button is disabled because of those reasons.

Yeah, but it appears that if you have successfully added a Command file, that popup doesn't appear anymore to remind you what to do about a CM Script file.

Still, I managed to solve my issue and I'm only really continuing this thread so there's something for the next person to search for.