www.ClassicTW.com
https://mail.black-squirrel.com/

Issue with SWATH Triggers
https://mail.black-squirrel.com/viewtopic.php?f=15&t=18958
Page 1 of 2

Author:  Runaway Proton [ Sat Mar 10, 2007 10:15 am ]
Post subject: 

I just reorganized my scripts.  I had everything in the root directory and it was hard to find, so I organized some of my scripts by author/function in folders named as such. 
Problem is this,.. Now after reseting the triggers to the scripts new locations I'm getting an error on SOME (not all) of the scripts stating that they are not compiled scripts and the script fails.  The scripts are the same that I used before successfully, and are .cts files.  Only thing is the location they're at.  But to make matters worse, I moved them back to the original location, and they still failed  Is there a setting I flipped by accident or something?  The biggest issue is with CK scripts such as surround and ship cap.  I did after all was said and done copy over the scripts with known good copies from another computer, but no change.
 
 

Author:  Singularity [ Sat Mar 10, 2007 10:23 am ]
Post subject: 

My guess would be that the triggers are no longer pointed to the scripts. Reload your scripts and go back thru and edit and correct the triggers. I'm sure the script files are fine, you're probably just telling twx to load the wrong file.

Author:  Cerne [ Sat Mar 10, 2007 10:53 am ]
Post subject: 

Sing wrote a post about ordering scripts in swath here:

http://vulcansforge-online.net:99/forum ... .php?t=844

putting all of your scripts in subdirectories throws off where the scripts think other scripts are and/or where the include directory is.

I put all of my scripts in the script directory and altered my swath.cfg file to group the scripts by author like this:

Code:
<TWXProxy>
    <MenuKey>$</MenuKey>
     <ScriptDirectory>D:\TW2002\TWXProxy\scripts</Script Directory>
    <MenuFilters>
      <SubMenu prefix="1_">Pack 1</SubMenu>
      <SubMenu prefix="2_">Pack 2</SubMenu>
      <SubMenu prefix="_ck">Cherokee Public</SubMenu>
      <SubMenu prefix="__ck">Cherokee Combat</SubMenu>
      <SubMenu prefix="3_">Dynarri</SubMenu>
      <SubMenu prefix="4_">Promethius</SubMenu>
      <SubMenu prefix="5_">Wildstar</SubMenu>
      <SubMenu prefix="6_">RammaR</SubMenu>
      <SubMenu prefix="7_">Caretaker</SubMenu>
      <SubMenu prefix="8_">Traitor</SubMenu>
      <SubMenu prefix="9_">Alexio</SubMenu>
      <SubMenu prefix="_cerne">Cerne</SubMenu>
      <SubMenu prefix="_ender">Ender</SubMenu>
      <SubMenu prefix="_oz">OZ</SubMenu>
      <SubMenu prefix="ep">EP</SubMenu>
      <SubMenu prefix="extras">Extras</SubMenu>
    </MenuFilters>
  </TWXProxy>

Author:  Parrothead [ Sat Mar 10, 2007 3:39 pm ]
Post subject: 

Well actually thats not the only solution.

Author:  Cerne [ Sat Mar 10, 2007 7:29 pm ]
Post subject: 

Parrothead wrote:
Well actually thats not the only solution.


So are you going to tell us or should we start guessing?

Cerne

Author:  Singularity [ Sat Mar 10, 2007 8:08 pm ]
Post subject: 

And btw, those prefixes are wrong.

Author:  Parrothead [ Sat Mar 10, 2007 8:15 pm ]
Post subject: 

Cernnunos wrote:
Parrothead wrote:
Well actually thats not the only solution.


So are you going to tell us or should we start guessing?

Cerne

My ICQ is open to anyone with questions who want anwsers Cerne. Navhaz.com or Vulcan's forum is the place for these discussions
This board is for Smack only I believe or didnt you get the hint on your last post.

Author:  Cerne [ Sat Mar 10, 2007 9:47 pm ]
Post subject: 

Sing, they are not wrong in my swath.cfg because those are the prefixes I use to manage my script collection.



It was an example, not something to be copied and pasted into someone else's swath.cfg.



Cerne

