Jump to content



Photo

_GUICtrlMenu_Recent() - Create a recent menu to add previously opened files or other text items to.


  • Please log in to reply
19 replies to this topic

#1 guinness

guinness

    guinness

  • MVPs
  • 10,252 posts

Posted 17 June 2011 - 02:03 PM

_GUICtrlMenu_Recent() is for those that enjoy using GUICtrlCreateMenu() and would love to have the ability to have a "Recent" menu list with little to no fuss at all. The UDF contains only 6 Functions and due to the design of the UDF, reading the recent menu item that was selected is very easy indeed. Try the Example provided to get an idea.

Any suggestions or improvements then please post below. Thanks.

Example:
Posted Image

UDF:
AutoIt         
#include-once ; #AutoIt3Wrapper_Au3Check_Parameters=-d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6 -w 7 ; #INDEX# ======================================================================================================================= ; Title .........: _GUICtrlMenu_Recent ; AutoIt Version : v3.2.2.0 or higher ; Language ......: English ; Description ...: Create a recent menu to add previously opened files or other text items to. ; Author(s) .....: guinness ; =============================================================================================================================== ; #INCLUDES# ========================================================================================================= #include <WinAPI.au3> #include <WindowsConstants.au3> ; #GLOBAL VARIABLES# ================================================================================================= ; None ; #CURRENT# ===================================================================================================================== ; _GUICtrlMenu_RecentAdd: Add an item to the recent menu that was created with _GUICtrlMenu_RecentCreate. ; _GUICtrlMenu_RecentCreate: Create a recent menu that is added to an existing menu created with GUICtrlCreateMenu. ; _GUICtrlMenu_RecentDelete: Delete an item in the recent menu that was created with _GUICtrlMenu_RecentCreate. ; _GUICtrlMenu_RecentIsInMenu: Search if a filepath or text is currently in the menu list. ; _GUICtrlMenu_RecentSelected: Retrieve the text of a selected menu item and delete from the menu list. ; _GUICtrlMenu_RecentTotal: Change the total number of items to be displayed in the recent menu. ; =============================================================================================================================== ; #INTERNAL_USE_ONLY#============================================================================================================ ; __GUICtrlMenu_RecentDelete ; =============================================================================================================================== ; #FUNCTION# ==================================================================================================================== ; Name ..........: _GUICtrlMenu_RecentAdd ; Description ...: Add an item to the recent menu that was created with _GUICtrlMenu_RecentCreate. ; Syntax ........: _GUICtrlMenu_RecentAdd(Byref $aAPI, $sText) ; Parameters ....: $aAPI                - [in/out] API created by _GUICtrlMenu_RecentCreate. ;                  $sText               - Text to be added to the recent menu. ;                  $fShortText          - [optional] Display the text as short text e.g. 'C:Example...Test.au3'. Default is False. ; Return values .: Success - ControlID from GUICtrlCreateMenuItem ;                  Failure - Returns 0 & sets @error to none-zero. ; Author ........: guinness ; Example .......: Yes ; =============================================================================================================================== Func _GUICtrlMenu_RecentAdd(ByRef $aAPI, $sText, $fShortText = False)     Local Enum $iAPICount, $iAPIColumns, $iAPITotal, $iAPIMenu, $iAPIMax     #forceref $iAPIMax     If $aAPI[0][$iAPIMenu] = -1 Then         Return SetError(1, 0, 0)     EndIf     _GUICtrlMenu_RecentIsInMenu($aAPI, $sText)     Local Const $iIndex = @extended     If $iIndex Then         __GUICtrlMenu_RecentDelete($aAPI, $aAPI[0][$iAPITotal], $iIndex, $aAPI[0][$iAPICount], $aAPI[0][$iAPIColumns])     EndIf     If $aAPI[0][$iAPICount] = $aAPI[0][$iAPITotal] Then         __GUICtrlMenu_RecentDelete($aAPI, $aAPI[0][$iAPITotal], 1, $aAPI[0][$iAPICount], $aAPI[0][$iAPIColumns])     EndIf     Local $sShortText = $sText     If $fShortText Then         $sShortText = StringRegExpReplace($sText, '(^.{3,11}|.{11})(.*)(.{6,27}|.{27})$', '1...3') ; Thanks to AZJIO for the regular expression.     EndIf     $aAPI[0][$iAPITotal] += 1     $aAPI[$aAPI[0][$iAPITotal]][0] = GUICtrlCreateMenuItem($sShortText, $aAPI[0][$iAPIMenu], 0)     $aAPI[$aAPI[0][$iAPITotal]][1] = $sText     $aAPI[$aAPI[0][$iAPITotal]][2] = $sShortText     Return $aAPI[$aAPI[0][$iAPITotal]][0] EndFunc   ;==>_GUICtrlMenu_RecentAdd ; #FUNCTION# ==================================================================================================================== ; Name ..........: _GUICtrlMenu_RecentCreate ; Description ...: Create a recent menu that is added to an existing menu created with GUICtrlCreateMenu. ; Syntax ........: _GUICtrlMenu_RecentCreate(Byref $aAPI, $iTotal, $iMenu, $sTitle[, $iMenuEntry = -1]) ; Parameters ....: $aAPI                - [in/out] Variable to be used to store the API information. ;                  $iTotal              - Maximum total number of recent menu items to be displayed. If this is exceeded then old values will be overwritten. ;                  $iMenu               - Existing menu id created with GUICtrlCreateMenu. ;                  $sTitle              - Title of the recent menu. ; Return values .: Success - API to be passed to _GUICtrlMenu_RecentAdd, _GUICtrlMenu_RecentIsInMenu or _GUICtrlMenu_RecentSelected. ;                  Failure - None ; Author ........: guinness ; Example .......: Yes ; =============================================================================================================================== Func _GUICtrlMenu_RecentCreate(ByRef $aAPI, $iTotal, $iMenu, $sTitle)     Local Enum $iAPICount, $iAPIColumns, $iAPITotal, $iAPIMenu, $iAPIMax     If $iTotal < 1 Then         $iTotal = 10     EndIf     Local $aArray[$iTotal + 1][$iAPIMax]     $aArray[0][$iAPICount] = $iTotal ; Total number of rows.     $aArray[0][$iAPIColumns] = $iAPIMax ; Total number of columns.     $aArray[0][$iAPITotal] = 0 ; Total number of items.     $aArray[0][$iAPIMenu] = $iMenu ; Menu controlid for the recent list.     $aArray[0][$iAPIMenu] = GUICtrlCreateMenu($sTitle, $aArray[0][$iAPIMenu])     $aAPI = $aArray EndFunc   ;==>_GUICtrlMenu_RecentCreate ; #FUNCTION# ==================================================================================================================== ; Name ..........: _GUICtrlMenu_RecentDelete ; Description ...: Delete an item in the recent menu that was created with _GUICtrlMenu_RecentCreate. ; Syntax ........: _GUICtrlMenu_RecentDelete(Byref $aAPI, $vIndex) ; Parameters ....: $aAPI                - [in/out] API created by _GUICtrlMenu_RecentCreate. ;                  $vIndex              - Value to be deleted. This can either be an integer of the API index (see _GUICtrlMenu_RecentIsInMenu and remarks) ;                                          or a string value of the item. ; Return values .: Success - True ;                    Failure - False and sets @error to non-zero. ; Author ........: guinness ; Example .......: Yes ; =============================================================================================================================== Func _GUICtrlMenu_RecentDelete(ByRef $aAPI, $vIndex)     Local Enum $iAPICount, $iAPIColumns, $iAPITotal, $iAPIMenu, $iAPIMax     #forceref $iAPIMenu, $iAPIMax     If IsString($vIndex) Then         _GUICtrlMenu_RecentIsInMenu($aAPI, $vIndex)         $vIndex = @extended     EndIf     If $vIndex <= 0 Or $vIndex > $aAPI[0][$iAPICount] Then         Return SetError(1, 0, False)     EndIf     Return __GUICtrlMenu_RecentDelete($aAPI, $aAPI[0][$iAPITotal], $vIndex, $aAPI[0][$iAPICount], $aAPI[0][$iAPIColumns]) EndFunc   ;==>_GUICtrlMenu_RecentDelete ; #FUNCTION# ==================================================================================================================== ; Name ..........: _GUICtrlMenu_RecentIsInMenu ; Description ...: Search if a filepath or text is currently in the menu list. ; Syntax ........: _GUICtrlMenu_RecentIsInMenu(Byref $aAPI, $sText) ; Parameters ....: $aAPI                - [in/out and const] API created by _GUICtrlMenu_RecentCreate. ;                  $sText               - Text to search for. This is a case-sensitive search. ; Return values .: Success - True ;                  Failure - False ; Author ........: guinness ; Remarks .......: @extended is set to the index position in the API handle. This is useful if using GUICtrlMenu_RecentDelete. ; Example .......: Yes ; =============================================================================================================================== Func _GUICtrlMenu_RecentIsInMenu(ByRef Const $aAPI, $sText)     Local Enum $iAPICount, $iAPIColumns, $iAPITotal, $iAPIMenu, $iAPIMax     #forceref $iAPIColumns, $iAPITotal, $iAPIMenu, $iAPIMax     For $i = 1 To $aAPI[0][$iAPICount]         If ($sText == $aAPI[$i][1]) Or ($sText == $aAPI[$i][2]) Then             Return SetExtended($i, True)         EndIf     Next     Return SetExtended(0, False) EndFunc   ;==>_GUICtrlMenu_RecentIsInMenu ; #FUNCTION# ==================================================================================================================== ; Name ..........: _GUICtrlMenu_RecentSelected ; Description ...: Retrieve the text of a selected menu item and delete from the menu list. ; Syntax ........: _GUICtrlMenu_RecentSelected(Byref $aAPI, $iMsg) ; Parameters ....: $aAPI                - [in/out] API created by _GUICtrlMenu_RecentCreate. ;                  $iMsg                - Message id returned by GUIGetMsg. ; Return values .: Success - Text of the selected menu. ;                  Failure - Blank string and sets @error to non-zero. ; Author ........: guinness ; Example .......: Yes ; =============================================================================================================================== Func _GUICtrlMenu_RecentSelected(ByRef $aAPI, $iMsg)     Local Enum $iAPICount, $iAPIColumns, $iAPITotal, $iAPIMenu, $iAPIMax     #forceref $iAPIMenu, $iAPIMax     If $iMsg <= 0 Then         Return SetError(1, 0, '')     EndIf     Local $sFilePath = ''     For $i = 1 To $aAPI[0][$iAPICount]         If $iMsg = $aAPI[$i][0] Then             $sFilePath = $aAPI[$i][1]             __GUICtrlMenu_RecentDelete($aAPI, $aAPI[0][$iAPITotal], $i, $aAPI[0][$iAPICount], $aAPI[0][$iAPIColumns])             ExitLoop         EndIf     Next     Return $sFilePath EndFunc   ;==>_GUICtrlMenu_RecentSelected ; #FUNCTION# ==================================================================================================================== ; Name ..........: _GUICtrlMenu_RecentTotal ; Description ...: Change the total number of items to be displayed in the recent menu. ; Syntax ........: _GUICtrlMenu_RecentTotal(Byref $aAPI, $iTotal) ; Parameters ....: $aAPI                - [in/out] API created by _GUICtrlMenu_RecentCreate. ;                  $iTotal              - Maximum total number of recent menu items to be displayed. If this is exceeded then old values will be overwritten. ; Return values .: Success - True ;                  Failure - False and sets @error to non-zero. ; Author ........: guinness ; Example .......: Yes ; =============================================================================================================================== Func _GUICtrlMenu_RecentTotal(ByRef $aAPI, $iTotal)     Local Enum $iAPICount, $iAPIColumns, $iAPITotal, $iAPIMenu, $iAPIMax     #forceref $iAPIMenu, $iAPIMax     If $iTotal < 1 Or $iTotal = $aAPI[0][$iAPICount] Then         Return SetError(1, 0, False)     EndIf     If $iTotal < $aAPI[0][$iAPICount] Then         For $i = 1 To ($aAPI[0][$iAPITotal] - $iTotal)             GUICtrlDelete($aAPI[$i][0])         Next         Local $iIndex = ($aAPI[0][$iAPITotal] - $iTotal) + 1         For $i = 1 To $iTotal             For $j = 0 To $aAPI[0][$iAPIColumns] - 1                 $aAPI[$i][$j] = $aAPI[$iIndex][$j]             Next             $iIndex += 1         Next         $aAPI[0][$iAPITotal] = $iTotal     EndIf     $aAPI[0][$iAPICount] = $iTotal     ReDim $aAPI[$aAPI[0][$iAPICount] + 1][$aAPI[0][$iAPIColumns]]     Return True EndFunc   ;==>_GUICtrlMenu_RecentTotal ; #INTERNAL_USE_ONLY#============================================================================================================ Func __GUICtrlMenu_RecentDelete(ByRef $aAPI, ByRef $iTotal, $iIndex, $iCount, $iColumns)     Local $iReturn = GUICtrlDelete($aAPI[$iIndex][0])     For $i = $iIndex To $iCount - 1         For $j = 0 To $iColumns - 1             $aAPI[$i][$j] = $aAPI[$i + 1][$j]             $aAPI[$i + 1][$j] = ''         Next     Next     $iTotal -= 1     Return $iReturn = 1 EndFunc   ;==>__GUICtrlMenu_RecentDelete

