guinness Posted October 16, 2011 Share Posted October 16, 2011 Just did a search and found it was removed in v2.7 >> Sorry Yashied and thanks for the alternatives. 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...
Yashied Posted October 18, 2011 Author Share Posted October 18, 2011 The library has been updated, version remains unchanged. Added the following functions. _WinAPI_CreateNumberFormatInfo _WinAPI_EnumProcessHandles _WinAPI_FreeMemory _WinAPI_GetDurationFormat _WinAPI_GetFinalPathNameByHandleEx _WinAPI_GetNumberFormat _WinAPI_IsString _WinAPI_MakeWordAdded examples for the functions above.The following functions now works with pointers instead of structures, see its description. _WinAPI_CreateString _WinAPI_FindTextDlg _WinAPI_RegQueryMultipleValues _WinAPI_ReplaceTextDlg Fixed bug in some functions related with the wrong comparison to 0xFFFFFFFF. (Thanks money)Updated documentation. My UDFs: iKey | FTP Uploader | Battery Checker | Boot Manager | Font Viewer | UDF Keyword Manager | Run Dialog Replacement | USBProtect | 3D Axis | Calculator | Sleep | iSwitcher | TM | NetHelper | File Types Manager | Control Viewer | SynFolders | DLL Helper Animated Tray Icons UDF Library | Hotkeys UDF Library | Hotkeys Input Control UDF Library | Caret Shape UDF Library | Context Help UDF Library | Most Recently Used List UDF Library | Icons UDF Library | FTP UDF Library | Script Communications UDF Library | Color Chooser UDF Library | Color Picker Control UDF Library | IPHelper (Vista/7) UDF Library | WinAPI Extended UDF Library | WinAPIVhd UDF Library | Icon Chooser UDF Library | Copy UDF Library | Restart UDF Library | Event Log UDF Library | NotifyBox UDF Library | Pop-up Windows UDF Library | TVExplorer UDF Library | GuiHotKey UDF Library | GuiSysLink UDF Library | Package UDF Library | Skin UDF Library | AITray UDF Library | RDC UDF Library Appropriate path | Button text color | Gaussian random numbers | Header's styles (Vista/7) | ICON resource enumeration | Menu & INI | Tabbed string size | Tab's skin | Pop-up circular menu | Progress Bar without animation (Vista/7) | Registry export | Registry path jumping | Unique hardware ID | Windows alignment More... Link to comment Share on other sites More sharing options...
guinness Posted October 19, 2011 Share Posted October 19, 2011 Nice update, just a couple of insignificant points. _WinAPI_EnumDllProc - $hProcess is declared twice. _WinAPI_CompressBitmapBits - $tDIB is already declared. 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...
Yashied Posted October 19, 2011 Author Share Posted October 19, 2011 Fixed. Download again. My UDFs: iKey | FTP Uploader | Battery Checker | Boot Manager | Font Viewer | UDF Keyword Manager | Run Dialog Replacement | USBProtect | 3D Axis | Calculator | Sleep | iSwitcher | TM | NetHelper | File Types Manager | Control Viewer | SynFolders | DLL Helper Animated Tray Icons UDF Library | Hotkeys UDF Library | Hotkeys Input Control UDF Library | Caret Shape UDF Library | Context Help UDF Library | Most Recently Used List UDF Library | Icons UDF Library | FTP UDF Library | Script Communications UDF Library | Color Chooser UDF Library | Color Picker Control UDF Library | IPHelper (Vista/7) UDF Library | WinAPI Extended UDF Library | WinAPIVhd UDF Library | Icon Chooser UDF Library | Copy UDF Library | Restart UDF Library | Event Log UDF Library | NotifyBox UDF Library | Pop-up Windows UDF Library | TVExplorer UDF Library | GuiHotKey UDF Library | GuiSysLink UDF Library | Package UDF Library | Skin UDF Library | AITray UDF Library | RDC UDF Library Appropriate path | Button text color | Gaussian random numbers | Header's styles (Vista/7) | ICON resource enumeration | Menu & INI | Tabbed string size | Tab's skin | Pop-up circular menu | Progress Bar without animation (Vista/7) | Registry export | Registry path jumping | Unique hardware ID | Windows alignment More... Link to comment Share on other sites More sharing options...
NoD Posted October 21, 2011 Share Posted October 21, 2011 Hello! Wonderfull lib! I found that RegOpenCurrentUser is not in your lib : ; #FUNCTION# ==================================================================================================================== ; Name...........: _WinAPI_RegOpenCurrentUser ; Description....: Retrieves a handle to the HKEY_CURRENT_USER key for the user the current thread is impersonating. ; Syntax.........: _WinAPI_RegOpenCurrentUser ( [$iAccess] ) ; Parameters.....: $iAccess - A mask that specifies the desired access rights to the key. The function fails if the security ; descriptor of the key does not permit the requested access for the calling process. This parameter ; can be one or more of the $KEY_* constants. ; Return values..: Success - Handle to the opened key. ; Failure - 0 and sets the @error flag to non-zero, @extended flag may contain the system error code. ; Author.........: Yashied ; Modified.......: ; Remarks........: The $KEY_CURRENT_USER key maps to the root of the current user's branch in the HKEY_USERS key. ; It is cached for all threads in a process. ; Therefore, this value does not change when another user's profile is loaded. ; RegOpenCurrentUser uses the thread's token to access the appropriate key, ; or the default if the profile is not loaded. ; Related........: ; Link...........: @@MsdnLink@@ RegOpenCurrentUser ; Example........: Yes ; =============================================================================================================================== Func _WinAPI_RegOpenCurrentUser($iAccess = 0x000F003F) Local $Ret = DllCall('advapi32.dll', 'long', 'RegOpenCurrentUser','dword', $iAccess, 'ulong_ptr*', 0) If @error Then Return SetError(1, 0, 0) Else If $Ret[0] Then Return SetError(1, $Ret[0], 0) EndIf EndIf Return $Ret[2] EndFunc ;==>_WinAPI_RegOpenCurrentUser Link to comment Share on other sites More sharing options...
Ascend4nt Posted October 25, 2011 Share Posted October 25, 2011 (edited) Yashied, if you are really going to leave the wasteful '__DLL()' function (and calls to it) in the UDF, you might as well make a special note about it. In that respect, you could say that these DLL's are permanently loaded by the script after a call to the given function(s): connect.dll: _WinAPI_GetConnectedDlg() _WinAPI_IsInternetConnected() powrprof.dll: _WinAPI_GetPwrCapabilities() sensapi.dll: _WinAPI_IsNetworkAlive() sfc.dll: _WinAPI_SfcIsFileProtected() _WinAPI_SfcIsKeyProtected() Of course, it's still best to get rid of __DLL() completely. As explained previously, DLLCall() will do all the work for you - load the DLL (or increment the load-count), call the API function, then release the DLL (or decrement the load-count). Edited October 25, 2011 by Ascend4nt My contributions: Performance Counters in Windows - Measure CPU, Disk, Network etc Performance | Network Interface Info, Statistics, and Traffic | CPU Multi-Processor Usage w/o Performance Counters | Disk and Device Read/Write Statistics | Atom Table Functions | Process, Thread, & DLL Functions UDFs | Process CPU Usage Trackers | PE File Overlay Extraction | A3X Script Extract | File + Process Imports/Exports Information | Windows Desktop Dimmer Shade | Spotlight + Focus GUI - Highlight and Dim for Eyestrain Relief | CrossHairs (FullScreen) | Rubber-Band Boxes using GUI's (_GUIBox) | GUI Fun! | IE Embedded Control Versioning (use IE9+ and HTML5 in a GUI) | Magnifier (Vista+) Functions UDF | _DLLStructDisplay (Debug!) | _EnumChildWindows (controls etc) | _FileFindEx | _ClipGetHTML | _ClipPutHTML + ClipPutHyperlink | _FileGetShortcutEx | _FilePropertiesDialog | I/O Port Functions | File(s) Drag & Drop | _RunWithReducedPrivileges | _ShellExecuteWithReducedPrivileges | _WinAPI_GetSystemInfo | dotNETGetVersions | Drive(s) Power Status | _WinGetDesktopHandle | _StringParseParameters | Screensaver, Sleep, Desktop Lock Disable | Full-Screen Crash Recovery Wrappers/Modifications of others' contributions: _DOSWildcardsToPCRegEx (original code: RobSaunder's) | WinGetAltTabWinList (original: Authenticity) UDF's added support/programming to: _ExplorerWinGetSelectedItems | MIDIEx UDF (original code: eynstyne) (All personal code/wrappers centrally located at Ascend4nt's AutoIT Code) Link to comment Share on other sites More sharing options...
Yashied Posted October 25, 2011 Author Share Posted October 25, 2011 In that respect, you could say that these DLL's are permanently loaded by the script after a call to the given function(s)...Yes, that speeds up the next calls. My UDFs: iKey | FTP Uploader | Battery Checker | Boot Manager | Font Viewer | UDF Keyword Manager | Run Dialog Replacement | USBProtect | 3D Axis | Calculator | Sleep | iSwitcher | TM | NetHelper | File Types Manager | Control Viewer | SynFolders | DLL Helper Animated Tray Icons UDF Library | Hotkeys UDF Library | Hotkeys Input Control UDF Library | Caret Shape UDF Library | Context Help UDF Library | Most Recently Used List UDF Library | Icons UDF Library | FTP UDF Library | Script Communications UDF Library | Color Chooser UDF Library | Color Picker Control UDF Library | IPHelper (Vista/7) UDF Library | WinAPI Extended UDF Library | WinAPIVhd UDF Library | Icon Chooser UDF Library | Copy UDF Library | Restart UDF Library | Event Log UDF Library | NotifyBox UDF Library | Pop-up Windows UDF Library | TVExplorer UDF Library | GuiHotKey UDF Library | GuiSysLink UDF Library | Package UDF Library | Skin UDF Library | AITray UDF Library | RDC UDF Library Appropriate path | Button text color | Gaussian random numbers | Header's styles (Vista/7) | ICON resource enumeration | Menu & INI | Tabbed string size | Tab's skin | Pop-up circular menu | Progress Bar without animation (Vista/7) | Registry export | Registry path jumping | Unique hardware ID | Windows alignment More... Link to comment Share on other sites More sharing options...
KaFu Posted November 9, 2011 Share Posted November 9, 2011 Reporting a Help-file issue. In the Parameters for _WinAPI_GetDriveGeometryEx() you wrote $iDrive = "The drive letter to retrieve information, in the format D:, E:, etc." but it should be $iDrive = "The drive number as reported by _WinAPI_GetDriveNumber()" OS: Win10-22H2 - 64bit - German, AutoIt Version: 3.3.16.1, AutoIt Editor: SciTE, Website: https://funk.eu AMT - Auto-Movie-Thumbnailer (2024-Oct-13) BIC - Batch-Image-Cropper (2023-Apr-01) COP - Color Picker (2009-May-21) DCS - Dynamic Cursor Selector (2024-Oct-13) HMW - Hide my Windows (2024-Oct-19) HRC - HotKey Resolution Changer (2012-May-16) ICU - Icon Configuration Utility (2018-Sep-16) SMF - Search my Files (2024-Oct-20) - THE file info and duplicates search tool SSD - Set Sound Device (2017-Sep-16) Link to comment Share on other sites More sharing options...
Yashied Posted November 9, 2011 Author Share Posted November 9, 2011 (edited) Reporting a Help-file issue. In the Parameters for _WinAPI_GetDriveGeometryEx() you wrote$iDrive = "The drive letter to retrieve information, in the format D:, E:, etc."but it should be$iDrive = "The drive number as reported by _WinAPI_GetDriveNumber()"Of course. Edited November 9, 2011 by Yashied My UDFs: iKey | FTP Uploader | Battery Checker | Boot Manager | Font Viewer | UDF Keyword Manager | Run Dialog Replacement | USBProtect | 3D Axis | Calculator | Sleep | iSwitcher | TM | NetHelper | File Types Manager | Control Viewer | SynFolders | DLL Helper Animated Tray Icons UDF Library | Hotkeys UDF Library | Hotkeys Input Control UDF Library | Caret Shape UDF Library | Context Help UDF Library | Most Recently Used List UDF Library | Icons UDF Library | FTP UDF Library | Script Communications UDF Library | Color Chooser UDF Library | Color Picker Control UDF Library | IPHelper (Vista/7) UDF Library | WinAPI Extended UDF Library | WinAPIVhd UDF Library | Icon Chooser UDF Library | Copy UDF Library | Restart UDF Library | Event Log UDF Library | NotifyBox UDF Library | Pop-up Windows UDF Library | TVExplorer UDF Library | GuiHotKey UDF Library | GuiSysLink UDF Library | Package UDF Library | Skin UDF Library | AITray UDF Library | RDC UDF Library Appropriate path | Button text color | Gaussian random numbers | Header's styles (Vista/7) | ICON resource enumeration | Menu & INI | Tabbed string size | Tab's skin | Pop-up circular menu | Progress Bar without animation (Vista/7) | Registry export | Registry path jumping | Unique hardware ID | Windows alignment More... Link to comment Share on other sites More sharing options...
KaFu Posted November 10, 2011 Share Posted November 10, 2011 (edited) _WinAPI_GetDriveGeometryEx() currently requires Admin access on Win7.Change the requested access rights for the _WinAPI_CreateFileEx() call in that function from 0x80000000 ($GENERIC_READ) to 0 and it works fine without Admin rights too .This is also documented in MSDN here ("Note The dwDesiredAccess parameter can be zero..."). Edited November 10, 2011 by KaFu OS: Win10-22H2 - 64bit - German, AutoIt Version: 3.3.16.1, AutoIt Editor: SciTE, Website: https://funk.eu AMT - Auto-Movie-Thumbnailer (2024-Oct-13) BIC - Batch-Image-Cropper (2023-Apr-01) COP - Color Picker (2009-May-21) DCS - Dynamic Cursor Selector (2024-Oct-13) HMW - Hide my Windows (2024-Oct-19) HRC - HotKey Resolution Changer (2012-May-16) ICU - Icon Configuration Utility (2018-Sep-16) SMF - Search my Files (2024-Oct-20) - THE file info and duplicates search tool SSD - Set Sound Device (2017-Sep-16) Link to comment Share on other sites More sharing options...
Yashied Posted November 11, 2011 Author Share Posted November 11, 2011 Of course #2. My UDFs: iKey | FTP Uploader | Battery Checker | Boot Manager | Font Viewer | UDF Keyword Manager | Run Dialog Replacement | USBProtect | 3D Axis | Calculator | Sleep | iSwitcher | TM | NetHelper | File Types Manager | Control Viewer | SynFolders | DLL Helper Animated Tray Icons UDF Library | Hotkeys UDF Library | Hotkeys Input Control UDF Library | Caret Shape UDF Library | Context Help UDF Library | Most Recently Used List UDF Library | Icons UDF Library | FTP UDF Library | Script Communications UDF Library | Color Chooser UDF Library | Color Picker Control UDF Library | IPHelper (Vista/7) UDF Library | WinAPI Extended UDF Library | WinAPIVhd UDF Library | Icon Chooser UDF Library | Copy UDF Library | Restart UDF Library | Event Log UDF Library | NotifyBox UDF Library | Pop-up Windows UDF Library | TVExplorer UDF Library | GuiHotKey UDF Library | GuiSysLink UDF Library | Package UDF Library | Skin UDF Library | AITray UDF Library | RDC UDF Library Appropriate path | Button text color | Gaussian random numbers | Header's styles (Vista/7) | ICON resource enumeration | Menu & INI | Tabbed string size | Tab's skin | Pop-up circular menu | Progress Bar without animation (Vista/7) | Registry export | Registry path jumping | Unique hardware ID | Windows alignment More... Link to comment Share on other sites More sharing options...
KaFu Posted November 22, 2011 Share Posted November 22, 2011 I suggest following changes to make functions work as documented: expandcollapse popup_WinAPI_CascadeWindows_Ex(0, 0, 0) Sleep(5000) _WinAPI_TileWindows_Ex(0, 0, 0) Func _WinAPI_CascadeWindows_Ex($aWnds = 0, $tRECT = 0, $hParent = 0, $iFlags = 0, $iStart = 0, $iEnd = -1) If $aWnds = 0 Then Local $Ret = DllCall('user32.dll', 'ushort', 'CascadeWindows', 'hwnd', $hParent, 'uint', $iFlags, 'ptr', DllStructGetPtr($tRECT), 'uint', 0, 'ptr', 0) If (@error) Or (Not $Ret[0]) Then Return SetError(1, 0, 0) EndIf Return $Ret[0] ElseIf Not IsArray($aWnds) Then Return SetError(2, 0, 0) EndIf Local $Count, $tWnds If $iStart < 0 Then $iStart = 0 EndIf If ($iEnd < 0) Or ($iEnd > UBound($aWnds) - 1) Then $iEnd = UBound($aWnds) - 1 EndIf $Count = $iEnd - $iStart + 1 If $Count < 1 Then Return SetError(1, 0, 0) EndIf $tWnds = DllStructCreate('hwnd[' & $Count & ']') If @error Then Return SetError(1, 0, 0) EndIf $Count = 1 For $i = $iStart To $iEnd DllStructSetData($tWnds, 1, $aWnds[$i], $Count) $Count += 1 Next Local $Ret = DllCall('user32.dll', 'ushort', 'CascadeWindows', 'hwnd', $hParent, 'uint', $iFlags, 'ptr', DllStructGetPtr($tRECT), 'uint', $Count - 1, 'ptr', DllStructGetPtr($tWnds)) If (@error) Or (Not $Ret[0]) Then Return SetError(1, 0, 0) EndIf Return $Ret[0] EndFunc ;==>_WinAPI_CascadeWindows_Ex Func _WinAPI_TileWindows_Ex($aWnds = 0, $tRECT = 0, $hParent = 0, $iFlags = 0, $iStart = 0, $iEnd = -1) If $aWnds = 0 Then Local $Ret = DllCall('user32.dll', 'ushort', 'TileWindows', 'hwnd', $hParent, 'uint', $iFlags, 'ptr', DllStructGetPtr($tRECT), 'uint', 0, 'ptr', 0) If (@error) Or (Not $Ret[0]) Then Return SetError(1, 0, 0) EndIf Return $Ret[0] ElseIf Not IsArray($aWnds) Then Return SetError(2, 0, 0) EndIf Local $Count, $tWnds If $iStart < 0 Then $iStart = 0 EndIf If ($iEnd < 0) Or ($iEnd > UBound($aWnds) - 1) Then $iEnd = UBound($aWnds) - 1 EndIf $Count = $iEnd - $iStart + 1 If $Count < 1 Then Return SetError(1, 0, 0) EndIf $tWnds = DllStructCreate('hwnd[' & $Count & ']') If @error Then Return SetError(1, 0, 0) EndIf $Count = 1 For $i = $iStart To $iEnd DllStructSetData($tWnds, 1, $aWnds[$i], $Count) $Count += 1 Next Local $Ret = DllCall('user32.dll', 'ushort', 'TileWindows', 'hwnd', $hParent, 'uint', $iFlags, 'ptr', DllStructGetPtr($tRECT), 'uint', $Count - 1, 'ptr', DllStructGetPtr($tWnds)) If (@error) Or (Not $Ret[0]) Then Return SetError(1, 0, 0) EndIf Return $Ret[0] EndFunc ;==>_WinAPI_TileWindows_Ex OS: Win10-22H2 - 64bit - German, AutoIt Version: 3.3.16.1, AutoIt Editor: SciTE, Website: https://funk.eu AMT - Auto-Movie-Thumbnailer (2024-Oct-13) BIC - Batch-Image-Cropper (2023-Apr-01) COP - Color Picker (2009-May-21) DCS - Dynamic Cursor Selector (2024-Oct-13) HMW - Hide my Windows (2024-Oct-19) HRC - HotKey Resolution Changer (2012-May-16) ICU - Icon Configuration Utility (2018-Sep-16) SMF - Search my Files (2024-Oct-20) - THE file info and duplicates search tool SSD - Set Sound Device (2017-Sep-16) Link to comment Share on other sites More sharing options...
Yashied Posted November 22, 2011 Author Share Posted November 22, 2011 I suggest following changes to make functions work as documented...Done. My UDFs: iKey | FTP Uploader | Battery Checker | Boot Manager | Font Viewer | UDF Keyword Manager | Run Dialog Replacement | USBProtect | 3D Axis | Calculator | Sleep | iSwitcher | TM | NetHelper | File Types Manager | Control Viewer | SynFolders | DLL Helper Animated Tray Icons UDF Library | Hotkeys UDF Library | Hotkeys Input Control UDF Library | Caret Shape UDF Library | Context Help UDF Library | Most Recently Used List UDF Library | Icons UDF Library | FTP UDF Library | Script Communications UDF Library | Color Chooser UDF Library | Color Picker Control UDF Library | IPHelper (Vista/7) UDF Library | WinAPI Extended UDF Library | WinAPIVhd UDF Library | Icon Chooser UDF Library | Copy UDF Library | Restart UDF Library | Event Log UDF Library | NotifyBox UDF Library | Pop-up Windows UDF Library | TVExplorer UDF Library | GuiHotKey UDF Library | GuiSysLink UDF Library | Package UDF Library | Skin UDF Library | AITray UDF Library | RDC UDF Library Appropriate path | Button text color | Gaussian random numbers | Header's styles (Vista/7) | ICON resource enumeration | Menu & INI | Tabbed string size | Tab's skin | Pop-up circular menu | Progress Bar without animation (Vista/7) | Registry export | Registry path jumping | Unique hardware ID | Windows alignment More... Link to comment Share on other sites More sharing options...
DXRW4E Posted November 22, 2011 Share Posted November 22, 2011 (edited) Hi Yashied, thanks for all your work with WinAPIEx, as already written here I think it would be useful to add INF File Processing Functions http://msdn.microsoft.com/en-us/library/ff547428%28VS.85%29.aspx in WinAPIEx, by default AutoIt to limitations when using the IniReadSectionSorry again for my English, Ciao. Edited November 22, 2011 by DXRW4E Link to comment Share on other sites More sharing options...
KaFu Posted November 25, 2011 Share Posted November 25, 2011 Looking at MSDN's documentation on SetPriorityClass I found the flags PROCESS_MODE_BACKGROUND_BEGIN and PROCESS_MODE_BACKGROUND_END for Vista+ which I wanted to test. Of course I've first looked into your WinAPIEx UDF and realized that this one is still missing ... expandcollapse popup#include <WinAPIEx_3.5APIConstants.au3> #include <WinAPIEx_3.5WinAPIEx.au3> HotKeySet("{ESC}", "_Exit") Global Const $IDLE_PRIORITY_CLASS = 0x00000040 Global Const $BELOW_NORMAL_PRIORITY_CLASS = 0x00004000 Global Const $NORMAL_PRIORITY_CLASS = 0x00000020 Global Const $ABOVE_NORMAL_PRIORITY_CLASS = 0x00008000 Global Const $HIGH_PRIORITY_CLASS = 0x00000080 Global Const $REALTIME_PRIORITY_CLASS = 0x00000100 Global Const $PROCESS_MODE_BACKGROUND_BEGIN = 0x00100000 ; Vista+ only Global Const $PROCESS_MODE_BACKGROUND_END = 0x00200000 ; Vista+ only $iRes = _WinAPI_Process_SetPriorityClass($HIGH_PRIORITY_CLASS) $iError = @error $iExtended = @extended ConsoleWrite(@AutoItPID & @TAB & $iRes & @TAB & $iError & @TAB & $iExtended & @CRLF) While 1 Sleep(10) WEnd ; #FUNCTION# ==================================================================================================================== ; Name...........: _WinAPI_Process_SetPriorityClass ; Description....: Sets the priority class for the specified process ; Syntax.........: _WinAPI_Process_SetPriorityClass ( $iFlag ) ; Parameters.....: $iFlags - The flags that specify the process priority to set. This parameter can be one of the ; following values: ; ; $IDLE_PRIORITY_CLASS ; $BELOW_NORMAL_PRIORITY_CLASS ; $NORMAL_PRIORITY_CLASS (default) ; $ABOVE_NORMAL_PRIORITY_CLASS ; $HIGH_PRIORITY_CLASS ; $REALTIME_PRIORITY_CLASS ; $PROCESS_MODE_BACKGROUND_BEGIN - Vista+ only ; $PROCESS_MODE_BACKGROUND_END - Vista+ only ; ; $PID - The PID of the process. Default (@AutoItPID) is the current process. ; ; Return values..: Success - 1. ; Failure - 0 and sets the @error flag to non-zero ; Author.........: KaFu ; Modified.......: ; Remarks........: None ; Related........: ; Link...........: @@MsdnLink@@ SetPriorityClass ; Example........: Yes ; =============================================================================================================================== Func _WinAPI_Process_SetPriorityClass($iFlag = $NORMAL_PRIORITY_CLASS, $PID = @AutoItPID) If $__WINVER < 0x0600 And (BitAND($iFlag, $PROCESS_MODE_BACKGROUND_BEGIN) Or BitAND($iFlag, $PROCESS_MODE_BACKGROUND_END)) Then Return SetError(1, 0, 0) ; not supported EndIf Local $iError Local $hProcess = DllCall("Kernel32.dll", "ptr", "OpenProcess", "dword", __Iif($__WINVER < 0x0600, BitOR(0x0400, 0x0200), BitOR(0x1000, 0x0400, 0x0200)), "bool", 0, "dword", $PID) If (@error) Or (Not $hProcess[0]) Then Return SetError(2, _WinAPI_GetLastError(), 0) EndIf Local $Ret = DllCall("Kernel32.dll", "int", "SetPriorityClass", "ptr", $hProcess[0], "dword", $iFlag) If (@error) Or (Not $Ret[0]) Then $iError = _WinAPI_GetLastError() EndIf _WinAPI_CloseHandle($hProcess[0]) If $iError Then Return SetError(3, $iError, 0) Return $Ret[0] EndFunc ;==>_WinAPI_Process_SetPriorityClass Func _Exit() Exit EndFunc ;==>_Exit OS: Win10-22H2 - 64bit - German, AutoIt Version: 3.3.16.1, AutoIt Editor: SciTE, Website: https://funk.eu AMT - Auto-Movie-Thumbnailer (2024-Oct-13) BIC - Batch-Image-Cropper (2023-Apr-01) COP - Color Picker (2009-May-21) DCS - Dynamic Cursor Selector (2024-Oct-13) HMW - Hide my Windows (2024-Oct-19) HRC - HotKey Resolution Changer (2012-May-16) ICU - Icon Configuration Utility (2018-Sep-16) SMF - Search my Files (2024-Oct-20) - THE file info and duplicates search tool SSD - Set Sound Device (2017-Sep-16) Link to comment Share on other sites More sharing options...
guinness Posted November 28, 2011 Share Posted November 28, 2011 What about these? I realise there are Macros already but thought I would at least give it a go. ConsoleWrite(_WinAPI_GetComputerName() & @LF) ConsoleWrite(_WinAPI_GetSystemWindowsDirectory() & @LF) ConsoleWrite(_WinAPI_GetUserName() & @LF) Func _WinAPI_GetComputerName() Local $tSize = DllStructCreate("dword[256]") Local $Ret = DllCall('kernel32.dll', 'int', 'GetComputerNameW', 'wstr', '', 'dword*', DllStructGetPtr($tSize)) If (@error) Or (Not $Ret[0]) Then Return SetError(1, 0, '') EndIf Return $Ret[1] EndFunc ;==>_WinAPI_GetUserName Func _WinAPI_GetSystemWindowsDirectory() Local $Ret = DllCall('kernel32.dll', 'uint', 'GetSystemWindowsDirectoryW', 'wstr', '', 'uint', 4096) If (@error) Or (Not $Ret[0]) Then Return SetError(1, 0, '') EndIf Return $Ret[1] EndFunc ;==>_WinAPI_GetSystemWindowsDirectory Func _WinAPI_GetUserName() Local $tSize = DllStructCreate("dword[256]") Local $Ret = DllCall('advapi32.dll', 'int', 'GetUserNameW', 'wstr', '', 'dword*', DllStructGetPtr($tSize)) If (@error) Or (Not $Ret[0]) Then Return SetError(1, 0, '') EndIf Return $Ret[1] EndFunc ;==>_WinAPI_GetUserName 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...
guinness Posted November 28, 2011 Share Posted November 28, 2011 I was about to give GetProductInfo a go, but seems KaFu already created something similar >> 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...
AndrewG Posted November 30, 2011 Share Posted November 30, 2011 I don't know if anybody has mentioned this before in this thread; I'm not about to read through 17 pages, but if so please excuse me.Avira Antivir Personal - Free Antivirus version 10.2.704, reports the MyProg.exe contained in the extras folder inside the WinAPIEx_3.5.zip is the TR/Crypt.XPACK.Gen TrojanMaybe/probably a false positive but I thought people might like to know. Link to comment Share on other sites More sharing options...
guinness Posted November 30, 2011 Share Posted November 30, 2011 It's been mentioned many times before, please read the FAQ section on the Forum about 'AutoIt and false positives.' 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...
funkey Posted November 30, 2011 Share Posted November 30, 2011 @guinness: This is not an AutoIt-Executable! This is a small executable with about 2kB and shows a MsgBox. It is used to show how to update the icon resource with the API. I got the virus warning too, I know this is a false positive but I simply deleted the file. Programming today is a race between software engineers striving tobuild bigger and better idiot-proof programs, and the Universetrying to produce bigger and better idiots.So far, the Universe is winning. 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