Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

Tidy Access Menu to Windows' Recent Used File/Folder++(NEW)


  • Please log in to reply
27 replies to this topic
Mon
  • Members
  • 12 posts
  • Last active: Sep 07 2005 11:25 AM
  • Joined: 21 Aug 2005
Tidy Access Menu to Windows' Recent Used File/Folders ++ NEW
============================================================

:!: UPDATE & ERROR REPORT
Sep.6.05
Finally managed to get what I really wanted :) Tidy Access Menu to Windows' Recent Used File/Folders ++
All version is now unified to one, and this one uses only 1 hotkey(improvement!) by placing tray menu access under command submenu(default "Option"). It is now much easier to configure/add script.
This time I had time to check it relatively carefully. I hope you'll like it.

This should be final update(Finally!) I am plannning to show icon in the menu but this needs Autohotkey version up so it'll be a change in the future.Old update log Sep / Old update log Aug[/list]============================================================

:?: What is Tidy Access Menu?
Gives you quick access to your recent used file/folder item in Windows by classifing items in paricular file types(ext) and arranging them into submenus like below. (Classification is configurable in anyway) This makes an item a lot easier to find when Windows' default shows all item in single menu making an item hard to find as the item number multiplies. Feature in TAM also allows you to select Filename view in the menu from 3 type. 1)File name only 2)File fullpath 3) File name + shortend path. Plus, it'll let you clip file name or file path of item!Posted Image :arrow: Other Features
- All submenus are configurable.
- You can add/reduce classification submenu as you need. (Easily done in TAMsetting(GUI window))
- Particular files can be excluded from showing.(Easily configured in TAMsetting)
- Access to script's tray menu NEW
- SETTING CHANGE UNDER USE WILL BE SAVED AUTOMATICALLY.
- Automatically removes dead link item in Recents NEW
- Faster in action and much easier to configure script compared to previous TAM NEW
- GUI setting window :) (independent script/exe. It'll only be used when it is lauched.This, to save some memory being used)

Posted ImagePosted Image :arrow: 7 Command in TAM++

1) ClipModeN ... Enables file name clip. Menu will be lightpink(default) under ClipModeN(checked) to notify.

Checked ... on file select in the menu, sends file/folder name to clipboard
NoCheck ... open link(usual behavior of Recent)2) ClipModeP ... Enables full path clip. Menu will be lightblue(default) under ClipModeP(checked) to notify.

Checked ... on file select in the menu, sends FULLPATH to clipboard
NoCheck ... open link(usual behavior of Recent)3) ClipSequecne .... Enables sequence clipping added on Sep.4.05

Checked ... Enables sequence clipping under ClipMode until ClipSequece or ClipMode is checked off.
NoCheck ... ClipMode is temporary(Enables 1Clip per check on ClipModeN or P)4) EmptyRecents
Clears Recent File (Confirms before actual deletion)

5) Tray/Setting added on Sep..05
Shows tray menu. TAMsetting is placed here under the tray menu.

6) ShowPath
Checkitem. Sets how items look in the menu.

Checked ... Show path along with item according to 7)
NoCheck ... Show item name only. Ex. file.txt7) AdvMode(??)(??=path length limit configurable in setting)
Checkitem. Sets how items look in the menu. Ignored when 6) is checked off.

Checked ... Show item in form, filename + shortend path Ex. file.txt { C:\WINS ... \file.txt }
NoCheck ... Show full path of item. Ex. C:\WINS\TEST\file.txt[/list]============================================================

Download Updated Sep.7.05 at 12:03 pm(GMT:0)
https://ahknet.autoh...ccessMenu .zip

Download EA/FavoriteFolder script compatible ver Updated Sep.7.05 at 12:03 pm(GMT:0)
This version will add TAM a EA/FavoriteFolder script's folder handling feature on handle of recent folder in TAM menu!
(NEED Easy Access to Favorite Folder by savage or Favorite Folder modified by ChrisM)
https://ahknet.autoh... ... u_EAFF.zip

============================================================
:D Credits :D

Rajat for suggesting way to improve script(path along with item).
webber,Mayhem for reproting deadly error.
papexus for suggesting way to fix link run error.
aarondellis for reproting download link error.
Chris for all support especially mentenancing post.
AutoHotkey for all the fun & script making experience I had.

Thank you very very much.

============================================================