Example 1:
AutoIt         
#AutoIt3Wrapper_Au3Check_Parameters=-d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6 -w 7 #include <GUIConstantsEx.au3> #include '_GUICtrlMenu_Recent.au3' Example() Func Example()     Local $sFilePath = ''     Local $hGUI = GUICreate('_GUICtrlMenu_Recent() Example', 300, 200)     Local $iFileMenu = GUICtrlCreateMenu('&File')     Local $iOpen = GUICtrlCreateMenuItem('Open', $iFileMenu)     GUICtrlSetState(-1, $GUI_DEFBUTTON)     ; Create a variable to store the recent menu API information.     Local $hRecentMenu = 0     _GUICtrlMenu_RecentCreate($hRecentMenu, 5, $iFileMenu, 'Recent Files') ; Create a recent menu with a maximum of 5 displayed items.     GUICtrlCreateMenuItem('', $iFileMenu) ; Seperator Line.     GUICtrlCreateMenuItem('Save', $iFileMenu)     GUICtrlSetState(-1, $GUI_DISABLE)     Local $iExit = GUICtrlCreateMenuItem('Exit', $iFileMenu)     Local $iOpenFile = GUICtrlCreateButton('Open File', 5, 10, 85, 25)     Local $iIncreaseItems = GUICtrlCreateButton('Increase Recent List', 5, 35, 115, 25)     GUISetState(@SW_SHOW, $hGUI)     Local $iMsg = 0     While 1         $iMsg = GUIGetMsg()         Switch $iMsg             Case $GUI_EVENT_CLOSE, $iExit                 ExitLoop             Case $iOpenFile, $iOpen                 $sFilePath = FileOpenDialog('Choose File...', @ScriptDir, 'All (*.*)')                 If @error = 0 Then                     ; Check whether or not the filepath is currently in the recent menu. If it isn't then add to the recent menu.                     If Not _GUICtrlMenu_RecentIsInMenu($hRecentMenu, $sFilePath) Then                         ; If the button or open menu items are selected then add a filepath to the recent menu.                         _GUICtrlMenu_RecentAdd($hRecentMenu, $sFilePath, True) ; Display the text as short text.                     EndIf                 EndIf             Case $iIncreaseItems                 If _GUICtrlMenu_RecentTotal($hRecentMenu, 20) Then                     MsgBox(4096, '', 'The recent menu list was increased to a maximum of 20 items.', 0, $hGUI)                 Else                     MsgBox(4096, '', 'The recent menu list wasn''t increased to a maximum of 20 items. An error occurred.', 0, $hGUI)                 EndIf             Case Else                 ; Check if the message id returned by GUIGetMsg is present in the menu list.                 $sFilePath = _GUICtrlMenu_RecentSelected($hRecentMenu, $iMsg)                 If Not @error And $sFilePath Then                     MsgBox(4096, '', 'The recent menu was clicked and the following item was selected.' & @CRLF & _                             @CRLF & _                             $sFilePath, 0, $hGUI)                 EndIf         EndSwitch     WEnd     GUIDelete($hGUI) EndFunc   ;==>Example