Author:  Singularity [ Sat Mar 10, 2007 10:03 pm ]
Post subject: 

I use dny_ or dyn_ as a prefix (usually dny). Ram uses ram_, CT uses _vid_ usually, traitor uses _T_, alex is _alexio_, etc, etc. Obviously if you're renaming things then that's a different story... =)

There are numerous ways to organize your files. I use a series of rexx scripts (not much to them) and assign them to hotkeys based on function or need. For instance all of my unlim speciality scripts are on shift-F7. All of my speciality (barely used) turn scripts are on F7. I could just as easily use the little bar on the right if I wanted. Could just as easily use a TWX script to do the same.

Swath is picky about how it handles script calls. It needs to know that the script exists first, and then it only reserves 1 script per name. For instance if you have a .ts script and then compile it as a .cts you will mess up your .ts triggers.

If swath can't track a script, the hotkey will stop working. If you point the hotkey to the wrong file, or to a directory instead of the file itself, I'm not sure what will happen... but it's the only thing I can think of that would cause swath to do what RP is describing. I try to keep my exposure to swath's innards down to a minimum, it's insanely easy to mess stuff up. Always keep a backup of your swath.cfg.

One thing I've wanted to do for some time is find a way to alter the font size (well, the number of lines on the screen actually) in some way. You can do this in your comms window area by clicking on it and holding down ctrl-alt and then scrolling the mouse wheel. Only you can't do that on the main window.

Author:  Parrothead [ Sat Mar 10, 2007 10:10 pm ]
Post subject: 

Well RP's problem is with his path now anyway not the trigger themselves which are gone from his config file.

Author:  Singularity [ Sat Mar 10, 2007 10:32 pm ]
Post subject: 

Oh lovely...

Are you sure that mis-setting the path will give that error? Have only done it once, but when I did all of the triggers went poof and I never got any kind of error(s) from it.

Author:  Cerne [ Sat Mar 10, 2007 11:12 pm ]
Post subject: 

Most of the tried and true scripts such as ck's public and combat pack (and oz's planet trader and st_bot) expect to find the other scripts they need in the root of the script directory and the includes below the script directory as in the example below.

\twxproxy\scripts\
\twxproxy\scripts\includes

when you make directories under scripts to sort your script files, it throws
many things slightly off

\twxproxy\scripts\ck

\twxproxy\scripts\oz

etc....

in order for the script call for _ck_buydown.cts (from other scripts) to work the call would need to be changed to '..\_ck_buydown.cts' instead of just '_ck_buydown.cts' which isn't really practical. also any call to an include would need to be changed as well.

Now the swath triggers on the other hand stop working if you make any changes to the names or locations of any script for which a trigger was set.

The simple fix is to just delete the trigger and recreate it.

All in all you should probably put back all the scripts in the script directory and use either the swath.cfg solution or the ph_menu solution for sorting and managing your scripts.

Cerne

Author:  Parrothead [ Sun Mar 11, 2007 12:25 am ]
Post subject: 

He thinks he has triggers set but he doesnt. I always back up a copy of my swath cfg file so I can replace it if something strange happens. (Learned the hard way twice). His error is that nothing happens which is consistant.
 
Cerne sub directories don't cause a problem.There is a trick to using them in conjunction with swath (virtual)sub menus but I perfer ZOC menus so I dont fool with that much anymore. Im posting a Zoc menu on Navhaz.com its very simple and any non-scripter should have no problem adapting them to there needs.They work in Zoc and Swath so should be good for everyone.
../scripts/cash/need_include_to_work.ts will find the file it needs to compile.

Author:  Singularity [ Sun Mar 11, 2007 1:51 am ]
Post subject: 

Laff, that menu is the one I came up w/ from zentock's old air support handler. It's pretty handy.

Author:  Wildstar [ Mon Mar 12, 2007 1:37 pm ]
Post subject: 

Singularity wrote:
I use dny_ or dyn_ as a prefix (usually dny). Ram uses ram_, CT uses _vid_ usually, traitor uses _T_, alex is _alexio_, etc, etc. Obviously if you're renaming things then that's a different story... =).


I use 5_Wildstars Personally

Page 1 of 2 All times are UTC - 5 hours
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/