rednap1

hi ,im new Please help me

14 posts in this topic

$var = "a"   ,"b"  , "c" , "d" , "e" , "j" , "k" ;and more

$number = "1" ,"2","3","4","5","6" ;and more

how i can make "a" and "b","b" and "c ","d" and" j"," k" and "a", = True

if "1" and "b" or "4"and "k" or "6"and  "j" = False   ;symbol "a"and"d" true  ... number and symbol false

help me

Share this post


Link to post
Share on other sites



18 minutes ago, rednap1 said:

$var = "a"   ,"b"  , "c" , "d" , "e" , "j" , "k" ;and more

$number = "1" ,"2","3","4","5","6" ;and more

how i can make "a" and "b","b" and "c ","d" and" j"," k" and "a", = True

if "1" and "b" or "4"and "k" or "6"and  "j" = False   ;symbol "a"and"d" true  ... number and symbol false

help me

Wait so... WAIT WHAT?! :wtf:


Click here to see my signature:

Spoiler

I will always thank you for the time you spent for me.
I'm here to ask, and from your response, I'd like to learn.
By my knowledge, I can help someone else, and "that someone" could help in turn another, and so on.

Share this post


Link to post
Share on other sites
4 minutes ago, spudw2k said:

I'm not making sense of what you are asking.  How about a real world example?

for example if there is wroten letter "A" at the text documents then it shall write success at message box if there is not letter "A" then text fail at message box

Share this post


Link to post
Share on other sites
3 minutes ago, spudw2k said:

Ok, so if "A" exists anywhere in a text file return true else return false?

yes :)

Share this post


Link to post
Share on other sites

Are you seriously looking for single letters, or are you looking for a string?

 


√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites

#8 ·  Posted (edited)

I'm not seeing the big picture here, but here's one example:

$sText = "Some source text"
$sFindLetter = "A"

Msgbox(0,"Search for letter", "Letter: " & $sFindLetter & @CRLF & "found in string: " & $sText & " = " & _FindLetter($sText, $sFindLetter))

Func _FindLetter($sText, $sFindLetter)
    Local $iFound = StringInstr($sText, $sFindLetter)

    If $iFound Then
        Return True
    Else
        Return False
    EndIf
EndFunc

 

Edited by spudw2k

Share this post


Link to post
Share on other sites
2 minutes ago, JLogan3o13 said:

Are you seriously looking for single letters, or are you looking for a string?

 

if there is gonna be letters i want True and if there are numbers False

Share this post


Link to post
Share on other sites

#10 ·  Posted

Ok, now (finally) we are getting somewhere. So, in the entire file if there are any numbers you want it to be false? Or just if certain numbers come up? Same with letters: any letters and it is true, or just certain letters?


√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites

#11 ·  Posted

1 minute ago, JLogan3o13 said:

Ok, now (finally) we are getting somewhere. So, in the entire file if there are any numbers you want it to be false? Or just if certain numbers come up? Same with letters: any letters and it is true, or just certain letters?

yes

 

Share this post


Link to post
Share on other sites

#12 ·  Posted

Uh, which?


√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites

#13 ·  Posted (edited)

I think there is a communication gap here.  There are many ways to do what you want...how efficient do you want it to be?  Please give some more use cases.  What do you expect to happen with each of the following?

LMNO =
A1B2C3 = 
12345 = 
1DEADBEEF = 
1.0 = 
ABACABB = 
Version History 2017/01/31 = 

 

....why do I suspect you just want a working snippet rather than understanding how to do it yourself.
Have you tried anything on your own?

Edited by spudw2k

Share this post


Link to post
Share on other sites

#14 ·  Posted (edited)

Will IsString ( variable ) work for you?  Check the help file.

_aleph_

Never mind.  Strings can contain letters and numbers.  I oversimplified I think.

Edited by aleph01
lack of thoughtfulness

Meds.  They're not just for breakfast anymore. :'(

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now