All of the above has been included in a ZIP file. Attached File  GUICtrlMenu_Recent.zip   3.4K   75 downloads

Edited by guinness, 23 October 2012 - 09:52 PM.

  • JScript likes this

Example List: _AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_DesktopDimensions()_DisplayPassword()_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()_GUISetIcon()_Icon_Clear()/_Icon_Set()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_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()_StringIsValid()_StringReplaceWholeWord()_StringStripChar()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()AutoIt SearchAutoIt3 PortableAutoItWinGetTitle()/AutoItWinSetTitle()CodingFileInstallrGeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIGetBkColor()LockFile()PasteBinSciTE JumpSignature CreatorWM_COPYDATAMore Examples...Updated: 11/04/2013






#2 guinness

guinness

    guinness

  • MVPs
  • 10,252 posts

Posted 08 October 2012 - 08:22 PM

This UDF has been re-written entirely from scratch and does away with the ugly Global variable that was being used to store the relevant information. I've opted for passing an array to the appropriate functions as a reference, so very little knowledge is required to know what is going on behind the scenes. Please see the example for more details on how to use this UDF. Thanks.

Example List: _AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_DesktopDimensions()_DisplayPassword()_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()_GUISetIcon()_Icon_Clear()/_Icon_Set()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_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()_StringIsValid()_StringReplaceWholeWord()_StringStripChar()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()AutoIt SearchAutoIt3 PortableAutoItWinGetTitle()/AutoItWinSetTitle()CodingFileInstallrGeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIGetBkColor()LockFile()PasteBinSciTE JumpSignature CreatorWM_COPYDATAMore Examples...Updated: 11/04/2013


