datkewlguy Posted January 20, 2006 Share Posted January 20, 2006 I'll try to be as clear as possible: This is for a modification to an elaborate encryption program that in a certain part of the script, returns invidividual characters replaced by shifting the hex code and returning it to a string. The problem is that the program that I'm primarily using this for doesn't display the following characters (listed in decimal): 0-31 or 128-161 The other characters are supported. So the decimal returned can't be 0-31 or 128-161...what rule can i apply here, to make numbers that fall under this category be displayable? *The same characters/symbols cant be shared... Link to comment Share on other sites More sharing options...
datkewlguy Posted January 21, 2006 Author Share Posted January 21, 2006 (edited) I found a way, but now i have a logic error...im going crazy, can someone please respond with SOMETHING? expandcollapse popup;fix decryption Func normalize($character) Select Case (asc($character)-31) <= 31 msgbox(0, "3", "debug") Return(Chr(asc($character)-31)) Case (asc($character)-128) >= 128 and (asc($character)-161) <= 161 msgbox(0, "4", "debug") Return(Chr(33-$character)) ;meta tags Case $character = "²" Return ">" Case $character = "³" Return "<" ;meta tags EndSelect EndFunc ;==>normalize ;fix encryption Func unnormalize($character) Select Case asc($character) <= 31 msgbox(0, "1", "debug") Return(Chr(31+asc($character))) Case asc($character) > 128 and asc($character) < 161 msgbox(0, "2", "debug") Return(Chr(33+asc($character))) ;meta tags Case $character = ">" Return "²" Case $character = "<" Return "³" ;meta tags EndSelect Return $character EndFunc ;==>unnormalize edit: this works with the rest of my script, but doesnt decrypt correctly (for all i know, it doesnt encrypt correctly either...) Edited January 21, 2006 by datkewlguy Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted January 21, 2006 Moderators Share Posted January 21, 2006 If your using strings with the web...take a look at StringRegExp / StringRegExpReplace in the help file... will probably make your life alot easier. Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
datkewlguy Posted January 21, 2006 Author Share Posted January 21, 2006 (edited) hmm.. ill take a look Edited January 21, 2006 by datkewlguy 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