Help - Search - Members - Calendar
Full Version: Please test, CCXUI - BETA users.
StealthBot.net > StealthBot > Scripting and Plugins > Plugin Projects > Custom Command Xystem (CCX)
Snap
In order to test this; you'll need StealthBot Beta - (Revision 23 preferred) And you'll need CCX: 1.53 (Required for Sorting):
http://snapnjacks.com/CustomCommandX.plug


CCXUI -
http://snapnjacks.com/CCXUI.plug


~Feedback on:
Look & Feel.
Speed on the sorter.
Concepts employed - like, selecting another command, saves the one you were working on.

To use- go to Plugins -> CCX User-Interface -> Custom Command Manager

- I kinda patched issues as I ran into them - but hopefully this could be used to help scripters use UI forms.
PhiX
Look & Feel: Great!
Speed on sorter: Couldn't really test it, because I have only a few custom commands. So it was super fast for those (few ms).
Concepts employed: Saving an unsaved command when switching to another command worked.

Issues:
  • It doesn't convert the "& " into line breaks in the form, it just shows "& ".
  • And I don't know if this is working as intended:
    QUOTE
    [00:42:44.459] CCXUI: CustomCommand User-Interface Unloaded.
    [00:42:44.527] CCXUI: CustomCommand User-Interface Loaded.
    [00:42:44.636] Custom Command Manager
    It only showed all 3 AddChats at once when I opened the Custom Command Manager again.
  • I don't know if that's even possible to change, but the tab order for the form elements is strange.
  • When there is a delete button for commands, why isn't there an add button as well? ohmy.gif
  • When I used the sort command, it only took 62ms. But when I hit the Apply and Close button then, I got the following error:
    QUOTE
    [00:56:17.778] Scripting runtime error '381': (line 144; column 3)
    [00:56:17.801] Invalid property array index.
    [00:56:17.811] Offending line: >>
    The error pops up every time I use that button. Closing the window with the little X works. But the error keeps popping up. Even if I open it again and do not sort the custom commands. I think it broke something. ;[
That's everything I tested and could find so far. So other than that, great job!
Jack
It sorted about 300 random named commands in 250ms.
It sorted about 900 random named commands in 1252ms.
It sorted about 2000 random named commands in 4867ms.

Only problem I see is that it makes it all lowercase.

[18:28:10.324] Scripting runtime error '381': (line 144; column 3)
[18:28:10.344] Invalid property array index.
[18:28:10.374] Offending line: >>

After I hit "Apply and Close"
Snap
Updated; Visit above link again (press refresh if it doesn't say 1.5)

CODE
'//1.5
'//Added an Add Command button - Thanks Phix
'//Code clean-up - removed some addchats, commented code - etc.
'//Updated the Delete function, to select the next command.
'//Added a ton more comments to improve understandability.
'//Fixed the Apply & Close button. Thanks Jack
'//Improved sorting time accuracy.
'//Fixed the Tab-Indexes - Thanks Phix!


I couldn't find anything wrong with this version - It's nice.
Let me know what you guys find. - Try and 'break' it.
Thanks tons for the feedback, made it easy to fix.

Glad to see a bubble sort is good for this.

Edit: It's a CCX bug that causes the lower-case-- but I'm not sure that this is an undesired result.
I haven't decided to replace "& " with new lines yet- as with CCX you could use new lines to create easier-to-understand commands.
JPT
I like your plugin and the idea to extend on custom commands, but I think VBScript should be used instead of replacing complex variables/functions. It would be easier to implement, easier to code, and would give commands access to plugins. It would also give more power to the person making a command and help those who are still learning VBScript.
riffruff
This is an alternative for easily creating new commands. And, as a FYI, this plugin replaces the custom commands in the beta. There are no built in custom commands in the beta -- only this plugin.
Snap
QUOTE(JPT @ Jan 6 2009, 05:24 PM) *

I like your plugin and the idea to extend on custom commands, but I think VBScript should be used instead of replacing complex variables/functions. It would be easier to implement, easier to code, and would give commands access to plugins. It would also give more power to the person making a command and help those who are still learning VBScript.

The original reason I got into scripting in the first place, was due to RaiBot - which used complex CC's (not quiet as nice as CCX, but close).
As riffruff mentions, CCX is only as complex as the user wants it to be. - I argue it's value here: http://www.stealthbot.net/board/index.php?showtopic=27603
It's plugin compatibility is awesome; - If you use CCX, and SnapNJacks you can use %st_score(%1) (and more) in a CC.
CCX is not a replacement to VBs; it's a compliment. Even though it can be used to write a command that would take a 100+ line plugin to do the same job.

P.S. - The code is already mostly done; - but i'm not sure if that's what you referring to as "easier to code".
JPT
I'm not completely sure you understand what I was talking about when I mentioned VBScript. I was talking about storing the code for a command somewhere (a file) and executing it via the Execute statement. So you would store the code, the required access, the required flags, and aliases somewhere and the plugin would interpret a user's message and execute the code if all conditions (access/flags, enabled, trigger) pass. Some basic information such as username, flags, ping, origin, and the message would be passed. It would be a plugin system for commands.
Snap
Ah, yes I did misunderstand.

- I'm not sure about that;
I think that we should add a registercommand function to the PS system that works very much like the menu's do:
CODE
Sub Example_Event_Load()
   '//If it throws an error.
   On Error Resume Next
   '// RegisterCommand(Prefix, CommandName, Access, Flags, Type (determins if usable outside of the bot, and other options)
   RegisterCommand "Example", "Dance", 20, "", 1
   If Err.Number <> 0 Then
      '//I.E. "Example: Command "Dance" already exists from plugin: "OtherPlugin" "
      Addchat VBwhite, "Example: " & Err.Description
   End If
   '//Woosh, all gone.
   Err.Clear
   On Error Goto 0
End Sub

Sub Example_Commands_Callback(Command, Username, Args, DspID)
   Select Case Command
   Case "Dance"
   Dsp DspID, "/me Dances", Username, 0
   End Select
End Sub



If I understand what you're saying, - it would Require a UI form; and you couldn't make commands from in the channel-- well, I guess you could with a lot of :'s -- And would be as powerful (and risky) as /exec
But if it's the user doing it anyway-- he might as well open notepad++ and write it.
However, it's a cool concept- to have all your commands organized like that- click on a command and view the VBs code for it right in the box.
-- Or am I still misunderstanding?

The above concept would be a step in the right direction - as far as easily created VBs commands.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2019 Invision Power Services, Inc.