#3 JScript

JScript

    Goodbye everybody, I got tired of this system adopted here!

  • Active Members
  • PipPipPipPipPipPip
  • 1,062 posts

Posted 08 October 2012 - 10:37 PM

Wow, I really like this, great idea!!!

In my opinion all UDF that saves us the work of typing several lines of code is always welcome!

Thanks 4 sharing.

JS
http://notebook.forumais.com (Forum Maintenance Notebooks and Desktop)http://autoitbrasil.com/ (AutoIt v3 Brazil!!!)
Spoiler

Posted Image Download Dropbox - Simplify your life!Your virtual HD wherever you go, anywhere!       


#4 AZJIO

AZJIO

    Universalist

  • Active Members
  • PipPipPipPipPipPip
  • 996 posts

Posted 09 October 2012 - 03:42 AM

1. If I want to change the Customize the number of items in the menu?
2. If I want to change the settings to display the short?
$test='C:Program FilesTeamViewerVersion7TeamViewer.exe' MsgBox(0, '', StringRegExpReplace($test, '(^.{3,11}|.{11})(.*)(.{6,27}|.{27})$', '1...3'))


#5 guinness

guinness

    guinness

  • MVPs
  • 10,252 posts

Posted 09 October 2012 - 09:31 AM

1. Look at _GUICtrlMenu_RecentCreate and the parameter $iTotal to set the number of items.
2. Thanks, see the original post for the addition. The function _GUICtrlMenu_RecentAdd has an additional boolean parameter for short text.