:!: Something Extra Updated Sep.06.05
If you like simple and light script, here is the base script on TAM's basic feature.
It simply shows a selected type file or folder from Recents in menu(without any submenu).
Gives you quicker access within minimal retrieval.
Add as many hotkey as you like which launch item menu of your choice.
update Now it deletes dead link item.(Prevents not found error)
;======================================================
;"Read and create a item menu from recently used file" routine
;======================================================
CM_Recent:
    FileExist = 0
    if WhatType=
        Type=Folder
    else
        Type=File


    Loop, %recentD%\*.*
    {
        SplitPath,A_LoopFileName,isitdeskini,,,fname
        if isitdeskini = desktop.ini
            continue
	FileGetShortcut,%A_LoopFileFullPath%,r_path
	IfNotExist, %r_path%
	{
		filedelete,%RecentFileD%\%A_LoopFileName%.lnk
		continue
	}	
    
        if(Type="Folder")
        {
            SplitPath,fname,,,isitfold
            if isitfold =
            {
                FileExist = 1
                Menu,%Type%,add,%fname%,LinkRun
            }
        }
        else
        {
            if fname contains %WhatType%
            {
            FileExist = 1
            Menu,%Type%,add,%fname%,LinkRun
            }
        }
    }

    if FileExist = 1
            Menu,%Type%,show
    else
    {
        Menu,%Type%,add,No %Type% is currently found,LinkRun
        Menu,%Type%,disable,NO %Type% is currently found

        Menu,%Type%,show
     }
    Menu,%Type%,DeleteAll

    WhatType=

return

