Home All Groups Group Topic Archive Search About
Author
8 Aug 2006 12:11 AM
Daniel N
Is there a way of setting the string Wildcard to true for multiple scenarios
such as;

Dim Wildcard As String

If Wildcard = "This" And Wildcard = "That" Then

'Do stuff here

End If

Author
8 Aug 2006 12:18 AM
Herfried K. Wagner [MVP]
"Daniel N" <DeezN***@yahoo.com> schrieb:
> Is there a way of setting the string Wildcard to true for multiple
> scenarios such as;
>
> Dim Wildcard As String
>
> If Wildcard = "This" And Wildcard = "That" Then
>
> 'Do stuff here
>
> End If


I recommend to describe what you want to archieve in more detail because
it's unclear what you understand by the term "wildcard".  The code inside
the 'If' block shown above will never be executed because if the value of
'Wildcard' is "This", it cannot be equal to "That".

--
M S   Herfried K. Wagner
M V P  <URL:http://dotnet.mvps.org/>
V B   <URL:http://classicvb.org/petition/>
Author
8 Aug 2006 1:30 AM
Daniel N
Essentially I want a string to be able to define multiple instances. Similar
to using the (*) while doing a search. I posted this in dotnet.general:

hWnd = FindWindow("CLASS NAME", *)
A string must be where the (*) is. Is there a way of making some kind of
wildcard so that function accepts every string instance?

To which someone replied;I should use the EnumWindows API along with the
GetClassName API.

But , after googleing I found
But still have no idea what do.




Show quoteHide quote
"Herfried K. Wagner [MVP]" <hirf-spam-me-here@gmx.at> wrote in message
news:ewU5uAouGHA.4544@TK2MSFTNGP04.phx.gbl...
> "Daniel N" <DeezN***@yahoo.com> schrieb:
>> Is there a way of setting the string Wildcard to true for multiple
>> scenarios such as;
>>
>> Dim Wildcard As String
>>
>> If Wildcard = "This" And Wildcard = "That" Then
>>
>> 'Do stuff here
>>
>> End If
>
>
> I recommend to describe what you want to archieve in more detail because
> it's unclear what you understand by the term "wildcard".  The code inside
> the 'If' block shown above will never be executed because if the value of
> 'Wildcard' is "This", it cannot be equal to "That".
>
> --
> M S   Herfried K. Wagner
> M V P  <URL:http://dotnet.mvps.org/>
> V B   <URL:http://classicvb.org/petition/>
Author
8 Aug 2006 4:51 AM
Cor Ligthert [MVP]
Daniel,

This answer from  you we have seen now twice, but it does probably for
nobody describe what you want to doe.

As Herfried already wrote (in another way) in an earlier message. A string
can contain any collection of characters,

A string is nothing more than an address in memory with a certain lenght. In
the positions of that it is possible to set that collection of charecters
(unicode) which exist per character of two bytes.

A wildcard has nothing to do with that.

Cor

Show quoteHide quote
"Daniel N" <DeezN***@yahoo.com> schreef in bericht
news:XORBg.2953$3U4.2018@fe12.lga...
> Essentially I want a string to be able to define multiple instances.
> Similar to using the (*) while doing a search. I posted this in
> dotnet.general:
>
> hWnd = FindWindow("CLASS NAME", *)
> A string must be where the (*) is. Is there a way of making some kind of
> wildcard so that function accepts every string instance?
>
> To which someone replied;I should use the EnumWindows API along with the
> GetClassName API.
>
> But , after googleing I found
> :http://www.vbaccelerator.com/home/vb/code/Libraries/Windows/Enumerating_Windows/article.asp
> But still have no idea what do.
>
>
>
>
> "Herfried K. Wagner [MVP]" <hirf-spam-me-here@gmx.at> wrote in message
> news:ewU5uAouGHA.4544@TK2MSFTNGP04.phx.gbl...
>> "Daniel N" <DeezN***@yahoo.com> schrieb:
>>> Is there a way of setting the string Wildcard to true for multiple
>>> scenarios such as;
>>>
>>> Dim Wildcard As String
>>>
>>> If Wildcard = "This" And Wildcard = "That" Then
>>>
>>> 'Do stuff here
>>>
>>> End If
>>
>>
>> I recommend to describe what you want to archieve in more detail because
>> it's unclear what you understand by the term "wildcard".  The code inside
>> the 'If' block shown above will never be executed because if the value of
>> 'Wildcard' is "This", it cannot be equal to "That".
>>
>> --
>> M S   Herfried K. Wagner
>> M V P  <URL:http://dotnet.mvps.org/>
>> V B   <URL:http://classicvb.org/petition/>
>
>
Author
8 Aug 2006 6:10 AM
tommaso.gastaldi
Perhaps he means comparing a string to a "template" provided by regular
expression
to see if it matches. In such a case, take a look at the "regex"
object.

-tom
Cor Ligthert [MVP] ha scritto:

Show quoteHide quote
> Daniel,
>
> This answer from  you we have seen now twice, but it does probably for
> nobody describe what you want to doe.
>
> As Herfried already wrote (in another way) in an earlier message. A string
> can contain any collection of characters,
>
> A string is nothing more than an address in memory with a certain lenght. In
> the positions of that it is possible to set that collection of charecters
> (unicode) which exist per character of two bytes.
>
> A wildcard has nothing to do with that.
>
> Cor
>
> "Daniel N" <DeezN***@yahoo.com> schreef in bericht
> news:XORBg.2953$3U4.2018@fe12.lga...
> > Essentially I want a string to be able to define multiple instances.
> > Similar to using the (*) while doing a search. I posted this in
> > dotnet.general:
> >
> > hWnd = FindWindow("CLASS NAME", *)
> > A string must be where the (*) is. Is there a way of making some kind of
> > wildcard so that function accepts every string instance?
> >
> > To which someone replied;I should use the EnumWindows API along with the
> > GetClassName API.
> >
> > But , after googleing I found
> > :http://www.vbaccelerator.com/home/vb/code/Libraries/Windows/Enumerating_Windows/article.asp
> > But still have no idea what do.
> >
> >
> >
> >
> > "Herfried K. Wagner [MVP]" <hirf-spam-me-here@gmx.at> wrote in message
> > news:ewU5uAouGHA.4544@TK2MSFTNGP04.phx.gbl...
> >> "Daniel N" <DeezN***@yahoo.com> schrieb:
> >>> Is there a way of setting the string Wildcard to true for multiple
> >>> scenarios such as;
> >>>
> >>> Dim Wildcard As String
> >>>
> >>> If Wildcard = "This" And Wildcard = "That" Then
> >>>
> >>> 'Do stuff here
> >>>
> >>> End If
> >>
> >>
> >> I recommend to describe what you want to archieve in more detail because
> >> it's unclear what you understand by the term "wildcard".  The code inside
> >> the 'If' block shown above will never be executed because if the value of
> >> 'Wildcard' is "This", it cannot be equal to "That".
> >>
> >> --
> >> M S   Herfried K. Wagner
> >> M V P  <URL:http://dotnet.mvps.org/>
> >> V B   <URL:http://classicvb.org/petition/>
> >
> >
Author
8 Aug 2006 6:17 PM
AMDRIT
Baring regex, you can also achieve a like comparison with instring.

if string.instr(0,strTempValue,"this") >0 and
string.instr(0,strTempValue,"that") >0 then
  'we have a this or that match
end if

regex might be a better way to go especially if you are searching for
something a pattern th?t or th?s where ? is the wildcard.

<tommaso.gasta***@uniroma1.it> wrote in message
Show quoteHide quote
news:1155017437.989960.179030@75g2000cwc.googlegroups.com...
> Perhaps he means comparing a string to a "template" provided by regular
> expression
> to see if it matches. In such a case, take a look at the "regex"
> object.
>
> -tom
> Cor Ligthert [MVP] ha scritto:
>
>> Daniel,
>>
>> This answer from  you we have seen now twice, but it does probably for
>> nobody describe what you want to doe.
>>
>> As Herfried already wrote (in another way) in an earlier message. A
>> string
>> can contain any collection of characters,
>>
>> A string is nothing more than an address in memory with a certain lenght.
>> In
>> the positions of that it is possible to set that collection of charecters
>> (unicode) which exist per character of two bytes.
>>
>> A wildcard has nothing to do with that.
>>
>> Cor
>>
>> "Daniel N" <DeezN***@yahoo.com> schreef in bericht
>> news:XORBg.2953$3U4.2018@fe12.lga...
>> > Essentially I want a string to be able to define multiple instances.
>> > Similar to using the (*) while doing a search. I posted this in
>> > dotnet.general:
>> >
>> > hWnd = FindWindow("CLASS NAME", *)
>> > A string must be where the (*) is. Is there a way of making some kind
>> > of
>> > wildcard so that function accepts every string instance?
>> >
>> > To which someone replied;I should use the EnumWindows API along with
>> > the
>> > GetClassName API.
>> >
>> > But , after googleing I found
>> > :http://www.vbaccelerator.com/home/vb/code/Libraries/Windows/Enumerating_Windows/article.asp
>> > But still have no idea what do.
>> >
>> >
>> >
>> >
>> > "Herfried K. Wagner [MVP]" <hirf-spam-me-here@gmx.at> wrote in message
>> > news:ewU5uAouGHA.4544@TK2MSFTNGP04.phx.gbl...
>> >> "Daniel N" <DeezN***@yahoo.com> schrieb:
>> >>> Is there a way of setting the string Wildcard to true for multiple
>> >>> scenarios such as;
>> >>>
>> >>> Dim Wildcard As String
>> >>>
>> >>> If Wildcard = "This" And Wildcard = "That" Then
>> >>>
>> >>> 'Do stuff here
>> >>>
>> >>> End If
>> >>
>> >>
>> >> I recommend to describe what you want to archieve in more detail
>> >> because
>> >> it's unclear what you understand by the term "wildcard".  The code
>> >> inside
>> >> the 'If' block shown above will never be executed because if the value
>> >> of
>> >> 'Wildcard' is "This", it cannot be equal to "That".
>> >>
>> >> --
>> >> M S   Herfried K. Wagner
>> >> M V P  <URL:http://dotnet.mvps.org/>
>> >> V B   <URL:http://classicvb.org/petition/>
>> >
>> >
>
Author
8 Aug 2006 10:37 AM
Herfried K. Wagner [MVP]
"Daniel N" <DeezN***@yahoo.com> schrieb:
> Essentially I want a string to be able to define multiple instances.
> Similar to using the (*) while doing a search. I posted this in
> dotnet.general:
>
> hWnd = FindWindow("CLASS NAME", *)
> A string must be where the (*) is. Is there a way of making some kind of
> wildcard so that function accepts every string instance?

You can simply pass 'Nothing' or 'vbNullString' to the second parameter to
find any window.  However, I suggest to use 'EnumWindows' too:

<URL:http://groups.google.de/groups?q=dotnet+enumwindows+vb>

--
M S   Herfried K. Wagner
M V P  <URL:http://dotnet.mvps.org/>
V B   <URL:http://classicvb.org/petition/>