wintin Forum Index wintin
Wintin Discussion Forum
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

String Parser addin
Goto page 1, 2  Next
 
Post new topic   Reply to topic    wintin Forum Index -> Addins
View previous topic :: View next topic  
Author Message
Gimic
Juggernaut


Joined: 16 Jun 2005
Posts: 62

PostPosted: Mon Jun 27, 2005 7:05 pm    Post subject: String Parser addin Reply with quote

I have recently created a set of string parsing functions as commands that can be used in your wintin.NET scripts to manipulate string variables. I packaged them in a nice neat little setup file for an easy install, just make sure you direct the install path to your wintin.net folder if it is not in the default location. I have also added a menu item that includes a list of the functions I have added, as well as instructions on how to use them. I hope you all enjoy... Drop me a line if you have any ideas.

Functions include:
#substr {var}{string}{int start}{int length}
#instr {var}{string1}{string2}
#left {var}{string}{ing length}
#right {var}{string}{int length}
#len {var}{string}

P.S. Drop me a line if you would like the VB.NET source code.

UPDATED


You will need to uninstall the previous version from
ControlPanel>Add Remove Programs prior to installing this if you have a previous version installed. Also, if you have your wintin.NET application installed in anything other than the default folder, be sure to point the setup file in the right direction, just like any other setup file.

New features include:
arguments in brackets are optional, I overloaded these commands.
I hope you guys enjoy.
    #inc {variable} [{int amount}]
    #dec {variable} [{int amount}]
    #proper [{variable}] {string}
    #repstr [{variable}] {string}{string to look for}{string to replace with}




My ears are always open to suggestions.


Last edited by Gimic on Mon Jul 11, 2005 6:20 am; edited 9 times in total
Back to top
View user's profile Send private message
william
Site Admin


Joined: 07 Dec 2003
Posts: 539

PostPosted: Tue Jun 28, 2005 6:19 pm    Post subject: Reply with quote

Nice going, Gimic Smile
Back to top
View user's profile Send private message Send e-mail
samadhi
Juggernaut


Joined: 15 Oct 2004
Posts: 140
Location: England

PostPosted: Tue Jun 28, 2005 8:26 pm    Post subject: Reply with quote

Nice going Gimic I can see these functions being very handy. Very Happy

Just a couple of points, could you move the Gimic Productions menu header from being in the first column where File usually sits and maybe put it under a dropdown between View and Help that would be:
Quote:
Addins -> Gimic Productions -> String Parser


Also it would have been nice to have the instructions added as a seperate entry under the Wintin standard help so that the details could be looked up in a consistent way with all of the other commands in the software. Razz
Back to top
View user's profile Send private message
Gimic
Juggernaut


Joined: 16 Jun 2005
Posts: 62

PostPosted: Thu Jun 30, 2005 12:18 am    Post subject: Reply with quote

samadhi wrote:
Nice going Gimic I can see these functions being very handy. Very Happy

Just a couple of points, could you move the Gimic Productions menu header from being in the first column where File usually sits and maybe put it under a dropdown between View and Help that would be:
Quote:
Addins -> Gimic Productions -> String Parser


Also it would have been nice to have the instructions added as a seperate entry under the Wintin standard help so that the details could be looked up in a consistent way with all of the other commands in the software. Razz


