Jump to content
Macro Express Forums

Extended ASCII Table characters


Recommended Posts

Is it possible to set string variables to characters from Extended ASCII Table?

i.e. to symbols like these: ■ ▐ ┘ ▒

 

I know I can have them displayed in the text box correctly if they're put there directly. However, I was thinking of displaying a certain symbol (i.e. "■" or "▐") depending on conditions met. That would require to store the symbols in some kind of a variable. (or I could work around that by displaying a different pre-set text box window according to the conditions met, don't be bothered by the work-around).

I tried setting a text variable to one of those symbols and no luck (each symbol is converted to "¦").

 

There's probably a simple explanation to this, and a technical reason for which a text variable wouldn't accept those characters.

It's just bugging me that the text box accepts those characters, while the string variable doesn't. Can anyone put some light on it?

Link to comment
Share on other sites

Yeah I have done something similar to create a progress indicator with a bar. Here's my post from some time ago demonstrating it.

 

So create a variable like you're talking about use the Variable Set to ASCII command. I do this all the time to create end of line characters, tabs and so on. I've even used it to test for strings in repeats and so on. But your problem will more be the fonts used in the text box. For instance decimal 219 (0xDB) is the block character in extended ASCII but in Arial it's some kind of foreign U character. You can verify this using the Windows Character Map utility. You just need to find the right one for your font or a font that supports

 

 

Link to comment
Share on other sites

But your problem will more be the fonts used in the text box. For instance decimal 219 (0xDB) is the block character in extended ASCII but in Arial it's some kind of foreign U character. You can verify this using the Windows Character Map utility. You just need to find the right one for your font or a font that supports

 

I've seen the Variable Set to ASCII command and I even tried to use it myself for the purpose in the topic, but I failed. I did get that odd foreign U character you're talking about and got discouraged. Not in a hundred years it would occur to me that the problem was the font in the text box!

 

I was using MS Word to look through the list of block characters (via "Insert symbol"), and there, when I selected Arial I was seeing the block characters I wanted. The problem was I never noticed the option "Unicode(hexadecimal)" was set (and even if I did it still wouldn't give me a clue about what it actually does). Now, when changed to "ASCII(decimal)" no block chars are seen anymore and I only see chars I can use with the Variable Set to ASCII command.

 

Thank you very much Cory, problem solved and I learned something new. What else could I want? :)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...