Coda Posted February 9, 2017 Share Posted February 9, 2017 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. Link to comment Share on other sites More sharing options...
InunoTaishou Posted February 9, 2017 Share Posted February 9, 2017 I don't see why not. $aa = 0x1234 iniwrite("test.txt","aa","aa","0x" & Hex($aa)) Link to comment Share on other sites More sharing options...
Coda Posted February 9, 2017 Author Share Posted February 9, 2017 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" Link to comment Share on other sites More sharing options...
InunoTaishou Posted February 9, 2017 Share Posted February 9, 2017 '"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. Link to comment Share on other sites More sharing options...
Malkey Posted February 9, 2017 Share Posted February 9, 2017 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" Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now