Technical support and scripting issues
Moderators: JRL, Dorian (MJT support)
-
AndrewT
- Junior Coder
- Posts: 38
- Joined: Thu Sep 17, 2015 6:06 pm
Post
by AndrewT » Wed Aug 15, 2018 9:45 pm
Why doesn't this code work?
This also doesn't work.
I get the error "Unknown Identifier ASCII." How else can I set a variable to extended ASCII code?
Any help would be appreciated.
AndrewT
-
Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
-
Contact:
Post
by Marcus Tettmar » Wed Aug 15, 2018 11:28 pm
It doesn't work because there is no such function "Ascii".
You could do:
Code: Select all
VBEval>Chr(150),theChar
...
If>{%Target% = %theChar%}
-
AndrewT
- Junior Coder
- Posts: 38
- Joined: Thu Sep 17, 2015 6:06 pm
Post
by AndrewT » Thu Aug 16, 2018 1:22 pm
-
Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
-
Contact:
Post
by Marcus Tettmar » Mon Aug 20, 2018 5:56 pm
That function *SENDS* characters to the active window. It does the same as Send/SendText but instead of giving it the characters to send you give it the ascii codes of the characters you want to send.
It doesn't determine the character from the ascii code (unless you want to send it to e.g. Notepad and then copy that to the clipboard.
VBScripts CHR function takes an ascii code and returns the character.