To all,

I have updated the UDF with the addition suggested by AZJIO to use short text e.g. 'C:Example...Test.au3' instead of the full path. Please see the original post for more details.

Example List: _AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_DesktopDimensions()_DisplayPassword()_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()_GUISetIcon()_Icon_Clear()/_Icon_Set()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_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()_StringIsValid()_StringReplaceWholeWord()_StringStripChar()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()AutoIt SearchAutoIt3 PortableAutoItWinGetTitle()/AutoItWinSetTitle()CodingFileInstallrGeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIGetBkColor()LockFile()PasteBinSciTE JumpSignature CreatorWM_COPYDATAMore Examples...Updated: 11/04/2013


#6 AZJIO

AZJIO

    Universalist

  • Active Members
  • PipPipPipPipPipPip
  • 996 posts

Posted 09 October 2012 - 10:09 AM

1. Look at _GUICtrlMenu_RecentCreate and the parameter $iTotal to set the number of items.

Yes, but I do not want to list cleared when resizing

#7 guinness

guinness

    guinness

  • MVPs
  • 10,252 posts

Posted 09 October 2012 - 10:19 AM

OK I will add an additional function later on today, something like _GUICtrlMenu_RecentParams(ByRef $aAPI, $iTotal, $fClearSelected = True) to adjust the size of the recent list and whether or not to clear the items upon selection.