;=========================================
;"Exectute item on select in menu" routine label
;=========================================
LinkRun:
	FileGetShortcut,%recentD%\%A_ThisMenuItem%.lnk,r_path,,r_wkpath
	run %r_path%,%r_wkpath%,UseErrorLevel
	if ErrorLevel
	{
		msgbox,4,Error on launching,File extension type does not have any program assigned. `nRemove shortcut from recents?
		IfMsgBox, Yes
			filedelete,%recentD%\%A_ThisMenuItem%.lnk
	}
return

USE of the script: Hotkey Form to launch a menu for selected file type

Hotkey::
    recentD = C:\Documents and Settings\%A_UserName%\Recent
    WhatType= write file type(an extension) with "." included. (ex. .txt,.log)
    Goto,CM_Recent
return

USE of the script: Hotkey Form to launch a menu for folder
Hotkey::
    recentD = C:\Documents and Settings\%A_UserName%\Recent
    Goto,CM_Recent
return

============================================================

I made this to make some use of Windows' Recents which I never had a good use.
I hope it's handy for you too :)

papexus
  • Members
  • 10 posts
  • Last active: Sep 09 2005 02:57 AM
  • Joined: 20 Aug 2005
Hello,

I cannot get any of the versions to work (win xp)
TAM does show the menu of recent files/folders, but when I select an item it always generates the following error:
- if i select a folder, then the error is:"failed attempt to launch program or document"
"action specifically:"no application is associated to the specified file for this operation"

- if I select a file, I get the error: "the specified file cannot be found"

error occurs at line 414: Run, %RecentfileD%\%Fixed%

Maybe I am doing something wrong ?

Thanks,
papex

webber
  • Members
  • 129 posts
  • Last active: Aug 13 2011 06:45 PM
  • Joined: 25 Aug 2005
:!: :!: :!: :!: :!:

opening the exe file goes into an infinite loop which I was unable to stop . Had to hard boot machine to get it to quit
________
Mercedes-benz vito

Mayhem
  • Members
  • 104 posts
  • Last active: Oct 18 2005 08:52 PM
  • Joined: 20 Aug 2004
I just had the same problem.

My desktop went wild and the only way to get out of it was to hit the reset button.

Make sure you save your work if your going to try this app out!

Mon
  • Members
  • 12 posts
  • Last active: Sep 07 2005 11:25 AM
  • Joined: 21 Aug 2005
Hi, papexus
Thank you for the post and sorry for the inconvenience.
I just went through some possibilities on the error.
Could you check the following?

Possibility 1
The version of TAM is old.

-if I select a file, I get the error: "the specified file cannot be found"

error occurs at line 414: Run, %RecentfileD%\%Fixed%


in the latest version, line above should look like this.

run %RecentFileD%\%Fixed%.lnk

To check if the script is old, please open the script in editor and go to the end of script. Around the end, you should find the following lines. If not or script seems different, than the script is old one that need a fix( I made some fixes in TAM since my first post as a zip file) so I 'd like to ask you to download the latest version...only if you are downloading the latest version of TAM2 with GUI, it has fatal error reported by webber and Meyhem and download is temporary removed
not to give you same trouble. So please wait for the update to download the latest version of TAM2 with GUI. I'll try my best to get fix quick.

LinkRun:
	if A_ThisMenuItem contains %parRF_H%
		StringSplit,Fixed,A_ThisMenuItem,%parRF_H%
	else
		Splitpath,A_ThisMenuItem,Fixed1
	Fixed=%Fixed1%
	Fixed=%Fixed%
	run %RecentFileD%\%Fixed%.lnk
return

Possibility 2
The version of AutoHotkey is not compatible. TAM was build in 1.0.37.02. so if you have the version older, it could give error.


Please post how it turned out. If problem remain, I'll try my best to work it out. Thank you.

Mon
  • Members
  • 12 posts
  • Last active: Sep 07 2005 11:25 AM
  • Joined: 21 Aug 2005
webber and Mayhem

Thank you for the post
and I am so sorry for the trouble you went though!!

Loops...I should've checked it more...

Right now I am working to get the error and finally got it...
absolute mess!!!

I'll try to get the error fixed in haste

=========================
Bug is fixed now. Please check the private message if you haven't recieved it yet.

Mon
  • Members
  • 12 posts
  • Last active: Sep 07 2005 11:25 AM
  • Joined: 21 Aug 2005
Papexus,

I think I found the real problem.
Was it not a file that had other lanugage code beside ASCII in their name that you were getting error on?
To tell you the truth I had same problem but rarely so I've been ignoring the problem( I had feeling tha I had to work out of AutoHotkey with language code problem ... )and that worked so well that I forgot the whole thing untill your post.

I don't know if you can bear the delay in TAMLanugageSupport version but if you are encountering error so much please give it a try on TAMLS.


Mon

papexus
  • Members
  • 10 posts
  • Last active: Sep 09 2005 02:57 AM
  • Joined: 20 Aug 2005
I think the problem is rather that in your code you try to use RUN command with a .lnk file , which generates the error because windows does not seem to know what application to launch.
I suppose that using FileGetShortcut to resolve the link before using the Run command should work.
I am however very new to Autohotkey so I might be wrong.

Regards,

papex

  • Guests
  • Last active:
  • Joined: --
Hi, thank you for the post!

I suppose that using FileGetShortcut to resolve the link before using the Run command should work.

I've just tried it and it does avoid error on broken file/folder name! :)
It still leaves broken file/folder name as it is so file/folder will not launch on item select but it is far better than getting error message prompt.
Thank you for the advice!

TAM was my first script that had more than 3 line and I'm still amatuar to AutoHotkey so I'll be happy for any point out in my script.

Thanks,

Mon :)

aarondellis
  • Members
  • 57 posts
  • Last active: Feb 11 2013 02:18 PM
  • Joined: 15 Aug 2005
I keep getting "File Not Found" from AutoHotkey.net!

Is there an alternate way to download this?

Mon
  • Members
  • 12 posts
  • Last active: Sep 07 2005 11:25 AM
  • Joined: 21 Aug 2005
aarondellis,

Really sorry for the inconvinience and thank you for the post. Yesterday I accidently deleted directory with the file and did uploaded again but in a different directory and didn't notice it until your post...! :shock:
I've just fixed the problem but I'm planning to add a new feature on TAM by Monday so you might want to wait for that update.

Sorry & Thank you again :)

Mon

Mon
  • Members
  • 12 posts
  • Last active: Sep 07 2005 11:25 AM
  • Joined: 21 Aug 2005
If you downloaded the newest update file in Sep.06 before Sep 06, 2005 7:17 pm, please fix the script as follows

find
if A_ThisMenuItem = Reload
change to
if A_ThisMenuItem = &Reload

find
Run,RFCRun
change to
run,TAMsetting.exe

I updated TAM on 6th September 2005 at 7:26 pm. This one is much more easier to add to your script so you might want to download that if you have the script uploaded before this.

Thanks,
Mon

Mon
  • Members
  • 12 posts
  • Last active: Sep 07 2005 11:25 AM
  • Joined: 21 Aug 2005
Sorry but file uploaded before 7th September 2005 at 11:18 am(GMT=0) had instrucion miss on Readme.txt
If you followed it, it will stop some of your hotkey from working.

This is the fixed instrucion. for TidyAccessMenus++

=====================================================
To Use This Script
=====================================================
If your script have type of script lines that is needed to be excuted on the first run, (such as "setting" type of section lines without start of hotkey:: in topmost part of the script), Find in your script first line of "return" and add next line just before that.

#Include TidyAccessMenu++.ahk

Else, you can add above line at top most part of your script before any other hotkey script.
(If you have #Include message other than TAM, you ALWAYS NEED to add above line BELOW that.)

Than, Add(to end of script)

Pause::Goto,RFMain

(Configure your hotkey. Default is Pause)

Run your script.

This is the fixed instrucion. for TidyAccessMenus++_EAFF

=====================================================
To Use This Script Favorite Folder compatible
=====================================================
Find in your EAFF or ChrisM's FF script,

SetTimer, f_UpdatedFavoritesFile, 1000

than add next line just next to that

#Include TidyAccessMenu++_EAFF.ahk

Than,Add(to end of script)

Pause::Goto,RFMain

(Configure your hotkey. Default is Pause)

Than open Alteration_in_Easy_Access_to_Favorite_Folder.html
in TAM++_EAFF folder, follow instruction written there and modify EAFF/FF script.

Run your script.



If you downloaded file before 6th September 2005 at 11:37 pm

and getting menu popup on the first run,
please find in the tam script
Gosub,RFSetup
change it to
Gosub,RFSetup
return

this will stop the pop up.

Really sorry for continuing miss I do.

  • Guests
  • Last active:
  • Joined: --
Hi,I use this base script to display the contents of the recent document folder, it's very handy,but additionally I want to display menu icons and sort all menu items by date.Can you tell me how to do it?

Mon+
  • Members
  • 12 posts
  • Last active: Feb 12 2010 03:04 PM
  • Joined: 03 Feb 2010
Hi, this is the update.

Note: This code must be used on AutoHotkeyU(UNICODE version of AutoHotkey)
since I couldn't get the icons from DllCall shell32.dll\SHGetFileInfo.
(It seems Vista's normal account can't use shell32.dll in DllCall. Maybe not but I've tried everything I found this couple days, nothing worked)

I'm not sure if icons will load in other Windows other than Vista too so
if you're not using Vista I'd appreciate it if you can report what happened.

-Added Delete Item/ Copy Path function

Btw, I am Mon, the original author of this script.
I made new account as Mon+ because I've lost the password to Mon account & I now use different e-mail I couldn't re-assign my password,

Below code has been updated to Newest Ver.
; Select menu item with Ctrl = Delete item from Recent & Menu 
; Select menu item with Shift = Copy full path of selected item 
; Select menu item with Ctrl + Shift = Copy name of selected item 
; After running the script, Ctrl + P ( Change your hotkey in setting if you need to)
;======================================================
; Your Setting
;======================================================
TR_WhatType= .ahk,.txt ; File type which will show in the menu
TR_Hotkey= ^P ; ^ Ctrl	+ Shift	! Alt	# Win  (ex. Ctrl + Shift + A = ^+A )
TR_Check = 1 ; 1 will prompt on item delete. If you don't need prompt, 0
TR_Design := " ... " ; Basically ignore this one unless you need to change

;======================================================
; Main
;======================================================
if A_OSVersion in WIN_NT4,WIN_95,WIN_98,WIN_ME
{
;	 MsgBox This script requires Windows 2000/XP or later.
	TR_RecentD := A_WinDir . "\Recent"
	 ExitApp
} 
else if A_OSVersion in WIN_XP
{
	TR_RecentD := RegExReplace(A_AppData, "Application Data$","")
	TR_RecentD := TR_RecentD . "Recent"
}
else
	TR_RecentD := A_AppData . "\Microsoft\Windows\Recent"

;MsgBox,%TR_RecentD%

Loop, parse, TR_WhatType,`,
{
	RegRead, TR_OutputVar, HKEY_CLASSES_ROOT, %A_LoopField%
	RegRead, TR_OutputVar, HKEY_CLASSES_ROOT, %TR_OutputVar%\DefaultIcon 
	if TR_OutputVar = 
	{
		TR_Icon%A_Index% = 	shell32.dll
		TR_Icon_no%A_Index% = 	1
	}
	else
	{
		StringSplit, TR_OutputVar, TR_OutputVar,`,
		TR_Icon%A_Index% := TR_OutputVar1
		TR_Icon_no%A_Index% := TR_OutputVar2
	}
}
TR_FileExist = 0
TR_FirstBuild = 0
Hotkey, %TR_Hotkey%,TR_SHOW
Gosub TR_CreateMenu


;======================================================
; Show if menu is not under build
;======================================================

TR_SHOW:
		if TR_UnderBuild = 1
		{
			MsgBox,4096,TidyRecentAccessMenu,Creating Menu... Please Wait.
			return
		}
		if TR_FirstBuild = 0
		{
			TR_FirstBuild = 1
			return
		}

		Menu,TR_File,show
		return

;=========================================
; Exectute / CopyPath / Delete item on select  
;=========================================
TR_LinkRun:
		TR_KeyState = 0
		if GetKeyState("Shift")
			TR_KeyState = 1
		if GetKeyState("Ctrl")
			TR_KeyState += 2

		TR_Temp := RegExReplace(A_ThisMenuItem, TR_Design . ".*?$","")

		if TR_KeyState = 1
		{
			FileGetShortcut,%TR_RecentD%\%TR_Temp%.lnk,TR_Path
			clipboard := TR_Path
		}
		else if TR_KeyState = 2
		{
			if TR_Check = 1
			{
				msgbox,4100,TidyRecentAccessMenu,Do you wish to remove "%TR_Temp%" from recent?
				IfMsgBox, Yes
				{
					filedelete,%TR_RecentD%\%TR_Temp%.lnk
					Menu,%A_ThisMenu%,Delete,%A_ThisMenuItem%
				}
			}
			else
			{
				filedelete,%TR_RecentD%\%TR_Temp%.lnk
				Menu,%A_ThisMenu%,Delete,%A_ThisMenuItem%
			}
		}
		else if TR_KeyState = 3
			clipboard := TR_Temp
		else
		{
			FileGetShortcut,%TR_RecentD%\%TR_Temp%.lnk,TR_Path,,TR_WF_Path
			run %TR_Path%,%TR_WF_Path%,UseErrorLevel
			if ErrorLevel
				msgbox,4096,TidyRecentAccessMenu,Error on launching,This file extension type does not have any program assigned. `nPlease assign default program to run this extension.
		}
return 

;=========================================
; Create menu
;=========================================
TR_CreateMenu:
		TR_UnderBuild = 1
		TR_CNT = 0
		TR_ListFile =
		Loop, %TR_RecentD%\*.*,1
		{
			if A_LoopFileName = desktop.ini
				continue
			TR_ListFile = %TR_ListFile%%A_LoopFileTimeModified%`t%A_LoopFileName%`n
			Sort, TR_ListFile, R  ; Sort by date.
		}
		Loop, parse, TR_ListFile, `n
		{
			if A_LoopField =  ; Omit the last linefeed (blank item) at the end of the list.
				continue
			StringSplit, TR_ItemPath, A_LoopField, %A_Tab%
			FileGetShortcut,%TR_RecentD%\%TR_ItemPath2%,TR_Path
			IfNotExist, %TR_Path% ; Delete link if actual file is re/moved 
			{
				filedelete,%TR_RecentD%\%TR_ItemPath2%
				continue
			}
			StringTrimRight,TR_Name,TR_ItemPath2,4
			SplitPath,TR_Path,,TR_Path,TR_Whatisit
				if TR_Whatisit =
				{
					 TR_FolderExist = 1
					 Menu,TR_Folder,add,%TR_Name%%TR_Design%%TR_Path%,TR_LinkRun
					 Menu,TR_Folder,Icon,%TR_Name%%TR_Design%%TR_Path%,shell32.dll,4
				}
				else if TR_ItemPath2 contains %TR_WhatType%
				{
					TR_FileExist = 1
					Menu,TR_File,add,%TR_Name%%TR_Design%%TR_Path%,TR_LinkRun
					Loop, parse, TR_WhatType,`,
					{
						TR_Whatisit := "." . TR_Whatisit
						if TR_Whatisit contains %A_LoopField%
						{
							TR_OutputVar1 := TR_Icon%A_Index%
							TR_OutputVar2 := TR_Icon_no%A_Index%
							Menu,TR_File,Icon,%TR_Name%%TR_Design%%TR_Path%,%TR_OutputVar1%,%TR_OutputVar2%
						}
					}
				}
		}

		if TR_FileExist = 1
			Menu,TR_File,add,
		Menu,TR_File,add,Refresh,TR_ReCreateMenu
		Menu,TR_File,Icon,Refresh,shell32.dll,81

		 if TR_FolderExist = 1
		 {
		 	Menu,TR_File,add,
		 	Menu,TR_File,add,Folder,:TR_Folder
				Menu,TR_File,Icon,Folder,shell32.dll,4
		}

		Sleep 500
		TR_UnderBuild = 0
return



;=========================================
; ReCreate menu
;=========================================
TR_ReCreateMenu:
		Menu,TR_File,Delete
		if TR_FolderExist = 1
			Menu,TR_Folder,Delete
		Gosub TR_CreateMenu
		Gosub TR_Show
return