Jump to content

Shifting Off Non Displaying Characcters

Recommended Posts

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




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 post
Share on other sites

I found a way, but now i have a logic error...im going crazy, can someone please respond with SOMETHING?

;fix decryption
Func normalize($character)  
    Case (asc($character)-31) <= 31     
        msgbox(0, "3", "debug")
    Case (asc($character)-128) >= 128 and (asc($character)-161) <= 161              
        msgbox(0, "4", "debug")
;meta tags
    Case $character = "²"
        Return ">"
    Case $character = "³"
        Return "<"
;meta tags
EndFunc ;==>normalize

;fix encryption
Func unnormalize($character)
Case asc($character) <= 31
    msgbox(0, "1", "debug")
    Case asc($character) > 128 and asc($character) < 161
    msgbox(0, "2", "debug")
;meta tags
    Case $character = ">"
        Return "²"
    Case $character = "<"
        Return "³"
;meta tags
    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 by datkewlguy
Link to post
Share on other sites
  • Moderators

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

    No registered users viewing this page.

  • Create New...