Example List: _AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_DesktopDimensions()_DisplayPassword()_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()_GUISetIcon()_Icon_Clear()/_Icon_Set()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_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()_StringIsValid()_StringReplaceWholeWord()_StringStripChar()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()AutoIt SearchAutoIt3 PortableAutoItWinGetTitle()/AutoItWinSetTitle()CodingFileInstallrGeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIGetBkColor()LockFile()PasteBinSciTE JumpSignature CreatorWM_COPYDATAMore Examples...Updated: 11/04/2013


#8 guinness

guinness

    guinness

  • MVPs
  • 10,252 posts

Posted 09 October 2012 - 03:37 PM

OK AZJIO,

I have added the function _GUICtrlMenu_RecentTotal and updated the example with this new addition. I also fixed a pretty huge bug that would cause the UDF to crash, due to me not paying attention! Please see the original post for more details.


If this isn't what you are looking for could you explain more concisely please. Thanks.

Example List: _AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_DesktopDimensions()_DisplayPassword()_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()_GUISetIcon()_Icon_Clear()/_Icon_Set()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_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()_StringIsValid()_StringReplaceWholeWord()_StringStripChar()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()AutoIt SearchAutoIt3 PortableAutoItWinGetTitle()/AutoItWinSetTitle()CodingFileInstallrGeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIGetBkColor()LockFile()PasteBinSciTE JumpSignature CreatorWM_COPYDATAMore Examples...Updated: 11/04/2013


#9 AZJIO

AZJIO

    Universalist

  • Active Members
  • PipPipPipPipPipPip
  • 996 posts

Posted 09 October 2012 - 05:33 PM

$iMenuEntry = 0 - does not work properly.
For example, it was the last 15 files. Set 4 recent file, 11 list entries should be removed.
Items have to be shifted down
_GUICtrlMenu_RecentIsInMenu do inside _GUICtrlMenu_RecentAdd

Edited by AZJIO, 09 October 2012 - 05:56 PM.


#10 guinness

guinness

    guinness

  • MVPs
  • 10,252 posts

Posted 09 October 2012 - 11:34 PM

$iMenuEntry = 0 - does not work properly.
For example, it was the last 15 files. Set 4 recent file, 11 list entries should be removed.
Items have to be shifted down

OK, this has now been fixed. I had to completely re-think my approach to this UDF.

Note: I have removed the $iMenuEntry as I found it pointless to be included.

_GUICtrlMenu_RecentIsInMenu do inside _GUICtrlMenu_RecentAdd