Actually, the part that controls the addins is the .addin file and whatever loads them, which for some reason seems to be loading my plugins before the others. Thus... I have no control. The reason for my company logo being a menu topic is actually a simple one.... I'm going to be making alot of addins for wintin. Eventually perhaps, during William's next release, he will just include my modules with the the release, and just mention me;) As for the help files, I don't know if I have control over the .chm file or whatever he is using for that portion of the program. So you would have to ask William about that one. Currently, I am working on a customizable HUD. A window that, when done, will hopefully allow the end-user to customize(during runtime) a window where you can add labels and link them to variables for tracking(similar to the panels), as well as buttons for macros, groupboxes.. The form and labels and the likes will be as customizable as I can get them for you guys, including form background(images or colors), label backgrounds, label positioning(via drag and drop, perhaps even dock). Then I'm going to work on a new addin that I can use to run roamer loops in tele-arena, instead of using qmodem. This one will allow for many things, such as the ability to create text files with directions to walk, that will be read, because the #map and stuff in wintin is currently somewhat buggy.... This will also include the ability to turn off the timer object(s) during combat, so that you don't lose your place on your path, allowing the ability to pick up from where you leave off after combat. I'm also prolly going to code a rich text box with color on keywords for .ws file editing, because I type so much faster than I click, and making scripts in the text form is just more efficient for me. I'll also keep an eye on the requests thread for requested command plugins. Thanks for the positive reinforcement fellaz. Wintin is a really nice program, I've used tintin++, wintin95, and .NET. William, I was wondering, in tintin++ we could use the #session to toggle connections, and manage multiple connections through one interface... How possible is it that you can pull something like that off for the next release? I was also wondering, did you do your sockets asynchronously?
Back to top
View user's profile Send private message
Gimic
Juggernaut


Joined: 16 Jun 2005
Posts: 62

PostPosted: Fri Jul 01, 2005 8:04 pm    Post subject: Reply with quote

I take that back. After looking through some of the core addin files, I figured out a way to move the menu items around. I will release an update today.
Gimic wrote:
samadhi wrote:
Nice going Gimic I can see these functions being very handy. Very Happy

Just a couple of points, could you move the Gimic Productions menu header from being in the first column where File usually sits and maybe put it under a dropdown between View and Help that would be:
Quote:
Addins -> Gimic Productions -> String Parser


Also it would have been nice to have the instructions added as a seperate entry under the Wintin standard help so that the details could be looked up in a consistent way with all of the other commands in the software. Razz


Actually, the part that controls the addins is the .addin file and whatever loads them, which for some reason seems to be loading my plugins before the others. Thus... I have no control. The reason for my company logo being a menu topic is actually a simple one.... I'm going to be making alot of addins for wintin. Eventually perhaps, during William's next release, he will just include my modules with the the release, and just mention me;) As for the help files, I don't know if I have control over the .chm file or whatever he is using for that portion of the program. So you would have to ask William about that one. Currently, I am working on a customizable HUD. A window that, when done, will hopefully allow the end-user to customize(during runtime) a window where you can add labels and link them to variables for tracking(similar to the panels), as well as buttons for macros, groupboxes.. The form and labels and the likes will be as customizable as I can get them for you guys, including form background(images or colors), label backgrounds, label positioning(via drag and drop, perhaps even dock). Then I'm going to work on a new addin that I can use to run roamer loops in tele-arena, instead of using qmodem. This one will allow for many things, such as the ability to create text files with directions to walk, that will be read, because the #map and stuff in wintin is currently somewhat buggy.... This will also include the ability to turn off the timer object(s) during combat, so that you don't lose your place on your path, allowing the ability to pick up from where you leave off after combat. I'm also prolly going to code a rich text box with color on keywords for .ws file editing, because I type so much faster than I click, and making scripts in the text form is just more efficient for me. I'll also keep an eye on the requests thread for requested command plugins. Thanks for the positive reinforcement fellaz. Wintin is a really nice program, I've used tintin++, wintin95, and .NET. William, I was wondering, in tintin++ we could use the #session to toggle connections, and manage multiple connections through one interface... How possible is it that you can pull something like that off for the next release? I was also wondering, did you do your sockets asynchronously?
Back to top
View user's profile Send private message
william
Site Admin


Joined: 07 Dec 2003
Posts: 539

PostPosted: Sat Jul 02, 2005 8:36 am    Post subject: Reply with quote

OK Gimic, I think you've discovered how to use the insertafter and insertbefore tags in menu definitions, otherwise let me know and I;ll explain them Smile

I'm very happy for people to work on the main code where it makes sense rather than coding things as addins the whole time - or maybe to move functionality from addins into the main code once they have matured. This might be easier for all concerned. Only thing is, you'd need to be able to build c++/c# code which I know is an issue for Gimic, and we'd need to set up the code in cvs so that we can check in changes without falling over each other. And I'm going to be away for most of the summer with very limited mail and no access to a development system. But if Gimic or others are interested I'll get things set up in sourceforge so that you can modify the main code and push out some development betas of wintin.

Help files for addins - I'd anticipated that each addin would have its own help file and a help menu item to go with it.

I want to do the multiple session thing. It's going to be hard, but I think I know how to work it now, both from a UI perspective and in the code. It's a biggish project and won't hapen overnight.
Back to top
View user's profile Send private message Send e-mail
Gimic
Juggernaut


Joined: 16 Jun 2005
Posts: 62

PostPosted: Sun Jul 03, 2005 11:25 pm    Post subject: Reply with quote

william wrote:
OK Gimic, I think you've discovered how to use the insertafter and insertbefore tags in menu definitions, otherwise let me know and I;ll explain them Smile

I'm very happy for people to work on the main code where it makes sense rather than coding things as addins the whole time - or maybe to move functionality from addins into the main code once they have matured. This might be easier for all concerned. Only thing is, you'd need to be able to build c++/c# code which I know is an issue for Gimic, and we'd need to set up the code in cvs so that we can check in changes without falling over each other. And I'm going to be away for most of the summer with very limited mail and no access to a development system. But if Gimic or others are interested I'll get things set up in sourceforge so that you can modify the main code and push out some development betas of wintin.

Help files for addins - I'd anticipated that each addin would have its own help file and a help menu item to go with it.

I want to do the multiple session thing. It's going to be hard, but I think I know how to work it now, both from a UI perspective and in the code. It's a biggish project and won't hapen overnight.


What concerns me, however, is if we all go altering your source, and recompiling without keeping eachothers code handy to copy/paste in our compiles, it could become somewhat hairy. One person will code a cool feature, as well as another. They both release at the same time, and then what? People have two completely different versions. I'll stick to addins anyway for now, simply because you did this project so well, that I can almost do anything I want as if I were within the source itself, with a few exceptions. I tried the visual C# express edition, and still cannot get the libraries or the entire project to compile. I only tried once, and didn't spend much time messing with them.... All I did was point to the putty solution file in the main directory of the source. However, it claims there were missing files and whatnot, so I attempted to add the magic lib as a resource to every single sub/project within the entire project, and that still would not work. I'm sure I'll figure it out. The express edition is severly lacking in bells and whistles, so I will see if I can get my hands on a copy of vc# 2003 at school. They have liscenses to hand out software from M$. In the mean time.. I updated my addin, and yes I did find the insertafter while going through some of the core addin files.
Cheers, and have a wonderful vacation, if that is your reason for being gone.
Back to top
View user's profile Send private message
william
Site Admin


Joined: 07 Dec 2003
Posts: 539

PostPosted: Mon Jul 04, 2005 6:30 am    Post subject: Reply with quote

That's what source code control systems are there to fix, Gimic.

But as a starting point it would help a lot if you could find a way to move to coding in c#, because then at least I can copy parts of your addin into the main source tree. I don't want to mix c# and vb in the main source.

Assuming you're happy to see some of yuor commands make it into the main program over time, that is.
Back to top
View user's profile Send private message Send e-mail
Normstorm
Veteran


Joined: 29 Jun 2005
Posts: 28

PostPosted: Mon Jul 04, 2005 9:46 am    Post subject: Reply with quote

Some form of online version control process would be great. It'd be good to get Gimic's AddIns into the core Wintin.NET deployment, at least in a beta release initially so everyone has access to them from the getgo instead of having to deal with a separate AddIn deployment. If you need a hand, I can port them to C#, lemme know.
Back to top
View user's profile Send private message Visit poster's website AIM Address
Gimic
Juggernaut


Joined: 16 Jun 2005
Posts: 62

PostPosted: Mon Jul 04, 2005 5:46 pm    Post subject: Reply with quote

What is wrong with just adding the .addin and the lib to the setup files to be placed along with everything else, and pulling out my menu item and adding the info to the help file? Of course, I would like to be recognized in some way for my work, and I'm sure you will be more than willing to put that somewhere in the program.

Granted, I do see an advantage to being able to compile c#. I would love to be able to actually compile some changes I've made. I'll look into getting a good copy next week from school, if they have it.
Back to top
View user's profile Send private message
Normstorm
Veteran


Joined: 29 Jun 2005
Posts: 28

PostPosted: Mon Jul 04, 2005 5:52 pm    Post subject: Reply with quote

Gimic wrote:
What is wrong with just adding the .addin and the lib to the setup files to be placed along with everything else, and pulling out my menu item and adding the info to the help file?


Nothing wrong with that at all. What I meant is it'd be nice to have it as part of the full install when first-time users download it off Wintin.NET. Whether it's an AddIn or additional methods in the existing code matters not to me as long as the end user has it and as a developer you know that if they have like version 1.0x or above, then you won't have to worry about using the newer commands and them not having it. So I think we're on the same page here.
Back to top
View user's profile Send private message Visit poster's website AIM Address
william
Site Admin


Joined: 07 Dec 2003
Posts: 539

PostPosted: Tue Jul 05, 2005 7:48 pm    Post subject: Reply with quote

I've checked all the source into cvs at http://sourceforge.net/projects/wintin/ , so if anyone does want to contribute to the mainline code you can create an account at sourceforge and let me know - I will add you to the developers group so that you can check in changes.

In order to use cvs with sourceforge you need to install cvs and ssh. This is pretty easy provided you follow the instructions, which I can provide.
Back to top
View user's profile Send private message Send e-mail
william
Site Admin


Joined: 07 Dec 2003
Posts: 539

PostPosted: Tue Jul 05, 2005 7:53 pm    Post subject: Reply with quote

BTW I don't see an inherent problem with just merging the Gimic addins into the main distribution when they are ready, and in that case there's no reason they shouldn't stay in VB.Net. But let's keep it under review - we should try and keep the main source as coherent as possible, otherwise it will become hard to maintain.
Back to top
View user's profile Send private message Send e-mail
Gimic
Juggernaut


Joined: 16 Jun 2005
Posts: 62

PostPosted: Wed Jul 06, 2005 2:38 pm    Post subject: Reply with quote

william wrote:
BTW I don't see an inherent problem with just merging the Gimic addins into the main distribution when they are ready, and in that case there's no reason they shouldn't stay in VB.Net. But let's keep it under review - we should try and keep the main source as coherent as possible, otherwise it will become hard to maintain.


If you choose to do so, just advise me, and I'll kill the downloads here on the threads, so that people don't try installing them for no reason.
Back to top
View user's profile Send private message
Normstorm
Veteran


Joined: 29 Jun 2005
Posts: 28

PostPosted: Mon Jul 11, 2005 2:18 am    Post subject: Incompatibility with 1.05 beta Reply with quote

I received an error upon startup after I put the DLL in my bin\Debug directory and the addin in the AddIn sub-folder. What I did was delete the delgroup definition from your strParse.addin file since delgroup is now native to 1.05 beta. That seemed to correct the issue.

Another issue is if the strParseInstructions.txt file doesn't exist where it's supposed to, it crashes Wintin.NET. There could probably be a more graceful way of handling that.

Otherwise repstr which is what I use works great.
Back to top
View user's profile Send private message Visit poster's website AIM Address
Display posts from previous:   
Post new topic   Reply to topic    wintin Forum Index -> Addins All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group