The GW-Scripting list is a discussion list for information regarding the development and use of Window-Eyes scripts. Any subscriber of the GW-Scripting list has the ability to post on-topic messages.
From:
Chip OrangeSubject:
xml dictionaryDate:
Sat, Apr 3, 2010 10:37:23 pmJ.J.,
could you explain what you mean by "read them in using a dictionary object"?
I don't see any xml or file i/o methods in the dictionary object, so maybe
you meant use of the msxml object for the i/o, and then store the data into
a dictionary?
thanks.
Chip
-----Original Message-----
From: J.J. Meddaugh [mailto:jj@bestmidi.com]
Sent: Saturday, April 03, 2010 9:24 PM
To: gw-scripting@gwmicro.com
Subject: Re: Randomizer
You could put all of them in an XML file and read them in using a dictionary
object. Or there are functions to read in files as well which you could find
from one of the vb.net tutorials or reference guides.
J.J. Meddaugh - ATGuys.com
A premier Licensed Code Factory and KNFB Reader distributor
----- Original Message -----
From: "Tylers Scripting"
To:
Sent: Saturday, April 03, 2010 10:08 PM
Subject: RE: Randomizer
could you explain what you mean by "read them in using a dictionary object"?
I don't see any xml or file i/o methods in the dictionary object, so maybe
you meant use of the msxml object for the i/o, and then store the data into
a dictionary?
thanks.
Chip
-----Original Message-----
From: J.J. Meddaugh [mailto:jj@bestmidi.com]
Sent: Saturday, April 03, 2010 9:24 PM
To: gw-scripting@gwmicro.com
Subject: Re: Randomizer
You could put all of them in an XML file and read them in using a dictionary
object. Or there are functions to read in files as well which you could find
from one of the vb.net tutorials or reference guides.
J.J. Meddaugh - ATGuys.com
A premier Licensed Code Factory and KNFB Reader distributor
----- Original Message -----
From: "Tylers Scripting"
To:
Sent: Saturday, April 03, 2010 10:08 PM
Subject: RE: Randomizer
So I have to put all the names in by hand.
I can't use a txt file?
Tyler
----- Original Message -----
From: "Chip Orange"
To:
Date: Saturday, Apr 3, 2010 18:59:40
Subject: RE: Randomizer
Tiler,
Aarons code allows for any number of choices, assuming the size of yourarray has been set to the number of choices that you have. that's why
allthe use of the ubound(were and lbound(were functions; it also allows for
an arraywith a lower bound of either 0 or 1, which does make it look a little
complicated at first glance.
the rnd(were function is the heart of his answer, it returns a randomnumber
between 0 and 1.
For using a hotkey, see the keyboard object's registerhotkey function,and I
think the wiki beginning scripting article, part 2, actually has asection
on how to do that. I'd bet the help for the registerHotkey does also.
hth,
Chip
-----Original Message-----
From: Tylers Scripting [mailto:tylersscripting@gmail.com]Sent: Saturday, April 03, 2010 7:39 PM
To: gw-scripting@gwmicro.comSubject: Re: Randomizer
But aaron,
What if you have 100 names.I also need a hotkey for this.
Thank you.Tyler Juranek
----- Original Message -----
From: Aaron SmithTo: gw-scripting@gwmicro.com
Date: Saturday, Apr 3, 2010 16:30:26Subject: Re: Randomizer
>
>> Dim a : a = Array("Tom", "Jerry", "Ren", "Stimpy", "Yakko", "Wakko",
> "Dot")> Speak a(Int((UBound(a) LBound(a) + 1) * Rnd + LBound(a)))
>> Aaron
>> On 4/3/2010 7:16 PM, Tylers Scripting wrote:
> > Hey guys,> > I was wondering, what are some lines of code I can run that will
> > picka random name with a script?
> > For example, if you wanted it to pick a random name from Tyler,> > Gary,
Kim, Brittney, and if I had like say 10000 names, how would I do this?> > Thanks.
> > Tyler Juranek> >
>> --
> Aaron Smith> Product Support Specialist * Web Development GW Micro, Inc. * 725
> Airport North Office Park, Fort Wayne, IN 46825> 260-489-3671 * gwmicro.com
>> To insure that you receive proper support, please include all past
> correspondence (where applicable), and any relevant information> pertinent to your situation when submitting a problem report to the GW
> Micro Technical Support Team.>
> Dim a : a = Array("Tom", "Jerry", "Ren", "Stimpy", "Yakko", "Wakko",> "Dot") Speak a(Int((UBound(a) LBound(a) + 1) * Rnd + LBound(a)))
>> Aaron
>> On 4/3/2010 7:16 PM, Tylers Scripting wrote:
> Hey guys,> I was wondering, what are some lines of code I can run that will pick
> arandom name with a script?
> For example, if you wanted it to pick a random name from Tyler, Gary,Kim, Brittney, and if I had like say 10000 names, how would I do this?
> Thanks.> Tyler Juranek
>>
>>
> --> Aaron Smith
> Product Support Specialist * Web Development GW Micro, Inc. * 725> Airport North Office Park, Fort Wayne, IN 46825
> 260-489-3671 * gwmicro.com>
> To insure that you receive proper support, please include all past> correspondence (where applicable), and any relevant information
> pertinent to your situation when submitting a problem report to the GW> Micro Technical Support Team.


