gcue Posted December 14, 2011 Posted December 14, 2011 i kinda dont want to mess with that file, i think ill just move the udfs to the autoit includes folder thanks again for your help =)
gcue Posted December 15, 2011 Posted December 15, 2011 just wanted to thank you again asdf, your udf has cut my script files sizes by 2.5x beautiful
asdf8 Posted December 15, 2011 Author Posted December 15, 2011 has cut my script files sizes by 2.5xUnfortunately, this is just an illusion. The main objective of the program - add necessary for the proper execution of the script include files.To reduce the actual size of script you must use with a key, such as "/striponly".
Tweaky Posted December 23, 2011 Posted December 23, 2011 Hi, I think I have found a bug When I try your tool with the following script the file "scroll.au3" will be not included #Region ;************ Includes ************ #Include <WindowsConstants.au3> #EndRegion ;************ Includes ************ GUIRegisterMsg($WM_SIZE, "WM_SIZE") scroll.au3 expandcollapse popup#region ;************ Includes ************ #include-once #include <GUIConstantsEx.au3> #include <GuiScrollBars.au3> #include <ScrollBarConstants.au3> #endregion ;************ Includes ************ Func WM_SIZE($hWnd, $Msg, $wParam, $lParam) #forceref $Msg, $wParam Local $index = -1, $yChar, $xChar, $xClientMax, $xClient, $yClient, $ivMax For $x = 0 To UBound($aSB_WindowInfo) - 1 If $aSB_WindowInfo[$x][0] = $hWnd Then $index = $x $xClientMax = $aSB_WindowInfo[$index][1] $xChar = $aSB_WindowInfo[$index][2] $yChar = $aSB_WindowInfo[$index][3] $ivMax = $aSB_WindowInfo[$index][7] ExitLoop EndIf Next If $index = -1 Then Return 0 Local $tSCROLLINFO = DllStructCreate($tagSCROLLINFO) ; Retrieve the dimensions of the client area. $xClient = BitAND($lParam, 0x0000FFFF) $yClient = BitShift($lParam, 16) $aSB_WindowInfo[$index][4] = $xClient $aSB_WindowInfo[$index][5] = $yClient ; Set the vertical scrolling range and page size DllStructSetData($tSCROLLINFO, "fMask", BitOR($SIF_RANGE, $SIF_PAGE)) DllStructSetData($tSCROLLINFO, "nMin", 0) DllStructSetData($tSCROLLINFO, "nMax", $ivMax) DllStructSetData($tSCROLLINFO, "nPage", $yClient / $yChar) _GUIScrollBars_SetScrollInfo($hWnd, $SB_VERT, $tSCROLLINFO) ; Set the horizontal scrolling range and page size DllStructSetData($tSCROLLINFO, "fMask", BitOR($SIF_RANGE, $SIF_PAGE)) DllStructSetData($tSCROLLINFO, "nMin", 0) DllStructSetData($tSCROLLINFO, "nMax", 2 + $xClientMax / $xChar) DllStructSetData($tSCROLLINFO, "nPage", $xClient / $xChar) _GUIScrollBars_SetScrollInfo($hWnd, $SB_HORZ, $tSCROLLINFO) Return $GUI_RUNDEFMSG EndFunc ;==>WM_SIZE
asdf8 Posted December 23, 2011 Author Posted December 23, 2011 I think I have found a bugIn this case it is not a bug.In the first post stated:Note:Includes Helper does not processing functions and variables as strings (functions Execute, GUIRegisterMsg, etc.) because of what may be the wrong results.The next version will add the processing of explicit string values (specified without the use of variables and expressions)
Tweaky Posted December 30, 2011 Posted December 30, 2011 (edited) I have test your new version 1.2.3 But it doesn`t work. Testskript Global $array[5] _ArrayDisplay($array) Result with 1.2.1 #Region ;************ Includes ************ #Include <Array.au3> #EndRegion ;************ Includes ************ Global $array[5] _ArrayDisplay($array) Console >INCLUDES HELPER C:test04.au3 ! NEED INCLUDED : #Include <Array.au3> >Exit code: 0 Time: 39.519 IncludesHelper.ini [General] ShowOptimInfo=1 ShowDetals=0 ResultToSource=1 Result with 1.2.3 Global $array[5] _ArrayDisplay($array) Console >INCLUDES HELPER C:test04.au3 -> Global $array[5] _ArrayDisplay($array) >Exit code: 0 Time: 39.922 IncludesHelper.ini [General] ShowOptimInfo=1 ShowDetals=0 ResultToSource=1 Edited December 30, 2011 by Tweaky
asdf8 Posted December 30, 2011 Author Posted December 30, 2011 Thank you TweakyDownload the file again or delete the lines 274, 275 in the script.I just forgot to remove all the debug information.
Tweaky Posted December 30, 2011 Posted December 30, 2011 I have found a new bug result of first use #Region ;************ Includes ************ #Include <Array.au3> #EndRegion ;************ Includes ************ Global $array[5] _ArrayDisplay($array) Result of second use #Region ;************ Includes ************ #Include <Array.au3> #Include <Array.au3> #EndRegion ;************ Includes ************ Global $array[5] _ArrayDisplay($array) Result of third use #Region ;************ Includes ************ #Include <Array.au3> #Include <Array.au3> #Include <Array.au3> #EndRegion ;************ Includes ************ Global $array[5] _ArrayDisplay($array) The old includes will not be deleted.
asdf8 Posted December 30, 2011 Author Posted December 30, 2011 I beg pardon for carelessness Accidentally deleted the line. Updated file in first post.
Xenobiologist Posted January 6, 2012 Posted January 6, 2012 (edited) First of all great work. I like it although it is very slow. I'll have a look if I optimze my version, or whether I have to switch to your version and try to give you some tips for improvements instead. Besides, the problem that OI shows every include a function is used of is no problem, because most people use obfuscator to strip unneeded code before compilation. Edited January 6, 2012 by Xenobiologist Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times
asdf8 Posted January 6, 2012 Author Posted January 6, 2012 XenobiologistThank you very much for the "Organize Includes" - a long time I used it.it is very slow.Script of 3000 lines processed about 4 seconds (if the database has been created and files are needed only in the folder "Include").I do not think that it is very slow, small files are processed almost instantly.Creating a database and scan a script folder is really quite slow, since uses native the function AutoIt, i try to use "Scripting.Dictionary" - the processing speed must be increased substantially.try to give you some tipsI am always happy to advice.Besides, the problem that OI shows every include a function is used of is no problem, because most people use obfuscator to strip unneeded code before compilation.I agree. The real result - only more tidy code.
wakillon Posted January 9, 2012 Posted January 9, 2012 Trying your last version :Why not use $UserIntLang = @OSLang ?And why script want replace each time GUIConstants.au3 by GUIConstantsEx.au3 ? ! NEED INCLUDED :#Include <GUIConstantsEx.au3>- NOT NEED INCLUDED :- GUIConstants.au3 AutoIt 3.3.14.2 X86 - SciTE 3.6.0 - WIN 8.1 X64 - Other Example Scripts
asdf8 Posted January 9, 2012 Author Posted January 9, 2012 Why not use $UserIntLang = @OSLang ?All right. ("GetUserDefaultUILanguage" use out of habit ) The next version will correct. why script want replace each time GUIConstants.au3 by GUIConstantsEx.au3 ?If look the file guiconstants.au3 - all will become understandable: #include-once ; #INDEX# ======================================================================================================================= ; Title .........: GUIConstants ; AutoIt Version : 3.2 ; Language ......: English ; Description ...: This file is deprecated. GUIConstantsEx.au3 should be used. ; Author(s) .....: Valik ; Dll ...........: ; =============================================================================================================================== #include "GUIConstantsEx.au3" This is whole file.
guinness Posted January 9, 2012 Posted January 9, 2012 It's bad practice to use GUIConstants.au3 instead of GUIConstantsEx.au3 and the fact GUIConstants.au3 is still there was due to people complaining it would break their scripts if removed. If something is deprecated then the general rule of thumb is don't use it and since this changed happened in V3.2.12.0 it's suffice to say no one is probably using GUIConstants.au3 anymore. 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
wakillon Posted January 9, 2012 Posted January 9, 2012 Thank you both for the clarification ! AutoIt 3.3.14.2 X86 - SciTE 3.6.0 - WIN 8.1 X64 - Other Example Scripts
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