Administrators Popular Post Jon Posted August 15, 2013 Administrators Popular Post Share Posted August 15, 2013 File Name: AutoIt v3.3.9.17 BetaFile Submitter: JonFile Submitted: 15 Aug 2013File Category: Beta3.3.9.17 (15th August, 2013) (Beta) AutoIt: - Added: StringReverse() - a UTF16 compatible string reversal function. - Added: FileReadToArray() - native version of _FileReadToArray(). - Changed: Some misc internal rewrites in array assignment mean that some large internal array assignments (StringRegExp() for example) may be slightly quicker. Maybe. - Fixed #2366: For loop not working as expected. UDFs: Others: - Added: Sublime Text AutoIt.tmLanguage file to the editors folder. This contains a list of up to date functions. - Fixed: StringRegExpGUI missing from the help file index menu. Plus, lots of helpfile changes.Click here to download this file FireFox, jaberwacky, funkey and 5 others 8 Deployment Blog: https://www.autoitconsulting.com/site/blog/ SCCM SDK Programming: https://www.autoitconsulting.com/site/sccm-sdk/ Link to comment Share on other sites More sharing options...
Chimaera Posted August 15, 2013 Share Posted August 15, 2013 Not sure if anyone has said but thanks for all the development and extra work being done atm by all involved. It can only make it better. If Ive just helped you ... miracles do happen. Chimaera CopyRobo() * Hidden Admin Account Enabler * Software Location From Registry * Find Display Resolution * _ChangeServices() Link to comment Share on other sites More sharing options...
guinness Posted August 15, 2013 Share Posted August 15, 2013 FileReadToArray() is a lot quicker than the UDF version. What a great addition. UDF List: _AdapterConnections() • _AlwaysRun() • _AppMon() • _AppMonEx() • _ArrayFilter/_ArrayReduce • _BinaryBin() • _CheckMsgBox() • _CmdLineRaw() • _ContextMenu() • _ConvertLHWebColor()/_ConvertSHWebColor() • _DesktopDimensions() • _DisplayPassword() • _DotNet_Load()/_DotNet_Unload() • _Fibonacci() • _FileCompare() • _FileCompareContents() • _FileNameByHandle() • _FilePrefix/SRE() • _FindInFile() • _GetBackgroundColor()/_SetBackgroundColor() • _GetConrolID() • _GetCtrlClass() • _GetDirectoryFormat() • _GetDriveMediaType() • _GetFilename()/_GetFilenameExt() • _GetHardwareID() • _GetIP() • _GetIP_Country() • _GetOSLanguage() • _GetSavedSource() • _GetStringSize() • _GetSystemPaths() • _GetURLImage() • _GIFImage() • _GoogleWeather() • _GUICtrlCreateGroup() • _GUICtrlListBox_CreateArray() • _GUICtrlListView_CreateArray() • _GUICtrlListView_SaveCSV() • _GUICtrlListView_SaveHTML() • _GUICtrlListView_SaveTxt() • _GUICtrlListView_SaveXML() • _GUICtrlMenu_Recent() • _GUICtrlMenu_SetItemImage() • _GUICtrlTreeView_CreateArray() • _GUIDisable() • _GUIImageList_SetIconFromHandle() • _GUIRegisterMsg() • _GUISetIcon() • _Icon_Clear()/_Icon_Set() • _IdleTime() • _InetGet() • _InetGetGUI() • _InetGetProgress() • _IPDetails() • _IsFileOlder() • _IsGUID() • _IsHex() • _IsPalindrome() • _IsRegKey() • _IsStringRegExp() • _IsSystemDrive() • _IsUPX() • _IsValidType() • _IsWebColor() • _Language() • _Log() • _MicrosoftInternetConnectivity() • _MSDNDataType() • _PathFull/GetRelative/Split() • _PathSplitEx() • _PrintFromArray() • _ProgressSetMarquee() • _ReDim() • _RockPaperScissors()/_RockPaperScissorsLizardSpock() • _ScrollingCredits • _SelfDelete() • _SelfRename() • _SelfUpdate() • _SendTo() • _ShellAll() • _ShellFile() • _ShellFolder() • _SingletonHWID() • _SingletonPID() • _Startup() • _StringCompact() • _StringIsValid() • _StringRegExpMetaCharacters() • _StringReplaceWholeWord() • _StringStripChars() • _Temperature() • _TrialPeriod() • _UKToUSDate()/_USToUKDate() • _WinAPI_Create_CTL_CODE() • _WinAPI_CreateGUID() • _WMIDateStringToDate()/_DateToWMIDateString() • Au3 script parsing • AutoIt Search • AutoIt3 Portable • AutoIt3WrapperToPragma • AutoItWinGetTitle()/AutoItWinSetTitle() • Coding • DirToHTML5 • FileInstallr • FileReadLastChars() • GeoIP database • GUI - Only Close Button • GUI Examples • GUICtrlDeleteImage() • GUICtrlGetBkColor() • GUICtrlGetStyle() • GUIEvents • GUIGetBkColor() • Int_Parse() & Int_TryParse() • IsISBN() • LockFile() • Mapping CtrlIDs • OOP in AutoIt • ParseHeadersToSciTE() • PasswordValid • PasteBin • Posts Per Day • PreExpand • Protect Globals • Queue() • Resource Update • ResourcesEx • SciTE Jump • Settings INI • SHELLHOOK • Shunting-Yard • Signature Creator • Stack() • Stopwatch() • StringAddLF()/StringStripLF() • StringEOLToCRLF() • VSCROLL • WM_COPYDATA • More Examples... Updated: 22/04/2018 Link to comment Share on other sites More sharing options...
JohnOne Posted August 15, 2013 Share Posted August 15, 2013 Indeed. Native FileListToArray would be ace too. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
guinness Posted August 16, 2013 Share Posted August 16, 2013 I don't know if people noticed, but UDF links in the changelog were broken and the developer history was missing. Suffice to say I have fixed this in the next version. UDF List: _AdapterConnections() • _AlwaysRun() • _AppMon() • _AppMonEx() • _ArrayFilter/_ArrayReduce • _BinaryBin() • _CheckMsgBox() • _CmdLineRaw() • _ContextMenu() • _ConvertLHWebColor()/_ConvertSHWebColor() • _DesktopDimensions() • _DisplayPassword() • _DotNet_Load()/_DotNet_Unload() • _Fibonacci() • _FileCompare() • _FileCompareContents() • _FileNameByHandle() • _FilePrefix/SRE() • _FindInFile() • _GetBackgroundColor()/_SetBackgroundColor() • _GetConrolID() • _GetCtrlClass() • _GetDirectoryFormat() • _GetDriveMediaType() • _GetFilename()/_GetFilenameExt() • _GetHardwareID() • _GetIP() • _GetIP_Country() • _GetOSLanguage() • _GetSavedSource() • _GetStringSize() • _GetSystemPaths() • _GetURLImage() • _GIFImage() • _GoogleWeather() • _GUICtrlCreateGroup() • _GUICtrlListBox_CreateArray() • _GUICtrlListView_CreateArray() • _GUICtrlListView_SaveCSV() • _GUICtrlListView_SaveHTML() • _GUICtrlListView_SaveTxt() • _GUICtrlListView_SaveXML() • _GUICtrlMenu_Recent() • _GUICtrlMenu_SetItemImage() • _GUICtrlTreeView_CreateArray() • _GUIDisable() • _GUIImageList_SetIconFromHandle() • _GUIRegisterMsg() • _GUISetIcon() • _Icon_Clear()/_Icon_Set() • _IdleTime() • _InetGet() • _InetGetGUI() • _InetGetProgress() • _IPDetails() • _IsFileOlder() • _IsGUID() • _IsHex() • _IsPalindrome() • _IsRegKey() • _IsStringRegExp() • _IsSystemDrive() • _IsUPX() • _IsValidType() • _IsWebColor() • _Language() • _Log() • _MicrosoftInternetConnectivity() • _MSDNDataType() • _PathFull/GetRelative/Split() • _PathSplitEx() • _PrintFromArray() • _ProgressSetMarquee() • _ReDim() • _RockPaperScissors()/_RockPaperScissorsLizardSpock() • _ScrollingCredits • _SelfDelete() • _SelfRename() • _SelfUpdate() • _SendTo() • _ShellAll() • _ShellFile() • _ShellFolder() • _SingletonHWID() • _SingletonPID() • _Startup() • _StringCompact() • _StringIsValid() • _StringRegExpMetaCharacters() • _StringReplaceWholeWord() • _StringStripChars() • _Temperature() • _TrialPeriod() • _UKToUSDate()/_USToUKDate() • _WinAPI_Create_CTL_CODE() • _WinAPI_CreateGUID() • _WMIDateStringToDate()/_DateToWMIDateString() • Au3 script parsing • AutoIt Search • AutoIt3 Portable • AutoIt3WrapperToPragma • AutoItWinGetTitle()/AutoItWinSetTitle() • Coding • DirToHTML5 • FileInstallr • FileReadLastChars() • GeoIP database • GUI - Only Close Button • GUI Examples • GUICtrlDeleteImage() • GUICtrlGetBkColor() • GUICtrlGetStyle() • GUIEvents • GUIGetBkColor() • Int_Parse() & Int_TryParse() • IsISBN() • LockFile() • Mapping CtrlIDs • OOP in AutoIt • ParseHeadersToSciTE() • PasswordValid • PasteBin • Posts Per Day • PreExpand • Protect Globals • Queue() • Resource Update • ResourcesEx • SciTE Jump • Settings INI • SHELLHOOK • Shunting-Yard • Signature Creator • Stack() • Stopwatch() • StringAddLF()/StringStripLF() • StringEOLToCRLF() • VSCROLL • WM_COPYDATA • More Examples... Updated: 22/04/2018 Link to comment Share on other sites More sharing options...
jchd Posted August 17, 2013 Share Posted August 17, 2013 <off_topic> Another hint that guinness and I don't travel at the same speed: time clearly doesn't laps equally for both of us! </off_topic> This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe hereRegExp tutorial: enough to get startedPCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta. SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt) Link to comment Share on other sites More sharing options...
czardas Posted August 17, 2013 Share Posted August 17, 2013 (edited) I remember we had some very interesting >discussions about StringReverse. I learned a lot in those discussions. Perhaps Iwith this I can improve the performance of the surrogate string reverse function (not sure). Thanks Jon. Edited August 17, 2013 by czardas operator64 ArrayWorkshop Link to comment Share on other sites More sharing options...
guinness Posted August 17, 2013 Share Posted August 17, 2013 Before _StringReverse() became native, jchd came up with this... ; #FUNCTION# ==================================================================================================================== ; Author ........: guinness & jchd ; Modified ......: ; =============================================================================================================================== Func _StringReverse($sString) Local $aSplit = StringRegExp($sString, "\X", 3), _ $sReturn = "" For $i = UBound($aSplit) - 1 To 0 Step -1 $sReturn &= $aSplit[$i] Next Return $sReturn EndFunc ;==>_StringReverse X: Match Unicode "eXtended grapheme cluster" UDF List: _AdapterConnections() • _AlwaysRun() • _AppMon() • _AppMonEx() • _ArrayFilter/_ArrayReduce • _BinaryBin() • _CheckMsgBox() • _CmdLineRaw() • _ContextMenu() • _ConvertLHWebColor()/_ConvertSHWebColor() • _DesktopDimensions() • _DisplayPassword() • _DotNet_Load()/_DotNet_Unload() • _Fibonacci() • _FileCompare() • _FileCompareContents() • _FileNameByHandle() • _FilePrefix/SRE() • _FindInFile() • _GetBackgroundColor()/_SetBackgroundColor() • _GetConrolID() • _GetCtrlClass() • _GetDirectoryFormat() • _GetDriveMediaType() • _GetFilename()/_GetFilenameExt() • _GetHardwareID() • _GetIP() • _GetIP_Country() • _GetOSLanguage() • _GetSavedSource() • _GetStringSize() • _GetSystemPaths() • _GetURLImage() • _GIFImage() • _GoogleWeather() • _GUICtrlCreateGroup() • _GUICtrlListBox_CreateArray() • _GUICtrlListView_CreateArray() • _GUICtrlListView_SaveCSV() • _GUICtrlListView_SaveHTML() • _GUICtrlListView_SaveTxt() • _GUICtrlListView_SaveXML() • _GUICtrlMenu_Recent() • _GUICtrlMenu_SetItemImage() • _GUICtrlTreeView_CreateArray() • _GUIDisable() • _GUIImageList_SetIconFromHandle() • _GUIRegisterMsg() • _GUISetIcon() • _Icon_Clear()/_Icon_Set() • _IdleTime() • _InetGet() • _InetGetGUI() • _InetGetProgress() • _IPDetails() • _IsFileOlder() • _IsGUID() • _IsHex() • _IsPalindrome() • _IsRegKey() • _IsStringRegExp() • _IsSystemDrive() • _IsUPX() • _IsValidType() • _IsWebColor() • _Language() • _Log() • _MicrosoftInternetConnectivity() • _MSDNDataType() • _PathFull/GetRelative/Split() • _PathSplitEx() • _PrintFromArray() • _ProgressSetMarquee() • _ReDim() • _RockPaperScissors()/_RockPaperScissorsLizardSpock() • _ScrollingCredits • _SelfDelete() • _SelfRename() • _SelfUpdate() • _SendTo() • _ShellAll() • _ShellFile() • _ShellFolder() • _SingletonHWID() • _SingletonPID() • _Startup() • _StringCompact() • _StringIsValid() • _StringRegExpMetaCharacters() • _StringReplaceWholeWord() • _StringStripChars() • _Temperature() • _TrialPeriod() • _UKToUSDate()/_USToUKDate() • _WinAPI_Create_CTL_CODE() • _WinAPI_CreateGUID() • _WMIDateStringToDate()/_DateToWMIDateString() • Au3 script parsing • AutoIt Search • AutoIt3 Portable • AutoIt3WrapperToPragma • AutoItWinGetTitle()/AutoItWinSetTitle() • Coding • DirToHTML5 • FileInstallr • FileReadLastChars() • GeoIP database • GUI - Only Close Button • GUI Examples • GUICtrlDeleteImage() • GUICtrlGetBkColor() • GUICtrlGetStyle() • GUIEvents • GUIGetBkColor() • Int_Parse() & Int_TryParse() • IsISBN() • LockFile() • Mapping CtrlIDs • OOP in AutoIt • ParseHeadersToSciTE() • PasswordValid • PasteBin • Posts Per Day • PreExpand • Protect Globals • Queue() • Resource Update • ResourcesEx • SciTE Jump • Settings INI • SHELLHOOK • Shunting-Yard • Signature Creator • Stack() • Stopwatch() • StringAddLF()/StringStripLF() • StringEOLToCRLF() • VSCROLL • WM_COPYDATA • More Examples... Updated: 22/04/2018 Link to comment Share on other sites More sharing options...
czardas Posted August 17, 2013 Share Posted August 17, 2013 (edited) That's neat. Such things (clusters) should perhaps be optional because reversing strings is clearly quite different from reversing characters or symbols. Edited August 17, 2013 by czardas operator64 ArrayWorkshop Link to comment Share on other sites More sharing options...
jchd Posted August 17, 2013 Share Posted August 17, 2013 Care to explain how exactly things are different? This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe hereRegExp tutorial: enough to get startedPCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta. SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt) Link to comment Share on other sites More sharing options...
Administrators Jon Posted August 17, 2013 Author Administrators Share Posted August 17, 2013 Clusters are optional, the "fast" flag just reverses code points. czardas 1 Deployment Blog: https://www.autoitconsulting.com/site/blog/ SCCM SDK Programming: https://www.autoitconsulting.com/site/sccm-sdk/ Link to comment Share on other sites More sharing options...
czardas Posted August 17, 2013 Share Posted August 17, 2013 Sorry I feell asleep in the afternoon. Too many late nights. That's great thanks. operator64 ArrayWorkshop Link to comment Share on other sites More sharing options...
trancexx Posted August 19, 2013 Share Posted August 19, 2013 Jon see this: expandcollapse popup#include <WinAPICom.au3> ;~ Read, Write and Seek methods available $oStream = StreamFromFile(@ScriptFullPath) ; Struct to read to $tZip = DllStructCreate("byte[48]") ; Read to that buffer $oStream.Read($tZip, 48, 0) ConsoleWrite("!>>> " & DllStructGetData($tZip, 1) & @CRLF) Func StreamFromFile($sFile) Local $hFile = FileOpen($sFile, 16) Local $bBinary = FileRead($hFile) FileClose($hFile) ; Determine the size of binary data Local $iSize = BinaryLen($bBinary) ; IStream definition Local Const $sIID_IStream = "{0000000C-0000-0000-C000-000000000046}" ; Define IStream methods: Local Const $tagIStream_Small = _ "Read hresult(struct*;dword;dword*);" & _ "Write hresult(struct*;dword;dword*);" & _ ; ISequentialStream "Seek hresult(int64;dword;uint64*);" ; the rest of IStream methods are omited for brevity (they aren't used here) ; Create stream object Local $oStream = ObjCreateInterface(_WinAPI_CreateStreamOnHGlobal(), $sIID_IStream, $tagIStream_Small) If @error Then Return SetError(1, 0, 0) ; Make structure in size of binary data Local $tBinary = DllStructCreate("byte[" & $iSize & "]") ; Fill it DllStructSetData($tBinary, 1, $bBinary) ; Set position to start Local Const $STREAM_SEEK_SET = 0 $oStream.Seek(0, $STREAM_SEEK_SET, 0) ; Write to the stream Local $iWritten $oStream.Write($tBinary, $iSize, $iWritten) ; Back to start $oStream.Seek(0, $STREAM_SEEK_SET, 0) ; Return stream object Return $oStream EndFunc That code should print something like this to console: !>>> 0x23696E636C756465203C57696E415049436F6D2E6175333E0D0A0D0A3B7E20526561642C20577269746520616E642053 Instead it prints 0 for me. I meant to try it with earliest betas that you did without me to see when exactly this issue appeared but I couldn't find them. I'm pretty sure I dealt with this back then, the comment I left in code was: // Copy NOT if it's "struct*" type (this is byref on another level). Do you have that in script_object? $tZip is not struct after the call currently because it gets overwritten. ♡♡♡ . eMyvnE Link to comment Share on other sites More sharing options...
Administrators Jon Posted August 19, 2013 Author Administrators Share Posted August 19, 2013 I get 0 too. I can't see that comment in the current version of script_object.cpp - I'll check back through some revisions. Deployment Blog: https://www.autoitconsulting.com/site/blog/ SCCM SDK Programming: https://www.autoitconsulting.com/site/sccm-sdk/ Link to comment Share on other sites More sharing options...
Administrators Jon Posted August 19, 2013 Author Administrators Share Posted August 19, 2013 Oh I see remember the section of code. I had some nasty regressions with some applications (IE I think) where the byrefs where not working and I had to change it back to this: // 2013-07-27: Relying on typeinfo caused some problems here http://www.autoitscript.com/trac/autoit/ticket/2367 // seemed to be caused by the BSTR check added in revision 6259 that broke it, but this has broken so many times // in the past in different ways that I'm just checking for the bare minimum. if (funcInfo.bValid) { VARTYPE vParamType = funcInfo.pParamTypes[iParam].vt; // type of current param by interface specification // Copy if [out] flag is set for parameter OR type is of byref kind if ( (funcInfo.pParamTypes[iParam].wParamFlags & PARAMFLAG_FOUT) || (vParamType & VT_BYREF) ) { *((*vParams)[iParam].refValue()) = &pArgs[iNumParams-iParam-1]; // Note: COM reference increase! } } else { *((*vParams)[iParam].refValue()) = &pArgs[iNumParams-iParam-1]; // Note: COM reference increase! } Deployment Blog: https://www.autoitconsulting.com/site/blog/ SCCM SDK Programming: https://www.autoitconsulting.com/site/sccm-sdk/ Link to comment Share on other sites More sharing options...
trancexx Posted August 19, 2013 Share Posted August 19, 2013 Then you have broken number of scripts because the code there was result of several bug-fixes if I remember correctly. Beside that, are you sure the cause of your regressions was that? ♡♡♡ . eMyvnE Link to comment Share on other sites More sharing options...
trancexx Posted August 19, 2013 Share Posted August 19, 2013 I just checked bug report 2367 and couldn't figure out what exactly is the bug. Unfortunatly I don't understand languages some people speak. What is the bug Jon? Did you confirm it using some other language (VBS maybe)? ♡♡♡ . eMyvnE Link to comment Share on other sites More sharing options...
Administrators Jon Posted August 19, 2013 Author Administrators Share Posted August 19, 2013 No, not sure at all. It was the only change I could find that caused any sort of repo with that bug report. I'm wondering if it's just a coincidence, or maybe the code in that section just makes the underlying issue more likely to be seen (we did a poll with all the MVPs and half could repro and half couldn't. Nightmare). I'll revert the changes for the next beta and reopen the bug. Deployment Blog: https://www.autoitconsulting.com/site/blog/ SCCM SDK Programming: https://www.autoitconsulting.com/site/sccm-sdk/ Link to comment Share on other sites More sharing options...
Administrators Jon Posted August 19, 2013 Author Administrators Share Posted August 19, 2013 This was the script we used (slightly more simple than the bug report one). #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> Opt("TrayIconDebug", 1) Global $ret = 0 ; Create two WebBrowser controls to embed Global $oIE = ObjCreate("Shell.Explorer.2") ; Setup the parent GUI and embed the controls GUICreate("Embedded Web control Test", 1200, 700, -1, -1, BitOR($GUI_SS_DEFAULT_GUI, $WS_CLIPCHILDREN)) GUICtrlCreateObj($oIE, 1, 1, 570, 660) GUISetState() ;Show GUI ; Update first control $oIE.navigate("http://www.google.fr") ; Wait for document object to be created While Not IsObj($oIE.document) Sleep(100) WEnd ; Wait for document load to complete While $oIE.document.readyState <> "complete" Sleep(100) WEnd Global $oDocRef1 = $oIE.document Global $oDocRef2 = $oIE.document If $oIE.document <> $oIE.document Then $ret = 1 MsgBox(0, "", $ret) $ret = 0 If $oDocRef1 <> $oDocRef2 Then $ret = 1 MsgBox(0, "", $ret) Deployment Blog: https://www.autoitconsulting.com/site/blog/ SCCM SDK Programming: https://www.autoitconsulting.com/site/sccm-sdk/ Link to comment Share on other sites More sharing options...
trancexx Posted August 19, 2013 Share Posted August 19, 2013 You are probably looking at completely different direction than you should.Check comparison rules for Variants, particularly what happens for VAR_OBJECT rule. If you Ptr() those objects do you get the same values? If yes then it's clear what the problem is and that it's not related to COM code. ♡♡♡ . eMyvnE Link to comment Share on other sites More sharing options...
Recommended Posts