Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


RE: VBScript Array Expansion Library

 
Logged in as: Guest
arrSession:exec spGetSession 2,17,41454
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> Windows Script Components >> RE: VBScript Array Expansion Library
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: <<   < prev  1 [2]
Login
Message << Older Topic   Newer Topic >>
 RE: VBScript Array Expansion Library - 2/13/2007 5:48:59 PM   
  TNO


Posts: 1064
Score: 10
Joined: 12/18/2004
From: thenewobjective.com
Status: offline
Its probably safer if it was changed to always register in the system32 folder, but I didn't want to make any assumptions. You never know, someone might want it in a weird spot.

_____________________________

To iterate is human, to recurse divine. -- L. Peter Deutsch

(in reply to DiGiTAL.SkReAM)
 
 
Post #: 21
 
 RE: VBScript Array Expansion Library - 2/14/2007 1:44:21 AM   
  DiGiTAL.SkReAM


Posts: 1157
Score: 7
Joined: 9/6/2005
From: Florida, USA
Status: offline
TNO,
This is an awesome addition tot he vbs array 'family'.  My only issues lie in getting used to the way it works:

      

I then have a modified myarray.  I am too used to vbs not modifying the original, and letting my do things like


      


Guess I'm just lazy.

_____________________________

"Would you like to touch my monkey?" - Dieter (Mike Meyers)

"It is better to die like a tiger, than to live like a pussy."
-Master Wong, from Balls of Fury

(in reply to TNO)
 
 
Post #: 22
 
 RE: VBScript Array Expansion Library - 2/28/2007 2:42:05 AM   
  DiGiTAL.SkReAM


Posts: 1157
Score: 7
Joined: 9/6/2005
From: Florida, USA
Status: offline
I am finding problems with the Compare function.
Whether I select 0,1, or 2, it always returns the boolean of whether the arrays match, but not the matching/unmatched pairs.


_____________________________

"Would you like to touch my monkey?" - Dieter (Mike Meyers)

"It is better to die like a tiger, than to live like a pussy."
-Master Wong, from Balls of Fury

(in reply to DiGiTAL.SkReAM)
 
 
Post #: 23
 
 RE: VBScript Array Expansion Library - 4/2/2007 6:52:46 AM   
  TNO


Posts: 1064
Score: 10
Joined: 12/18/2004
From: thenewobjective.com
Status: offline
Thanks, I'll look into it soon as I get the chance. My return from Iraq has kinda jacked my schedule

_____________________________

To iterate is human, to recurse divine. -- L. Peter Deutsch

(in reply to DiGiTAL.SkReAM)
 
 
Post #: 24
 
 RE: VBScript Array Expansion Library - 4/3/2007 12:31:08 AM   
  DiGiTAL.SkReAM


Posts: 1157
Score: 7
Joined: 9/6/2005
From: Florida, USA
Status: offline
Excuses, excuses...


_____________________________

"Would you like to touch my monkey?" - Dieter (Mike Meyers)

"It is better to die like a tiger, than to live like a pussy."
-Master Wong, from Balls of Fury

(in reply to TNO)
 
 
Post #: 25
 
 RE: VBScript Array Expansion Library - 4/3/2007 6:06:22 AM   
  TNO


