ResNullius Posted January 8, 2010 Posted January 8, 2010 If he finds out UDF (WinAPI) workaround then it could be added into Autoit helpfile as some simple example for RAW reading by using Win32 API (UDF).It could be for example mentioned in heklpfile for FileRead() that there exists example in _WinAPI_CreateFile() or _WinAPI_ReadFile() UDF helpfile section for that missing RAW reading.I did have a look at the _WinApi_CreateFile and read some of the MSDN documentation on the CreateFile Function, but I'm no DllCall() expert so I couldn't manage the right combination of parameters (even after having studied monoceres's tutorial).I will post in General Help to see if some clever member can't replicate the functionality.Thanks
ResNullius Posted January 8, 2010 Posted January 8, 2010 I rewrote much of the File interface and I've never seen any real-world use of the function. Its implemenation also didn't sit well with the rest of the code (a bit of a hack to be honest) and I didn't have an example of what it was even supposed to do to test! If you can't get the same results with a UDF workaround then let me know (quickly) and I'll consider trying to readd it.Thanks Jon, but no worries: problem solved thanks to post in General Help:http://www.autoitscript.com/forum/index.php?showtopic=107951&view=findpost&p=761162(at least the Console Input issue, I'll leave it to somebody else to actually replicate any other functionality of RAW mode)
Administrators Jon Posted January 8, 2010 Author Administrators Posted January 8, 2010 Thanks Jon, but no worries: problem solved thanks to post in General Help:#761162(at least the Console Input issue, I'll leave it to somebody else to actually replicate any other functionality of RAW mode)OK. PM me if it becomes a major problem - I don't mind trying to add it back if it's a biggy. I'm not always the best judge of what is important as I spend more time writing it than using it >.< Deployment Blog: https://www.autoitconsulting.com/site/blog/ SCCM SDK Programming: https://www.autoitconsulting.com/site/sccm-sdk/
Valik Posted January 8, 2010 Posted January 8, 2010 In this case, I think you were right to remove even even if every single person in the world was using it. When I saw that code all I could do was shake my head and pretend it didn't exist lest my sanity meter plummet to the "stark raving made" level.
Administrators Jon Posted January 8, 2010 Author Administrators Posted January 8, 2010 In this case, I think you were right to remove even even if every single person in the world was using it. When I saw that code all I could do was shake my head and pretend it didn't exist lest my sanity meter plummet to the "stark raving made" level.My favourite was the casting of a HANDLE to a FILE type. Larry, you crazy guy! Deployment Blog: https://www.autoitconsulting.com/site/blog/ SCCM SDK Programming: https://www.autoitconsulting.com/site/sccm-sdk/
Valik Posted January 8, 2010 Posted January 8, 2010 My favourite was the casting of a HANDLE to a FILE type. Larry, you crazy guy! Indeed. I don't know where he got that idea. That code should have been: HANDLE hFile = CreateFile(); int fd = open_osfhandle(hFile, open_flags); // Get file descriptor from OS HANDLE. FILE *fptr = _fdopen(fd, more_open_flags); // Associate a file descriptor with a FILE*.At that point the warning bells should have gone off with "am I really doing this right...?"
GEOSoft Posted January 8, 2010 Posted January 8, 2010 In this case, I think you were right to remove even even if every single person in the world was using it. When I saw that code all I could do was shake my head and pretend it didn't exist lest my sanity meter plummet to the "stark raving made" level.People seldom get injured in a short drop. George Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number. Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else. "Old age and treachery will always overcome youth and skill!"
Valik Posted January 9, 2010 Posted January 9, 2010 People seldom get injured in a short drop.Touchè. Although to be fair, after recent events my sanity may be on the rise.
Administrators Jon Posted January 10, 2010 Author Administrators Posted January 10, 2010 Pretty stupid bug with UTF8 not actually being written in UTF8 >.<AutoIt v3.3.3.3 (Beta) Released:AutoIt:- Added #1311: MouseGetCursor() returns hand cursor. - Fixed #1403: Error with FileWrite() and UTF8 output streams not being correctly converted to UTF8.UDFs:- Fixed #1398: Fixed declaration of $tagPARAFORMAT2 from GuiRichEdit.au3.- Fixed #1353: _FileWriteToLine() excessively strict on input text type.- Fixed: SQLite.au3 various errors in _SQLite_FetchData, $iCharSize, _SQLite_QuerySingleRow, _SQLite_GetTable2d, _SQLite_Display2DResult by jchd.The following changes are script breaking changes:AutoIt:The raw reading mode for FileOpen() has been removed.InetGet("abort"), @InetGetActive and @InetGetBytesRead have been removed. The following list shows the new functions used to access the old behavior:InetGet("abort") - Calling the new InetClose() function with a handle returned from InetGet() will abort a download.@InetGetActive - Calling the new InetGetInfo() function with no parameters returns a count of active downloads.@InetGetBytesRead - Calling the new InetGetInfo() function with a handle returned from InetGet()will return the bytes read (and more) for a download.AdlibEnable() and AdlibDisable() have been removed. See the new functions AdlibRegister() and AdlibUnRegister().OnAutoItStart() has been removed. See the new pre-processor statement #OnAutoItStartRegister.OnAutoItExit() has been removed. See the new functions OnAutoItExitRegister() and OnAutoItExitUnregister().Discuss the beta here.Report issues here.Download here. Deployment Blog: https://www.autoitconsulting.com/site/blog/ SCCM SDK Programming: https://www.autoitconsulting.com/site/sccm-sdk/
Administrators Jon Posted January 22, 2010 Author Administrators Posted January 22, 2010 AutoIt v3.3.5.0 (Beta) Released:AutoIt:- Added #1376: FileOpen() mode parameter is now optional. Default mode is read.- Added #1054: Added FileGetEncoding().AutoIt3Help:- Fixed #1423: "Open Script" button stopped working.The following changes are script breaking changes:Discuss the beta here.Report issues here.Download here. Deployment Blog: https://www.autoitconsulting.com/site/blog/ SCCM SDK Programming: https://www.autoitconsulting.com/site/sccm-sdk/
Valik Posted January 22, 2010 Posted January 22, 2010 Jon, you might as well go ahead and do an immediate release of 3.3.5.1 and add FileGetEncoding() to Aut2Exe. Before the day is out somebody will open a bug report stating that FileGetEncoding() doesn't work in compiled scripts.
Administrators Jon Posted January 22, 2010 Author Administrators Posted January 22, 2010 Jon, you might as well go ahead and do an immediate release of 3.3.5.1 and add FileGetEncoding() to Aut2Exe. Before the day is out somebody will open a bug report stating that FileGetEncoding() doesn't work in compiled scripts.THIS IS WHY I DON'T ADD FUNCTIONS!!!!!!!!!!!!!!!!!!!!!!!!!! Deployment Blog: https://www.autoitconsulting.com/site/blog/ SCCM SDK Programming: https://www.autoitconsulting.com/site/sccm-sdk/
Valik Posted January 22, 2010 Posted January 22, 2010 I suggest we castrate the imbecile responsible for requiring Aut2Exe to also maintain a list of language functions.
Administrators Jon Posted January 22, 2010 Author Administrators Posted January 22, 2010 I suggest we castrate the imbecile responsible for requiring Aut2Exe to also maintain a list of language functions.Umm. That would be me Deployment Blog: https://www.autoitconsulting.com/site/blog/ SCCM SDK Programming: https://www.autoitconsulting.com/site/sccm-sdk/
PsaltyDS Posted January 23, 2010 Posted January 23, 2010 Umm. That would be me The expression on the face of Valik's avatar sez it all... Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
MvGulik Posted January 24, 2010 Posted January 24, 2010 (edited) whatever Edited February 7, 2011 by MvGulik "Straight_and_Crooked_Thinking" : A "classic guide to ferreting out untruths, half-truths, and other distortions of facts in political and social discussions.""The Secrets of Quantum Physics" : New and excellent 2 part documentary on Quantum Physics by Jim Al-Khalili. (Dec 2014) "Believing what you know ain't so" ... Knock Knock ...
Valik Posted January 24, 2010 Posted January 24, 2010 There are much easier ways of pointing out typos.
Administrators Jon Posted January 24, 2010 Author Administrators Posted January 24, 2010 There are much easier ways of pointing out typos.I don't think he was Deployment Blog: https://www.autoitconsulting.com/site/blog/ SCCM SDK Programming: https://www.autoitconsulting.com/site/sccm-sdk/
James Posted January 24, 2010 Posted January 24, 2010 I suggest we castrate the imbecile responsible for requiring Aut2Exe to also maintain a list of language functions.So is this where your rant about global variables comes in? Do you now maintain one list for both the interpreter and Aut2Exe? Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ
Recommended Posts