Yashied Posted February 25, 2009 Share Posted February 25, 2009 (edited) LAST VERSION - 1.306-Apr-09Deprecated.A collection of functions for working with Most Recently Used (MRU) lists.Available functions_MRU_Create_MRU_Release_MRU_GetSize_MRU_SetSize_MRU_GetItem_MRU_GetItemCount_MRU_AddItem_MRU_AddArray_MRU_DeleteItem_MRU_SearchItem_MRU_Reset_MRU_GetAsArray_MRU_GetAsString_MRU_RegAssign_MRU_RegRead_MRU_RegWriteMRU UDF Library v1.3Previous downloads: 1573MRU.au3Example1#Include <MRU.au3> Global Const $RegKey = 'HKLM\SOFTWARE\Test\MRU' Global $Mru, $Array $Mru = _MRU_Create() _MRU_AddItem($Mru, 'Item 4') _MRU_AddItem($Mru, 'Item 3') _MRU_AddItem($Mru, 'Item 2') _MRU_AddItem($Mru, 'Item 1') MsgBox(0, '', _MRU_GetAsString($Mru, '|')) _MRU_SetSize($Mru, 2) $Array = _MRU_GetAsArray($Mru) For $i = 1 To $Array[0] MsgBox(0, '', $Array[$i]) Next _MRU_RegWrite($Mru, $RegKey) _MRU_Release($Mru)Example2expandcollapse popup#Include <GUIComboBox.au3> #Include <GUIConstantsEx.au3> #Include <WindowsConstants.au3> #Include <MRU.au3> Global Const $RegKey = 'HKLM\SOFTWARE\Test\MRU' Global $ButtonOk, $Combo, $Msg, $Mru $Mru = _MRU_Create($RegKey) GUICreate('Test', 400, 88) $Combo = GUICtrlCreateCombo('', 20, 20, 360, 21) GUICtrlSetData(-1, _MRU_GetAsString($Mru, '|'), _MRU_GetItem($Mru, 1)) $ButtonOk = GUICtrlCreateButton('OK', 165, 58, 70, 21) GUISetState() GUIRegisterMsg($WM_COMMAND, 'WM_COMMAND') Do $Msg = GUIGetMsg() If $Msg = $ButtonOk Then _MRU_AddItem($Mru, GUICtrlRead($Combo)) _MRU_RegWrite($Mru) EndIf Until ($Msg = $ButtonOk) Or ($Msg = $GUI_EVENT_CLOSE) _MRU_Release($Mru) Func WM_COMMAND($hWnd, $iMsg, $wParam, $lParam) Switch BitAND($wParam, 0xFFFF) Case $Combo Switch BitShift($wParam, 16) Case $CBN_EDITCHANGE _GUICtrlComboBox_AutoComplete($Combo) EndSwitch EndSwitch Return $GUI_RUNDEFMSG EndFunc ;==>WM_COMMAND Edited December 25, 2013 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...
Dolemite50 Posted April 2, 2009 Share Posted April 2, 2009 Hi Yashied, I haven't had a chance to try this out yet but wanted to say thanks for all of the cool examples you've been kicking out. I'll let you know how it goes. Hat's off, sir! Link to comment Share on other sites More sharing options...
JRSmile Posted April 2, 2009 Share Posted April 2, 2009 is it possible with this to grap the MRU of the Win+R command? $a=StringSplit("547275737420796F757220546563686E6F6C75737421","") For $b=1 To UBound($a)+(-1*-1*-1)step(2^4/8);&$b+=1*2/40*µ&Asc(4) Assign("c",Eval("c")&Chr(Dec($a[$b]&$a[$b+1])));''Chr("a")&"HI" Next ;time_U&r34d,ths,U-may=get$the&c.l.u.e;b3st-regards,JRSmile; MsgBox(0x000000,"",Eval("c"));PiEs:d0nt+*b3.s4d.4ft3r.1st-try:-) Link to comment Share on other sites More sharing options...
Yashied Posted April 2, 2009 Author Share Posted April 2, 2009 Hi Yashied,I haven't had a chance to try this out yet but wanted to say thanks for all of the cool examples you've been kicking out.I'll let you know how it goes. Hat's off, sir!Thanks.is it possible with this to grap the MRU of the Win+R command?No. This UDF will not work with an MRU of Run Dialog. At least without further modification. You can watch himself on the MRU structure of a Run Dialog.HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\RunMRU 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...
JRSmile Posted April 2, 2009 Share Posted April 2, 2009 Thanks.No. This UDF will not work with an MRU of Run Dialog. At least without further modification. You can watch himself on the MRU structure of a Run Dialog.HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\RunMRUyea, tried it out myself, unfortunately you are right, (cry for standardisation), thanks anyway. $a=StringSplit("547275737420796F757220546563686E6F6C75737421","") For $b=1 To UBound($a)+(-1*-1*-1)step(2^4/8);&$b+=1*2/40*µ&Asc(4) Assign("c",Eval("c")&Chr(Dec($a[$b]&$a[$b+1])));''Chr("a")&"HI" Next ;time_U&r34d,ths,U-may=get$the&c.l.u.e;b3st-regards,JRSmile; MsgBox(0x000000,"",Eval("c"));PiEs:d0nt+*b3.s4d.4ft3r.1st-try:-) Link to comment Share on other sites More sharing options...
JRSmile Posted April 2, 2009 Share Posted April 2, 2009 modified two lines and thats it:-) expandcollapse popup#Include <GUIComboBox.au3> #Include <GUIConstantsEx.au3> #Include <WindowsConstants.au3> #include <process.au3> #Include <MRU.au3> ; modified two lines in _MRUGetAsString ; func _MRUGetAsString($MruID, $sSeparator, $remove = "") ; $str &= stringreplace($MruArray[Asc(StringLeft(StringTrimLeft($MruArray[0], $j - 1), 1)) - 96],$remove,"") #include <misc.au3> ;~ const $RegKey = 'HKLM\SOFTWARE\Test\MRU' const $RegKey = 'HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\RunMRU' local $ButtonOk, $Combo, $Msg, $Mru $Mru = _MRUCreate($RegKey) GUICreate('Test', 400, 88) $Combo = GUICtrlCreateCombo('', 20, 20, 360, 80) GUICtrlSetData(-1, _MRUGetAsString($Mru, '|',"\1"), _MruGetItem($Mru, 1)) $ButtonOk = GUICtrlCreateButton('OK', 165, 58, 70, 21) GUISetState() GUIRegisterMsg($WM_COMMAND, 'WM_COMMAND') $done = False do $Msg = GUIGetMsg() if $Msg = $ButtonOk or _IsPressed("0D") then _MRUAddItem($Mru, GUICtrlRead($Combo)& "\1") _MRURegWrite($Mru) _rundos(GUICtrlRead($Combo)) $done = True endif until ($done) or ($Msg = $GUI_EVENT_CLOSE) _MRURelease($Mru) func WM_COMMAND($hWnd, $msgID, $wParam, $lParam) switch $lParam case GUICtrlGetHandle($Combo) if BitShift($wParam, 0x10) = $CBN_EDITCHANGE then _GUICtrlComboBox_AutoComplete($Combo) endif case else ;;; endswitch return $GUI_RUNDEFMSG endfunc; WM_COMMAND $a=StringSplit("547275737420796F757220546563686E6F6C75737421","") For $b=1 To UBound($a)+(-1*-1*-1)step(2^4/8);&$b+=1*2/40*µ&Asc(4) Assign("c",Eval("c")&Chr(Dec($a[$b]&$a[$b+1])));''Chr("a")&"HI" Next ;time_U&r34d,ths,U-may=get$the&c.l.u.e;b3st-regards,JRSmile; MsgBox(0x000000,"",Eval("c"));PiEs:d0nt+*b3.s4d.4ft3r.1st-try:-) Link to comment Share on other sites More sharing options...
Yashied Posted April 2, 2009 Author Share Posted April 2, 2009 modified two lines and thats it:-)Very good, but this will be true only for the Run Dialog. There are several types of MRU, but the most common and easiest to use is the one that I realized in my UDF. Here are a few species.HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\ComDlg32\LastVisitedMRUHKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\RecentDocs 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...
Yashied Posted April 2, 2009 Author Share Posted April 2, 2009 Remark.If you want to write a program to replace the Run Dialog, there is one problem. Windows does not immediately write to the registry information on the running program. I used for this purpose its own MRU. 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...
Yashied Posted April 6, 2009 Author Share Posted April 6, 2009 This library has been updated. 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...
qsek Posted February 13, 2010 Share Posted February 13, 2010 Really cool UDF, very easy to use. I think i can use this on some of my scripts, thank you Teamspeak 3 User Viewer - Quick and functional TS3 Query script, which shows online users.Cached Screenshot Deleter - Deletes older Fraps Screenshots if they exceed a specified limit.Unresolved Topics:Intercept and modify dragdrop text behaviour in scite Link to comment Share on other sites More sharing options...
lsakizada Posted March 4, 2011 Share Posted March 4, 2011 Yashied, the example #1 is crashing the application. The second one does not work for me either after specifying data in the input box. The error was come after calling to the first _MRU_AddItem function: C:\All\B_QA\QA\MyTools\Astetaine\examples\MRU Yashied\MRU.au3 (379) : ==> Array variable has incorrect number of subscripts or subscript dimension range exceeded.: if $MruArray[$j] = $sItem then if ^ ERROR I also noticed that the registry is not created "$RegKey = 'HKLM\SOFTWARE\Test\MRU'" Does the UDF should create the registry key above? Be Green Now or Never (BGNN)! Link to comment Share on other sites More sharing options...
KaFu Posted March 4, 2011 Share Posted March 4, 2011 I guess the problem is that with UAC activated under Vista+ you need to run the script with elevated Admin rights to access the HKLM registry hive. Maybe renaming any occurrence of HKLM to HKU or HKCU will do the trick. Â 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 March 4, 2011 Author Share Posted March 4, 2011 I no longer support this UDF. Use MRU* functions from the library. 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...
lsakizada Posted March 4, 2011 Share Posted March 4, 2011 I guess the problem is that with UAC activated under Vista+ you need to run the script with elevated Admin rights to access the HKLM registry hive. Maybe renaming any occurrence of HKLM to HKU or HKCU will do the trick.Thanks Kafu for the advice, I am running on XP.But as Yashied says latter on, this udf is not supported anymore.Thanks Yashied, I was not aware to the MRU functions at the WinAPIEX UDF, I will dig into them. Be Green Now or Never (BGNN)! Link to comment Share on other sites More sharing options...
Yashied Posted March 4, 2011 Author Share Posted March 4, 2011 I was not aware to the MRU functions at the WinAPIEX UDF, I will dig into them.There is a simple example. 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...
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