czardas Posted March 30, 2013 Posted March 30, 2013 (edited) SRE - problem with description.With SRE, the description for x is not entirely accurate. It is not reliable with extended ascii values - and this should be mentioned. Perhaps it is correct for some antiquated code page, or maybe it maps on to something else - I don't know. See below. Edited March 30, 2013 by czardas operator64 ArrayWorkshop
AZJIO Posted March 30, 2013 Posted March 30, 2013 (edited) czardas Range of Russian characters (192-255, charset=Windows-1251) defined Unicode, because judging by the sequence capture is not consistency in ascii. That is when you use [a-z] also uses Unicode Edited March 30, 2013 by AZJIO My other projects or all
czardas Posted March 30, 2013 Posted March 30, 2013 (edited) Indeed. The help file description does not say x is unicode. This needs to be clarified. You agree the results x80-FF are not necessarily AscII - as defined by your code page. The help file description is therefore not accurate. (Ignore this) It is in fact unicode:Local $sTest = "" For $i = 0 To 255 $sTest &= ChrW($i) ; Unicode Characters Next MsgBox(0, "Before StringRegExpReplace", StringLen($sTest)) $sTest = StringRegExpReplace($sTest, "[\x00-\xFF]", "") MsgBox(0, "After StringRegExpReplace", StringLen($sTest)) Edited March 30, 2013 by czardas operator64 ArrayWorkshop
jchd Posted March 30, 2013 Posted March 30, 2013 See my answer in this post.In short, since the engine is dealing with UTF-8 strings, only x00 to x7F works as expected.PCRE support inside AutoIt has to be completely reconsidered:PCRE now supports UTF-16 directly, making the implementation much much easierPCRE should definitely be compiled with UCP support (Unicode character properties)PCRE now enjoys optional JIT support (matching can be up to 6 times faster)PCRE callbacks need to be implementedOne should be able to store compiled patterns and not have them recompiled every time when they are used in loops JohnOne and czardas 2 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)
AZJIO Posted March 30, 2013 Posted March 30, 2013 (edited) FileOpenin this case count is in bytes rather than characters. A count value that is too large can lead to AutoIt stopping with a memory allocation failure.FileRead ( "filehandle/filename" [, count] )FileOpen ( "filename" [, mode] ) - where the count of_GDIPlus_BrushSetSolidColor_GDIPlus_BrushSetSolidColor($hBrush, [$iARGB = 0xFF000000])_GDIPlus_BrushSetSolidColor($hBrush [, $iARGB = 0xFF000000])_RunDOS_RunDos_SQLite_Display2DResult($aResult [, $iCellWidth = 0 [, $bReturn = 0]])_GDIPlus_StringFormatSetAlignDeclaring a variable in a loop. Is this normal?Do Local $msg = GUIGetMsg() Until $msg = $GUI_EVENT_CLOSE_StringRepeatMsgBox(4096, '', _StringRepeat("+-", 40)) ExitExit_WinAPI_FlashWindowEx#endregion_GUICtrlListView_DeleteItem, _GUICtrlListView_DeleteItemsSelected; 3 column load For $iI = 0 To 9 GUICtrlCreateListViewItem("Item " & $iI & "|Item " & $iI & "-1|Item " & $iI & "-2", $hListView) Next MsgBox(4160, "Information", "Delete Item") ; Items created using UDF function(s), pass the handle to the control MsgBox(4160, "Deleted?", _GUICtrlListView_DeleteItem(GUICtrlGetHandle($hListView), 1))Items created using UDF_GUICtrlListView_EditLabel, _GUICtrlListView_GetEditControl1188_GUICtrlListView_Create + $WS_EX_CLIENTEDGE_GUICtrlListView_GetEditControl; Edit item 0 label with time out GUIRegisterMsg($WM_NOTIFY, "WM_NOTIFY")???It'sReturn True EndIf ; If Text is empty the return value is ignored Case $NM_CLICK Replace with this Return True ; If Text is empty the return value is ignored EndIf Case $NM_CLICK_GUICtrlStatusBar_Resize$WS_SIZEBOX -> WS_OVERLAPPEDWINDOW Edited April 2, 2013 by AZJIO My other projects or all
ChristophX086 Posted April 4, 2013 Posted April 4, 2013 The example for the function Dec() is wrong.Local $bDec = Dec("FFF") MsgBox(4096, "", $bDec) ; Displays the number 65535.(FFF)16 = (4095)10(FFFF)16 = (65535)10Also, doesn't the prefix b mean the variable contains binary data? If it does, it should be changed to $iDec.
AZJIO Posted April 4, 2013 Posted April 4, 2013 I converted the Russian help-file from 3.3.6.1 on 3.3.8.1 and made some useful scripts. #include <File.au3> ; $sPath = @ScriptDir & '\examples' $sPath = @ScriptDir & '\libExamples' $sPathTidy = 'C:\Program Files\AutoIt3\SciTE\Tidy\Tidy.exe' If Not (FileExists($sPath) And FileExists($sPathTidy)) Then Exit $aFileList = _FileListToArray($sPath, '*.au3', 1) If @error Then Exit $sOut = '' $iCount = 0 For $i = 1 To $aFileList[0] $sText = FileRead($sPath & '\' & $aFileList[$i]) RunWait('"' & $sPathTidy & '" "' & $sPath & '\' & $aFileList[$i] & '"', '', @SW_HIDE) If Not (FileRead($sPath & '\' & $aFileList[$i]) == $sText) Then $iCount += 1 $sOut &= $aFileList[$i] & @CRLF EndIf Next ; Write the output file $hFile = FileOpen(@ScriptDir & '\Tidy_Out.txt', 2) FileWrite($hFile, $iCount & @CRLF & $sOut) FileClose($hFile) MsgBox(0, 'Done', 'Count = ' & $iCount, 2) #include <File.au3> ; $sPath = @ScriptDir & '\examples' $sPath = @ScriptDir & '\libExamples' $aFileList = _FileListToArray($sPath, '*.au3', 1) If @error Then Exit $sOut = '' $iCount = 0 For $i = 1 To $aFileList[0] $sText = FileRead($sPath & '\' & $aFileList[$i]) $sText = StringRegExpReplace($sText, '\s+\z', '') $sText = StringReplace($sText, 'MsgBox(0, ', 'MsgBox(4096, ') $hFile = FileOpen($sPath & '\' & $aFileList[$i], 2) FileWrite($hFile, $sText) FileClose($hFile) Next MsgBox(0, 'Done', 'Done', 2) expandcollapse popup; _DebugReport($sData [,$bLastError = False [,$bExit = False]]) ; _DebugReport($sData [, $bLastError = False [, $bExit = False]]) ; leads a line to the general format #Include <File.au3> $sPath = @ScriptDir & '\txtlibfunctions' $aFileList=_FileListToArray($sPath, '*.txt', 1) $sOut1 = '' $sOut2 = '' $err = 0 $iCount = 0 For $i = 1 To $aFileList[0] $sText = FileRead($sPath & '\' & $aFileList[$i]) $tmp = StringRegExp($sText, '(?s)(.+?###Syntax###.+?)([^\r\n]+)([\r\n]+###Parameters###.+)', 3) If Not @error Then $tmp0 = $tmp[1] $tmp[1] = StringRegExpReplace($tmp[1], '\h*([][()])\h*', '\1') ; delete the spaces around the brackets $tmp[1] = StringRegExpReplace($tmp[1], '([\w''"])\[,\h*\$', '\1 [, $') ; Restore spaces between parameters If $tmp0 <> $tmp[1] Then $sOut1 &= $tmp0 & @CRLF $sOut2 &= $tmp[1] & @CRLF $iCount += 1 $hFile = FileOpen($sPath & '\' & $aFileList[$i], 2) FileWrite($hFile, $tmp[0] & $tmp[1] & $tmp[2]) FileClose($hFile) EndIf EndIf Next ; Write the output file $hFile = FileOpen(@ScriptDir & '\sOut1_Old.txt', 2) FileWrite($hFile, $sOut1) FileClose($hFile) $hFile = FileOpen(@ScriptDir & '\sOut2_New.txt', 2) FileWrite($hFile, $sOut2) FileClose($hFile) MsgBox(0, 'Done', 'Count = ' & $iCount, 1) My other projects or all
guinness Posted April 5, 2013 Posted April 5, 2013 They might be useful, but don't display the fundamental basics of coding, which I've told you before. All examples includes to the help file must pass Au3Check with advanced parameters switched on. 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
mLipok Posted April 5, 2013 Posted April 5, 2013 (edited) Help for "GUICtrlRead"do not talk anything about GUICtrlCreateMonthCaledit:do not talk anything in Return Value section Edited April 5, 2013 by mlipok Signature beginning:* Please remember: "AutoIt"..... * Wondering who uses AutoIt and what it can be used for ? * Forum Rules ** ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Code * for other useful stuff click the following button: Spoiler Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind. My contribution (my own projects): * Debenu Quick PDF Library - UDF * Debenu PDF Viewer SDK - UDF * Acrobat Reader - ActiveX Viewer * UDF for PDFCreator v1.x.x * XZip - UDF * AppCompatFlags UDF * CrowdinAPI UDF * _WinMergeCompare2Files() * _JavaExceptionAdd() * _IsBeta() * Writing DPI Awareness App - workaround * _AutoIt_RequiredVersion() * Chilkatsoft.au3 UDF * TeamViewer.au3 UDF * JavaManagement UDF * VIES over SOAP * WinSCP UDF * GHAPI UDF - modest begining - comunication with GitHub REST API * ErrorLog.au3 UDF - A logging Library * Include Dependency Tree (Tool for analyzing script relations) * Show_Macro_Values.au3 * My contribution to others projects or UDF based on others projects: * _sql.au3 UDF * POP3.au3 UDF * RTF Printer - UDF * XML.au3 UDF * ADO.au3 UDF * SMTP Mailer UDF * Dual Monitor resolution detection * * 2GUI on Dual Monitor System * _SciLexer.au3 UDF * SciTE - Lexer for console pane * Useful links: * Forum Rules * Forum etiquette * Forum Information and FAQs * How to post code on the forum * AutoIt Online Documentation * AutoIt Online Beta Documentation * SciTE4AutoIt3 getting started * Convert text blocks to AutoIt code * Games made in Autoit * Programming related sites * Polish AutoIt Tutorial * DllCall Code Generator * Wiki: * Expand your knowledge - AutoIt Wiki * Collection of User Defined Functions * How to use HelpFile * Good coding practices in AutoIt * OpenOffice/LibreOffice/XLS Related: WriterDemo.au3 * XLS/MDB from scratch with ADOX IE Related: * How to use IE.au3 UDF with AutoIt v3.3.14.x * Why isn't Autoit able to click a Javascript Dialog? * Clicking javascript button with no ID * IE document >> save as MHT file * IETab Switcher (by LarsJ ) * HTML Entities * _IEquerySelectorAll() (by uncommon) * IE in TaskScheduler * IE Embedded Control Versioning (use IE9+ and HTML5 in a GUI) * PDF Related: * How to get reference to PDF object embeded in IE * IE on Windows 11 * I encourage you to read: * Global Vars * Best Coding Practices * Please explain code used in Help file for several File functions * OOP-like approach in AutoIt * UDF-Spec Questions * EXAMPLE: How To Catch ConsoleWrite() output to a file or to CMD *I also encourage you to check awesome @trancexx code: * Create COM objects from modules without any demand on user to register anything. * Another COM object registering stuff * OnHungApp handler * Avoid "AutoIt Error" message box in unknown errors * HTML editor * winhttp.au3 related : * https://www.autoitscript.com/forum/topic/206771-winhttpau3-download-problem-youre-speaking-plain-http-to-an-ssl-enabled-server-port/ "Homo sum; humani nil a me alienum puto" - Publius Terentius Afer"Program are meant to be read by humans and only incidentally for computers and execute" - Donald Knuth, "The Art of Computer Programming" , be and \\//_. Anticipating Errors : "Any program that accepts data from a user must include code to validate that data before sending it to the data store. You cannot rely on the data store, ...., or even your programming language to notify you of problems. You must check every byte entered by your users, making sure that data is the correct type for its field and that required fields are not empty." Signature last update: 2023-04-24
guinness Posted April 5, 2013 Posted April 5, 2013 These are the parameters: #AutoIt3Wrapper_Au3Check_Parameters=-d -w 1 -w 2 -w 3 -w- 4 -w 5 -w 6 -w 7 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
AZJIO Posted April 5, 2013 Posted April 5, 2013 (Example)#include <Constants.au3> #include <WinAPI.au3> _MouseClick(11, 22) ; _MouseMove(11, 22) Func _MouseClick($x, $y) $x = $x * 65535 / @DesktopWidth $y = $y * 65535 / @DesktopHeight _WinAPI_Mouse_Event(BitOR($MOUSEEVENTF_ABSOLUTE, $MOUSEEVENTF_MOVE), $x, $y) _WinAPI_Mouse_Event(BitOR($MOUSEEVENTF_ABSOLUTE, $MOUSEEVENTF_LEFTDOWN), $x, $y) _WinAPI_Mouse_Event(BitOR($MOUSEEVENTF_ABSOLUTE, $MOUSEEVENTF_LEFTUP), $x, $y) EndFunc ;==>_MouseClick Func _MouseMove($x, $y) $x = $x * 65535 / @DesktopWidth $y = $y * 65535 / @DesktopHeight _WinAPI_Mouse_Event(BitOR($MOUSEEVENTF_ABSOLUTE, $MOUSEEVENTF_MOVE), $x, $y) EndFunc ;==>_MouseMove_WinAPI_DrawFrameControl (Example)expandcollapse popup#include <FrameConstants.au3> #include <GUIConstantsEx.au3> #include <WinAPI.au3> $hGUI = GUICreate("_WinAPI_DrawFrameControl", 400, 300) GUISetState() $hDC = _WinAPI_GetWindowDC($hGUI) $tRect = DllStructCreate($tagRECT) $ptrRect = DllStructGetPtr($tRect) _SetPosSize($tRect, 20, 45, 22, 22) _WinAPI_DrawFrameControl($hDC, $ptrRect, $DFC_BUTTON, $DFCS_BUTTONCHECK + $DFCS_CHECKED) _SetPosSize($tRect, 50, 45, 22, 22) _WinAPI_DrawFrameControl($hDC, $ptrRect, $DFC_BUTTON, $DFCS_BUTTONRADIO + $DFCS_CHECKED) _SetPosSize($tRect, 80, 40, 32, 32) _WinAPI_DrawFrameControl($hDC, $ptrRect, $DFC_CAPTION, $DFCS_CAPTIONCLOSE) Local $aState[9] = [8, $DFCS_BUTTON3STATE, $DFCS_BUTTON3STATE + $DFCS_INACTIVE, $DFCS_BUTTONCHECK, $DFCS_BUTTONPUSH, $DFCS_BUTTONPUSH + $DFCS_FLAT, $DFCS_BUTTONRADIO, $DFCS_BUTTONRADIOIMAGE, $DFCS_BUTTONRADIOMASK] For $i = 1 To $aState[0] _SetPosSize($tRect, $i * 25, 100, 15, 15) _WinAPI_DrawFrameControl($hDC, $ptrRect, $DFC_BUTTON, $aState[$i]) Next Local $aState[6] = [5, $DFCS_CAPTIONCLOSE + $DFCS_HOT, $DFCS_CAPTIonhelp + $DFCS_PUSHED, $DFCS_CAPTIONMAX, $DFCS_CAPTIONMIN, $DFCS_CAPTIONRESTORE] For $i = 1 To $aState[0] _SetPosSize($tRect, $i * 25, 130, 22, 22) _WinAPI_DrawFrameControl($hDC, $ptrRect, $DFC_CAPTION, $aState[$i]) Next Local $aState[5] = [4, $DFCS_MENUARROW + $DFCS_TRANSPARENT, $DFCS_MENUARROWRIGHT, $DFCS_MENUBULLET, $DFCS_MENUCHECK] For $i = 1 To $aState[0] _SetPosSize($tRect, $i * 25, 160, 22, 22) _WinAPI_DrawFrameControl($hDC, $ptrRect, $DFC_MENU, $aState[$i]) Next Local $aState[5] = [4, $DFCS_MENUARROW + $DFCS_TRANSPARENT, $DFCS_MENUARROWRIGHT, $DFCS_MENUBULLET, $DFCS_MENUCHECK] For $i = 1 To $aState[0] _SetPosSize($tRect, $i * 25 + 120, 160, 22, 22) _WinAPI_DrawFrameControl($hDC, $ptrRect, $DFC_POPUPMENU, $aState[$i]) Next Local $aState[9] = [8, $DFCS_SCROLLCOMBOBOX, $DFCS_SCROLLDOWN, $DFCS_SCROLLLEFT, $DFCS_SCROLLRIGHT, $DFCS_SCROLLSIZEGRIP, $DFCS_SCROLLSIZEGRIPRIGHT, $DFCS_SCROLLUP, $DFCS_ADJUSTRECT] For $i = 1 To $aState[0] _SetPosSize($tRect, $i * 25, 190, 22, 22) _WinAPI_DrawFrameControl($hDC, $ptrRect, $DFC_SCROLL, $aState[$i]) Next _WinAPI_ReleaseDC($hGUI, $hDC) Do Until GUIGetMsg() = $GUI_EVENT_CLOSE Func _SetPosSize($tRect, $x, $y, $w, $h) DllStructSetData($tRect, "Left", $x) DllStructSetData($tRect, "Top", $y) DllStructSetData($tRect, "Right", $x + $w) DllStructSetData($tRect, "Bottom", $y + $h) EndFunc ;==>_SetPosSize Professor_Bernd 1 My other projects or all
guinness Posted April 5, 2013 Posted April 5, 2013 Great, but please run those examples against post #270. 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
AZJIO Posted April 9, 2013 Posted April 9, 2013 (edited) ModThis function guarantes that dividend = Int(dividend / divisor) * divisor + Mod(dividend, divisor).This function guarantes that Mod(dividend, divisor) = dividend - Int(dividend / divisor) * divisor.This function does not guarantee that dividend or divisor can be represented accurately, specifically with floating point numbers.double? Edited April 9, 2013 by AZJIO My other projects or all
BrewManNH Posted April 15, 2013 Author Posted April 15, 2013 _GUICtrlMenu_GetItemState, the return values list disabled twice, once for value = 4 and again for value = 8.Returns the Menu item type. Can be one or more of the following: 1 - Item is checked 2 - Item is the default item 4 - Item is disabled 8 - Item is disabled 16 - Item is highlightedThe text for value = 8 should be "Item is grayed", and not disabled. Although functionally they're the same, the values checked for in the function are for 2 different states.If BitAND($iState, $MFS_DISABLED) <> 0 Then $iRet = BitOR($iRet, 4)If BitAND($iState, $MFS_GRAYED) <> 0 Then $iRet = BitOR($iRet, 8)The header information in the UDF GUIMenu.au3, has the same flaw. If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag GudeHow to ask questions the smart way! I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from. Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays. - ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script. - Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label. - _FileGetProperty - Retrieve the properties of a file - SciTE Toolbar - A toolbar demo for use with the SciTE editor - GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI. - Latin Square password generator
AZJIO Posted April 15, 2013 Posted April 15, 2013 (edited) A few months ago I tried to understand. As a result I understood that there are no reasons that to change something._GUICtrlRichEdit_SetParaNumbering@error: 101 - $hWnd is not a handle103 - $iTextToNbrSpace is not a postive number104 - $fForceRoman must be True or False102 - $sStyle is invalid__GCR_ParseParaNumberingStyle($sStyle, $fForceRoman, $iPFM, $iWNumbering, $iWnumStart, $iWnumStyle, $iQspaces) If @error Then Return SetError(@error, 0, False)__GCR_ParseParaNumberingStyle ... Return SetError(102, 0, False) ...DirRemove0 = (default) do not remove files and sub-directories0 = (default) deletes the folder, only if it is empty$tagREBARBANDINFOContains information about an item in a ComboBoxEx controlThis value can be a combination of the following:;_IENavigate, _IECreateand will propmt for credentials if necessary.prompt_IEErrorHandlerDeRegister, _IE_VersionInfo, _IELoadWaitTimeoutFailure: NoneIn many functions this line is missing, if undefined. Edited April 22, 2013 by AZJIO My other projects or all
teletep Posted April 22, 2013 Posted April 22, 2013 Hi, _WinAPI_IsClassName($hWnd,$Classname) returns TRUE when $Classname is empty, wathever the classname of the window is. I think this behaviour should be documented. Seppe
AZJIO Posted April 22, 2013 Posted April 22, 2013 List as a column appear more readableInetGetInfoThe index for the data to retrieve. If this value is -1 an array containing all of the below data will be returned.0 - Bytes read so far (this is updated while the download progresses).....The index for the data to retrieve.-1 an array containing all of the below data will be returned.0 - Bytes read so far (this is updated while the download progresses)......_PathSplitReturns an array with 5 elements where 0 = original path, 1 = drive, 2 = directory, 3 = filename, 4 = extensionReturns an array with 5 elements:[0] - original path[1] - drive[2] - directory[3] - filename[4] - extensionTrayTip (ToolTip)[optional] See Remarks. 0=No icon (default),1=Info icon, 2=Warning icon, 3=Error icon[optional] See Remarks.0=No icon (default)1=Info icon2=Warning icon3=Error iconIniReadSection (as ProcessList)Remarks$array[0][0] = Number$array[1][0] = 1st key$array[1][1] = 1st value$array[2][0] = 2nd key$array[2][1] = 2nd value...$array[n][0] = nth key$array[n][1] = nth value My other projects or all
BrewManNH Posted May 6, 2013 Author Posted May 6, 2013 The example script for RegEnumKey has an error in it. For $i = 1 To 10 Local $var = RegEnumKey("HKEY_LOCAL_MACHINE\SOFTWARE", $i) If @error <> 0 Then ExitLoop MsgBox(4096, "SubKey #" & $i & " under HKLM\Software: ", $var) Next The MsgBox has a comma before the variable $var, it should be an ampersand. If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag GudeHow to ask questions the smart way! I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from. Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays. - ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script. - Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label. - _FileGetProperty - Retrieve the properties of a file - SciTE Toolbar - A toolbar demo for use with the SciTE editor - GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI. - Latin Square password generator
guinness Posted May 6, 2013 Posted May 6, 2013 (edited) No issue, this is the message part of the MsgBox. I do see a problem with a poorly written example though. #include <Constants.au3> Local $sSubKey = "" For $i = 1 To 10 $sSubKey = RegEnumKey("HKEY_LOCAL_MACHINE\SOFTWARE", $i) If @error Then ExitLoop MsgBox($MB_SYSTEMMODAL, "SubKey #" & $i & " under HKLM\SOFTWARE: ", $sSubKey) Next Edited May 7, 2013 by guinness 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
guinness Posted May 6, 2013 Posted May 6, 2013 See post above, I just re-read it again and there is no issue with the example in stable or what you posted there. 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
Recommended Posts