I won't do this for the simple fact that not everyone will use this for files, they could use it for data or something similar and I want to give a lot of control to the end user.

Edited by guinness, 09 October 2012 - 11:40 PM.

Example List: _AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_DesktopDimensions()_DisplayPassword()_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()_GUISetIcon()_Icon_Clear()/_Icon_Set()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_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()_StringIsValid()_StringReplaceWholeWord()_StringStripChar()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()AutoIt SearchAutoIt3 PortableAutoItWinGetTitle()/AutoItWinSetTitle()CodingFileInstallrGeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIGetBkColor()LockFile()PasteBinSciTE JumpSignature CreatorWM_COPYDATAMore Examples...Updated: 11/04/2013


#11 xrxca

xrxca

    Seeker

  • Active Members
  • 9 posts

Posted 21 October 2012 - 01:17 AM


_GUICtrlMenu_RecentIsInMenu do inside _GUICtrlMenu_RecentAdd

I won't do this for the simple fact that not everyone will use this for files, they could use it for data or something similar and I want to give a lot of control to the end user.

I can sort of see your point, but I fail to come up with a situation where you'd want two identical menu entries for a "recent" list.

The other thing that is extremely important IMO is that an item opened either from the recent menu or via another method should be moved to the top of the recent items list, so just not adding if it's already there isn't enough, the item needs to be either added to the top with the bottom item popped off, or moved to the top if it already exists...

I was starting work on code to store and manage a recent files list in the registry when I figured I'd check to see if I was reinventing the wheel, I guess I'll continue as I think I prefer the recent items right in the File menu (like SciTE does it) rather than a sub menu.
By far, the worst four letter word (swear word) out there has to be USER

#12 AZJIO

AZJIO

    Universalist

  • Active Members
  • PipPipPipPipPipPip
  • 996 posts

Posted 21 October 2012 - 02:55 AM

xrxca

I also wanted to do it, but ran into some problems. Could not decide which of the two options is better.
1. Have an array of IDs
2. each time to create new IDs.
I have an array of IDs, which simply rearrange items.

#13 guinness

guinness

    guinness

  • MVPs
  • 10,252 posts

Posted 21 October 2012 - 10:47 AM

xrxca,

Neither can I, but I really don't want to limit the UDF for the user who might as they may use it as a timeline.

I will also have a look at your request in adding it to the top of the list instead.

Example List: _AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_DesktopDimensions()_DisplayPassword()_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()_GUISetIcon()_Icon_Clear()/_Icon_Set()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_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()_StringIsValid()_StringReplaceWholeWord()_StringStripChar()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()AutoIt SearchAutoIt3 PortableAutoItWinGetTitle()/AutoItWinSetTitle()CodingFileInstallrGeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIGetBkColor()LockFile()PasteBinSciTE JumpSignature CreatorWM_COPYDATAMore Examples...Updated: 11/04/2013


#14 guinness

guinness

    guinness

  • MVPs
  • 10,252 posts

Posted 21 October 2012 - 03:50 PM

Updated the UDF by moving the recently added option to the top instead of the bottom. I took your advice xrxca with regards to moving a previously added item to the top if re-selected.

Oh and it wasn't that difficult. In GUICtrlCreateMenuItem set the menu entry to 0.

Edited by guinness, 21 October 2012 - 03:51 PM.

Example List: _AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_DesktopDimensions()_DisplayPassword()_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()_GUISetIcon()_Icon_Clear()/_Icon_Set()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_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()_StringIsValid()_StringReplaceWholeWord()_StringStripChar()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()AutoIt SearchAutoIt3 PortableAutoItWinGetTitle()/AutoItWinSetTitle()CodingFileInstallrGeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIGetBkColor()LockFile()PasteBinSciTE JumpSignature CreatorWM_COPYDATAMore Examples...Updated: 11/04/2013


#15 TheSaint

TheSaint

    *** Knight Templar ***

  • MVPs
  • 3,979 posts

Posted 21 October 2012 - 04:15 PM

Thanks for sharing!
Make sure brain is in gear before opening mouth!Ignoring those who try to divert conversation with irrelevancies.If I put effort into communication, I expect you to read properly & fully, or just not comment.If I'm intent on insulting you or being rude, I will be obvious, not ambiguous about it.I'm only big and bad, to those who have an over-active imagination.I may have the Artistic Liesense to disagree with you.TheSaint's Toolbox

#16 guinness

guinness

    guinness

  • MVPs
  • 10,252 posts

Posted 21 October 2012 - 04:29 PM

Thanks TheSaint.

AZJIO & xrxca,

If you could report whether the additions are what you and/or work then that would be much appreciated.

Example List: _AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_DesktopDimensions()_DisplayPassword()_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()_GUISetIcon()_Icon_Clear()/_Icon_Set()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_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()_StringIsValid()_StringReplaceWholeWord()_StringStripChar()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()AutoIt SearchAutoIt3 PortableAutoItWinGetTitle()/AutoItWinSetTitle()CodingFileInstallrGeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIGetBkColor()LockFile()PasteBinSciTE JumpSignature CreatorWM_COPYDATAMore Examples...Updated: 11/04/2013


#17 JScript

JScript

    Goodbye everybody, I got tired of this system adopted here!

  • Active Members
  • PipPipPipPipPipPip
  • 1,062 posts

Posted 21 October 2012 - 09:03 PM

__GUICtrlMenu_RecentDelete() only internal? Why not add a function as user _GUICtrlMenu_RecentDelete() ?

JS
http://notebook.forumais.com (Forum Maintenance Notebooks and Desktop)http://autoitbrasil.com/ (AutoIt v3 Brazil!!!)
Spoiler

Posted Image Download Dropbox - Simplify your life!Your virtual HD wherever you go, anywhere!       


#18 guinness

guinness

    guinness

  • MVPs
  • 10,252 posts

Posted 21 October 2012 - 09:24 PM

I suppose I could make it a user function.

Example List: _AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_DesktopDimensions()_DisplayPassword()_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()_GUISetIcon()_Icon_Clear()/_Icon_Set()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_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()_StringIsValid()_StringReplaceWholeWord()_StringStripChar()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()AutoIt SearchAutoIt3 PortableAutoItWinGetTitle()/AutoItWinSetTitle()CodingFileInstallrGeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIGetBkColor()LockFile()PasteBinSciTE JumpSignature CreatorWM_COPYDATAMore Examples...Updated: 11/04/2013


#19 guinness

guinness

    guinness

  • MVPs
  • 10,252 posts

Posted 22 October 2012 - 10:18 AM

I've updated the UDF by adding _GUICtrlMenu_RecentDelete to the list of user functions. See the original post for more details.

Example List: _AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_DesktopDimensions()_DisplayPassword()_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()_GUISetIcon()_Icon_Clear()/_Icon_Set()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_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()_StringIsValid()_StringReplaceWholeWord()_StringStripChar()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()AutoIt SearchAutoIt3 PortableAutoItWinGetTitle()/AutoItWinSetTitle()CodingFileInstallrGeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIGetBkColor()LockFile()PasteBinSciTE JumpSignature CreatorWM_COPYDATAMore Examples...Updated: 11/04/2013


#20 guinness

guinness

    guinness

  • MVPs
  • 10,252 posts

Posted 23 October 2012 - 07:40 PM

I fixed a bug _GUICtrlMenu_RecentTotal when the size was less than the current total. I also updated the example too.

Example List: _AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_DesktopDimensions()_DisplayPassword()_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()_GUISetIcon()_Icon_Clear()/_Icon_Set()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_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()_StringIsValid()_StringReplaceWholeWord()_StringStripChar()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()AutoIt SearchAutoIt3 PortableAutoItWinGetTitle()/AutoItWinSetTitle()CodingFileInstallrGeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIGetBkColor()LockFile()PasteBinSciTE JumpSignature CreatorWM_COPYDATAMore Examples...Updated: 11/04/2013





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users