Sign in to follow this  
Followers 0
JimPBarber

Base 64 Charater Strings

7 posts in this topic

Hi,

I am trying to read a string from an INI file. I sucessfully read the string but certain characters are stripped out automatically by AutoIT. See the following example.

INI File looks like this:

[Keys]

Key1 = "xxx-xxx-xxx-GVZF"

Key2 = "PGxpY2Vuc2VwYWNrZXQ+PGxpveD48L2xpY2Vuc2VwYWNrZXQ+"

Dim $strKey1

Dim $strKey2

;#Tried this first

$strKey2 = IniRead("g:\a_disk_backup\comp-lic.ini", "Keys", "Key2", "")

$strKey1 = IniRead("g:\a_disk_backup\comp-lic.ini", "Keys", "Key1", "")

;#Tried this second does not change the stripped output.

$strKey2 = String(IniRead("g:\a_disk_backup\comp-lic.ini", "Keys", "Key2", ""))

;#some windowing code.

Send($strKey2)

;#some windowing code.

Send($strKey1)

Strings Returned look like this:

Key 2

PGxpY2Vuc2VwYWNrZXQPGxpveD48L2xpY2Vuc2VwYWNrZXQ

Key 1

xxx-xxx-xxx-GVZF <======= this one is fine

It should look like this:

Key 2

PGxpY2Vuc2VwYWNrZXQ+PGxpveD48L2xpY2Vuc2VwYWNrZXQ+

Key 1

xxx-xxx-xxx-GVZF <========== this one is fine

Note: The '+' characters are stripped out......

Any help would be appreciated.

Jim.

Share this post


Link to post
Share on other sites



Try taking the quotes out and using Send($var, 1)


[center]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.[/center]

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

I don't have the some problem, beta or release.

I've set up a test.ini and a test.au3

test.ini :

[Keys]

Key = "PGxpY2Vuc2VwYWNrZXQ+PGxpveD48L2xpY2Vuc2VwYWNrZXQ+"

test.au3 :

MsgBox(0, "", IniRead("test.ini", "Keys", "Key", ""))

Edited by Manadar

Share this post


Link to post
Share on other sites

Try taking the quotes out and using Send($var, 1)

the flag on the send($var,1) did it. quotes did not matter.....

Man! I thought it was the read function........ Sorry for acting like a noob!

Thank you very much!

Jim.

Share this post


Link to post
Share on other sites

the flag on the send($var,1) did it. quotes did not matter.....

Man! I thought it was the read function........ Sorry for acting like a noob!

Thank you very much!

Jim.

how do you apply images to the gui using base64?

Share this post


Link to post
Share on other sites

how do you apply images to the gui using base64?

I am not applying images, this base 64 string; happens to be a license key to a program.

Jim.

Share this post


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
Sign in to follow this  
Followers 0