somh Posted October 9, 2005 Share Posted October 9, 2005 (edited) #include <APIFileReadWrite.au3> Func BinWrite($fName) $h = _APIFileOpen($fName) $g = FileGetSize($fName) $r = _APIFileRead($h,3,1) if $r = "EF,BB,BF" then _APIFileSetPos($h,0) _APIFileWrite($h,"0D,0A,0D",1) endif _APIFileClose($h) EndFunc BinWrite("c:\xxxxx\xxx.ini") I'm using the latest beta AutoIt and my OS is Win 2k pro en. When I simply run the script it's working fine, but when it's compiled into an exe file, the error shows up: Edited October 9, 2005 by somh Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted October 9, 2005 Moderators Share Posted October 9, 2005 Might be a silly question, but are you using "Beta Compile"? 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. Link to comment Share on other sites More sharing options...
LxP Posted October 9, 2005 Share Posted October 9, 2005 (edited) It may or may not have something to do with this:07th September, 2005 - v3.1.1.74 (beta)Changed: Set _ to be a continuation character only after whitespace. It does not matter if a comment follows the continuation character or not. \ is not a continuation character. (by Nutster)Edit: This of course suggests that you place a space before any underscores at the end of a line within the mentioned #include file. Edited October 9, 2005 by LxP Link to comment Share on other sites More sharing options...
Valuater Posted October 9, 2005 Share Posted October 9, 2005 #include <APIFileReadWrite.au3> Func BinWrite($fName) $h = _APIFileOpen($fName) $g = FileGetSize($fName) $r = _APIFileRead($h,3,1) if $r = "EF,BB,BF" then _APIFileSetPos($h,0) _APIFileWrite($h,"0D,0A,0D",1) endif _APIFileClose($h) EndFunc BinWrite("c:\xxxxx\xxx.ini")I'm using the latest beta AutoIt and my OS is Win 2k pro en.When I simply run the script it's working fine, but when it's compiled into an exe file, the error shows up:I have found that some of the includes utilize single letter variables or varaiables names similar to what you are using.... so... you could try changing the variable names..... just an idea. you could check the include files for a similar situation as i have stated8) Link to comment Share on other sites More sharing options...
somh Posted October 10, 2005 Author Share Posted October 10, 2005 Still the script is running OK, but the exe isn't. Thanks for all your help, but after many tests I have to give up. Link to comment Share on other sites More sharing options...
LxP Posted October 10, 2005 Share Posted October 10, 2005 But did you go through your copy of APIFileReadWrite.au3 and add a space before any line-terminating underscore as suggested? Link to comment Share on other sites More sharing options...
somh Posted October 10, 2005 Author Share Posted October 10, 2005 But did you go through your copy of APIFileReadWrite.au3 and add a space before any line-terminating underscore as suggested?Due to some other mistakes, I didn't realize that the problem has been solved already.Thanks again.I think we should inform Lar to update his attached file. Link to comment Share on other sites More sharing options...
LxP Posted October 10, 2005 Share Posted October 10, 2005 No problem -- glad I reached you before you abandoned the thread for good! Yes, the sooner the file is updated the better because it will minimise the impact that this issue may have. 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