Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


RE: Array Expansion

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

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> RE: Array Expansion
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: <<   < prev  1 2 3 [4]
Login
Message << Older Topic   Newer Topic >>
 RE: Array Expansion - 12/23/2006 7:08:08 AM   
  dm_4ever


Posts: 2174
Score: 32
Joined: 6/29/2006
From: Orange County, California
Status: offline
What kind of upgrades for the Dictionary object do you have in mind?

_____________________________

dm_4ever

My philosophy: K.I.S.S - Keep It Simple Stupid
Read Me: http://www.visualbasicscript.com/m_24727/tm.htm
Frequently Asked Stuff: http://www.visualbasicscript.com/m_47117/tm.htm

(in reply to TNO)
 
 
Post #: 61
 
 RE: Array Expansion - 12/23/2006 7:16:43 AM   
  TNO


Posts: 1036
Score: 10
Joined: 12/18/2004
From: thenewobjective.com
Status: offline
Well, the Dictionary object is basically an Associative array. Personally I ever use it, but since its an array I figured it would be appropriate to add the functionality if its in demand. I haven't bothered with the object enough to know what qualms and dislikes people have with it.

<New Years Resolution>Never Redim Preserve from this point forward</New Years Resolution>

_____________________________

Consolidated Script Component: The Acid Test

A universe of complexity...

(in reply to dm_4ever)
 
 
Post #: 62
 
 RE: Array Expansion - 12/23/2006 8:08:00 AM   
  dm_4ever


Posts: 2174
Score: 32
Joined: 6/29/2006
From: Orange County, California
Status: offline
I haven't use the Dictionary object a whole lot either. The few times I've used it, it has been something already available. Perhaps others here who have played with it more may offer some ideas.

_____________________________

dm_4ever

My philosophy: K.I.S.S - Keep It Simple Stupid
Read Me: http://www.visualbasicscript.com/m_24727/tm.htm
Frequently Asked Stuff: http://www.visualbasicscript.com/m_47117/tm.htm

(in reply to TNO)
 
 
Post #: 63
 
 RE: Array Expansion - 12/28/2006 4:23:27 PM   
  kirrilian


Posts: 628
Score: 3
Joined: 3/15/2005
From:
Status: offline
There isnt anything in the dictionary object that I would change.

Nice work on these extensions, I look forward to using them.

One problem I can see with them tho, most of the code I write is for other machines or people, and I dont always know what machine it is being run from.
I would have to install this extension on every machine that I would want to use these functions.

_____________________________

Have you searched here ?
VBScript Fundamentals
My Site

(in reply to dm_4ever)
 
 
Post #: 64
 
 RE: Array Expansion - 12/28/2006 7:41:00 PM   
  ginolard


Posts: 1005
Score: 21
Joined: 8/10/2005
Status: offline
You know, I really feel bad for doing this but I didn't even know this was possible until today.

http://www.microsoft.com/technet/technetmag/issues/2007/01/HeyScriptingGuy/default.aspx

Turns out there some .NET assemblies that have COM wrappers and are therefore useable with Vbscript.  One such assembly is System.Collections.ArrayList which has the following methods

http://msdn2.microsoft.com/en-us/library/system.collections.arraylist_methods.aspx

and the following properties

http://msdn2.microsoft.com/en-us/library/system.collections.arraylist_properties.aspx

It doesn't have all of the methods from TNO's extension but I think I'll end up using this instead of a Dictionary/Array object from now on.

UPDATE:  Ah, I see there was a thread about all this in one of the other forums (that I rarely read!)

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

Interesting.  Might have to look into this more.

< Message edited by ginolard -- 12/29/2006 1:11:20 AM >


_____________________________

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 kirrilian)
 
 
Post #: 65
 
 RE: Array Expansion - 12/29/2006 5:04:02 AM   
  TNO


Posts: 1036
Score: 10
Joined: 12/18/2004
From: thenewobjective.com
Status: offline
Yeah, I've been looking at .NET COM wrappers for quite awhile now (specifically DirectX). Don't feel bad about posting the info, I actually prefer to think of this extension as a learning experience more than anything (at least for me since I primarily use the evil J word ).

quote:


One problem I can see with them tho, most of the code I write is for other machines or people, and I dont always know what machine it is being run from.
I would have to install this extension on every machine that I would want to use these functions.


As it stands right now, yes you do. But I think its possible to transfer these functions into a wsf file and then call from that library through an HTA using <script src="\\255.255.255.255\scripts\JSArray.wsf"> or something similar.I wasn;t thinking about the deployed environment when I designed it so it'll take a little bit to think of a solution.

_____________________________

Consolidated Script Component: The Acid Test

A universe of complexity...

(in reply to ginolard)
 
 
Post #: 66
 
 RE: Array Expansion - 12/29/2006 5:22:38 AM   
  TNO


Posts: 1036
Score: 10
Joined: 12/18/2004
From: thenewobjective.com
Status: offline


Problem solved :

Set JS = GetObject("script:c:\scripts\wsc\JSArray-v1.wsc")
Set JS = GetObject("script:\\255.255.255.255\scripts\wsc\JSArray-v1.wsc")

Script components don't HAVE to be registered either AFAIK, so you could also do this if you don't have a Network share or whatever:

Set JS = GetObject("script:http://thenewobjective.com/website/development/JavaScript/Components/vbsArrays/JSArray-v1.wsc")

<Edit> To call a remote script component, we can also specify the name of the remote machine (sea-wks-1 in this example) where the component is registered and the file is present as the second parameter of CreateObject:

Set JS = CreateObject("JS.Array", "sea-wks-1")

Note: As with all remote scripting, the script must run with credentials that have Administrator privileges on the local and remote machines. Calling the component remotely may also require configuration of DCOM remoting with the Component Services snap-in, under Administrative Tools in Control Panel.

</Edit>

< Message edited by TNO -- 12/29/2006 5:44:07 AM >


_____________________________

Consolidated Script Component: The Acid Test

A universe of complexity...

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

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> WSH & Client Side VBScript >> RE: Array Expansion Page: <<   < prev  1 2 3 [4]
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