Posts: 1064
Score: 10
Joined: 12/18/2004
From: thenewobjective.com
Status: offline
This should fix the issue (FYI this will currently work properly with arrays of the same size. I'll make it recursive in a day or two for arrays of any size)



Attachment (1)

_____________________________

To iterate is human, to recurse divine. -- L. Peter Deutsch

(in reply to DiGiTAL.SkReAM)
 
 
Post #: 26
 
 RE: VBScript Array Expansion Library - 7/12/2007 12:52:50 PM   
  TNO


Posts: 1064
Score: 10
Joined: 12/18/2004
From: thenewobjective.com
Status: offline
Version 2.2

Talk about getting sidetracked.....

I've corrected the Compare bug to work as intended. Enjoy.

For version 3.0 I'm considering implementing some more complex functions found in other languages like Perl (Pack() and Unpack() functions). If there are any other suggestions/requests please let me know

_____________________________

To iterate is human, to recurse divine. -- L. Peter Deutsch

(in reply to TNO)
 
 
Post #: 27
 
 RE: VBScript Array Expansion Library - 7/13/2007 1:22:28 AM   
  ebgreen


Posts: 4613
Score: 31
Joined: 7/12/2005
Status: offline
Well if you want to go really crazy, how about data persistence. Dump to XML and Retrieve form XML maybe?

_____________________________

"... when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick
Goog places to start:http://www.visualbasicscript.com/m_24727/tm.htm
http://www.visualbasicscript.com/m_47117/tm.htm

(in reply to TNO)
 
 
Post #: 28
 
 RE: VBScript Array Expansion Library - 7/13/2007 3:21:54 AM   
  TNO


Posts: 1064
Score: 10
Joined: 12/18/2004
From: thenewobjective.com
Status: offline
Not sure if I follow. Could you show me a generic example of the idea?

_____________________________

To iterate is human, to recurse divine. -- L. Peter Deutsch

(in reply to ebgreen)
 
 
Post #: 29
 
 RE: VBScript Array Expansion Library - 7/13/2007 5:29:07 AM   
  ebgreen


Posts: 4613
Score: 31
Joined: 7/12/2005
Status: offline
So let's say that I am using an array name arrFoo and it contains all of my favorite colors. In the script i do something to the array (add blue). Now the script is finished but the next time that I want to run the script I don't want to have to add blue again. I want the script to run and be able to remember what the array had in it last time. This is data persistence. There are lots of ways to do this. One of the easiest is to use a text file. In this case I was suggesting the use of an xml file to be more specific. So you would have 2 new methods. The first would be .DumpToXML(strFile). You give it a valid patha nd file name and the contents of the array are dumped there. The second method would be .LoadFromXML(strFile). You give it a valid file name and path and the array populates itself from the XML file. Note that this fits in nicely with Ehvbs' challenge of the Millennium.

_____________________________

"... when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick
Goog places to start:http://www.visualbasicscript.com/m_24727/tm.htm
http://www.visualbasicscript.com/m_47117/tm.htm

(in reply to TNO)
 
 
Post #: 30
 
 RE: VBScript Array Expansion Library - 7/14/2007 11:22:27 AM   
  TNO


Posts: 1064
Score: 10
Joined: 12/18/2004
From: thenewobjective.com
Status: offline
actually, I kinda like the concept:

XMLLoad("file.xml","XPath Expression")
XMLSave("file.xml","XPath Expression")

that should keep it dynamic enough to let you use any XML list you want.

The PERL pack/unpack concept is a little mind boggling for me at the moment so that addition may take a bit to implement (I expect it to be a bit buggy since I barely have any idea how it works at the moment and it comes with alot of options).

_____________________________

To iterate is human, to recurse divine. -- L. Peter Deutsch

(in reply to ebgreen)
 
 
Post #: 31
 
 RE: VBScript Array Expansion Library - 7/14/2007 11:23:19 AM   
  TNO


Posts: 1064
Score: 10
Joined: 12/18/2004
From: thenewobjective.com
Status: offline
Hell, if that JoinX() idea/challenge works out I might have to dump that in the library too

_____________________________

To iterate is human, to recurse divine. -- L. Peter Deutsch

(in reply to TNO)
 
 
Post #: 32
 
 RE: VBScript Array Expansion Library - 7/15/2007 7:36:13 PM   
  ginolard


Posts: 1023
Score: 21
Joined: 8/10/2005
Status: offline
I can never get this to register.  I've followed the instructions for amending the File Type and creating the regfile and still get an error from REGSVR32

_____________________________

Author of ManagePC - http://managepc.net
AD Query Template - http://www.visualbasicscript.com/m_40609/tm.htm
Consolidated Scripting Framework - http://www.visualbasicscript.com/m_59109/tm.htm

(in reply to TNO)
 
 
Post #: 33
 
 RE: VBScript Array Expansion Library - 7/15/2007 11:08:06 PM   
  TNO


Posts: 1064
Score: 10
Joined: 12/18/2004
From: thenewobjective.com
Status: offline
Curious. I recreated the registration portion from scratch just in case. It should be working now.

_____________________________

To iterate is human, to recurse divine. -- L. Peter Deutsch

(in reply to ginolard)
 
 
Post #: 34
 
 RE: VBScript Array Expansion Library - 7/15/2007 11:14:27 PM   
  ginolard


Posts: 1023
Score: 21
Joined: 8/10/2005
Status: offline
Ah, OK , now it works.

_____________________________

Author of ManagePC - http://managepc.net
AD Query Template - http://www.visualbasicscript.com/m_40609/tm.htm
Consolidated Scripting Framework - http://www.visualbasicscript.com/m_59109/tm.htm

(in reply to DiGiTAL.SkReAM)
 
 
Post #: 35
 
 RE: VBScript Array Expansion Library - 9/30/2007 6:43:14 AM   
  TNO


Posts: 1064
Score: 10
Joined: 12/18/2004
From: thenewobjective.com
Status: offline
I've decided against adding XML related functions to the library so far, since its necessity hasn't convinced me yet.

Changes in this version (2.3):

Replace() function is now called ReplaceX(). I overlooked the fact this was already a predefined function name in VBS.

Split2() function is now called SplitX(). Giving Functions a version designation is bad practice IMO

The reference for SplitX() has been updated to provide a quick guide for using regular expressions with the function, and what to expect. (Later I plan to implement the Scripting challenge alternative so vbs regexp is used instead)

The JoinX() function from the Scripting challenge has been added

The CStrX() function from the Scripting challenge has been added. (Renamed from toDispString() to CStrX() )

Code has been optimized to remain under 16k in size

_____________________________

To iterate is human, to recurse divine. -- L. Peter Deutsch

(in reply to ginolard)
 
 
Post #: 36
 
 RE: VBScript Array Expansion Library - 4/24/2008 6:53:26 AM   
  TNO


Posts: 1064
Score: 10
Joined: 12/18/2004
From: thenewobjective.com
Status: offline
This component has been superseded by this one, enjoy:

http://www.visualbasicscript.com/m_59109/tm.htm

_____________________________

To iterate is human, to recurse divine. -- L. Peter Deutsch

(in reply to TNO)
 
 
Post #: 37
 
 RE: VBScript Array Expansion Library - 4/24/2008 6:53:50 AM   
  TNO


Posts: 1064
Score: 10
Joined: 12/18/2004
From: thenewobjective.com
Status: offline
This component has been superseded by this one, enjoy:

http://www.visualbasicscript.com/m_59109/tm.htm

_____________________________

To iterate is human, to recurse divine. -- L. Peter Deutsch

(in reply to TNO)
 
 
Post #: 38
 
 
Page:  <<   < prev  1 [2]
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> Windows Script Components >> RE: VBScript Array Expansion Library Page: <<   < prev  1 [2]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts