faustf Posted March 28, 2019 Author Posted March 28, 2019 yea but i want , the user able to send only 2 type of file xls and txt (exe is example)
Jimwright Posted Thursday at 04:44 PM Posted Thursday at 04:44 PM On 3/27/2019 at 2:56 PM, faustf said: with this example work, but not compleatly #include <String.au3> $aFile=FileOpen(@DesktopDir&"\test",0) if @error then MsgBox(0,'ERROR',@error) local $firstLine=filereadline($aFile) $hexData=_HexToString ( $firstLine ) ConsoleWrite(@crlf&$hexData) i have 2 excel one have inside this 0xPK ! ���w� � [Content_Types].xml �(� �U[K�0~�%��f� "�|���brֆ�I�9�ۿ���!�Ł�����.'�/��e�$���bXD^c}U�ח��RdH�傇R� ����d����W{,EM��D]C��<�LCj�g�dTz�*����B�� <��b����j�(�[�ﵒ7�Ev���R�B��V�B�$y�N��a�ce���1YfL�@��Pȭ� �#�tUpe'k��`hWv���{��H�@��=���˥��!��B��A���kQ�(�t���6��^�#i�u�=u�����?�A<s ���9p H+xd�k�C̵J`����:����th��M�#s�&lp��s�=��S4A_��V瑁 ��Mhm� and i can use stringinstring [content_types].xml or 0xpk but in second excel i have this o_0 0x?? !??? ? ?????????????� ????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? ??????? ???? ????????????? ??????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? ??????? ???????????????????????� ???????????????????????????????????????G??????????????????????????????????????????????????z???????????????????????????????????????????????? ??? !??s ? ????????????????????????????????????????????????????????????????????????t??????????????????????????????????????????????????????????????????????????????????h???????????????????????? ??? !??? ? ????????????????????????????????????a????????????????????L??????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????�??????????????????????????�???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????h?????????????????????????????????????????v???????????????+??????? ??? !??� l # ??????????????????????????????????????????????"???????????????????????????????????????????????????????????????? ??? !??� ? ????????????????????????????????????????????????????????????7?????????????????????????????????????????g????????????????????????????g????????????????????????????????????????????????????? ??? !??� ? ????????????????????????????????????????????????????????????7?????????????????????????????????????????g????????????????????????????g????????????????????????????????????????????????????? ??? !??? ? ???????????????????????????????????????????+????????????????????????????????????????????????????????????????????????????????????????????????????????????????S??????????????????????????????????????????????????????n?????????????+???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????o????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????s???????????????????????????,??????????????????????=???????????????????????????????????????????????t?????????????????????????x????????????????????????????????????????????????????????????????????????????????????????????????????????????????????t???????????????????????????????????????????????????????????????????????????� ??? !??? ? 0x?? !??? ? ?????????????? ????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? ??????? ???? ????????????? ??????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? ??????? ???????????????????????? ???????????????????????????????????????G??????????????????????????????????????????????????z???????????????????????????????????????????????? ??? !??s ? ????????????????????????????????????????????????????????????????????????t??????????????????????????????????????????????????????????????????????????????????h???????????????????????? ??? !??? ? ????????????????????????????????????a????????????????????L?????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????h?????????????????????????????????????????v???????????????+??????? ??? !??? l # ??????????????????????????????????????????????"???????????????????????????????????????????????????????????????? ??? !??? ? ????????????????????????????????????????????????????????????7?????????????????????????????????????????g????????????????????????????g????????????????????????????????????????????????????? ??? !??? ? ????????????????????????????????????????????????????????????7?????????????????????????????????????????g????????????????????????????g????????????????????????????????????????????????????? ??? !??? ? ???????????????????????????????????????????+????????????????????????????????????????????????????????????????????????????????????????????????????????????????S??????????????????????????????????????????????????????n?????????????+???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????o????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????s???????????????????????????,??????????????????????=???????????????????????????????????????????????t?????????????????????????x????????????????????????????????????????????????????????????????????????????????????????????????????????????????????t???????????????????????????????????????????????????????????????????????????? ??? !??? ? why ? FYI I was getting the same as FaustF with ?? in some of my output, I needed to modify the FileOpen to be 16 (Binary) #include <String.au3> $aFile=FileOpen(@DesktopDir&"\test",16) if @error then MsgBox(0,'ERROR',@error) local $firstLine=filereadline($aFile) $hexData=_HexToString ( $firstLine ) ConsoleWrite(@crlf&$hexData) Then I always get my expected value (0x%PDF-1.4 in my case) Just in case this helps anyone in the future ! argumentum 1
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