Sign in to follow this  
Followers 0
Coda

quotes problem

5 posts in this topic

Hi everyone  :

$aa = 0x1234
iniwrite("test.txt","aa","aa",$aa)

so iam asking if 0x1234 can be in the txt file = "0x1234" can someone help me ?
thansks.

Share this post


Link to post
Share on other sites



I don't see why not.

$aa = 0x1234
iniwrite("test.txt","aa","aa","0x" & Hex($aa))

Share this post


Link to post
Share on other sites
3 minutes ago, InunoTaishou said:

I don't see why not.

$aa = 0x1234
iniwrite("test.txt","aa","aa","0x" & Hex($aa))

The result will be equal 0x0001234 .... 
i just want it to be the same result be in quotes 
"0x1234"

Share this post


Link to post
Share on other sites
'"0x' & StringFormat("%X", $aa) & '"'

Pragmatically it will make no difference if there are leading zeroes, and the result will be read from the ini the same but here you go.

Share this post


Link to post
Share on other sites

Here are some more examples.

Local $sFileName = "test11.txt"

$aa = 0x1234
IniWrite($sFileName, "aa", "aa", '"0x' & Hex($aa, 4) & '"')

;Or

FileWrite($sFileName, ' Or' & @CRLF & '"0x1234"') ; Write "0x1234" to file.

; Display file
$Pid = ShellExecute($sFileName)

; Tidy up file
ProcessWaitClose($Pid)
FileDelete($sFileName)

; Or another StringFormat example:-
ConsoleWrite(StringFormat('"0x%X"', $aa) & @CRLF) ; Returns "0x1234"

 

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