 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
Babis
Joined: 08 Dec 2005 Posts: 45
|
Posted: Thu Nov 22, 2007 1:24 pm Post subject: recent |
|
|
| Hello, I am looking for a script to display all the recent files/docs used or just opened. Can you point me somewhere, thanks. |
|
| Back to top |
|
 |
Babis
Joined: 08 Dec 2005 Posts: 45
|
Posted: Tue Nov 27, 2007 7:48 am Post subject: Re: recent |
|
|
| Babis wrote: | | Hello, I am looking for a script to display all the recent files/docs used or just opened. Can you point me somewhere, thanks. |
Bump |
|
| Back to top |
|
 |
BoBoĻ Guest
|
Posted: Tue Nov 27, 2007 8:32 am Post subject: |
|
|
| Code: | | !y::Send, ^{Esc}D ; press Alt+y |  |
|
| Back to top |
|
 |
Babis
Joined: 08 Dec 2005 Posts: 45
|
Posted: Tue Nov 27, 2007 1:19 pm Post subject: |
|
|
Thanks BoBo" but I was expecting something more thorough, like to browse at: C:\documents and Settings\USER\recent but to a virtual collection of these files, from where I can see their actual locations on my PC.
Therefore I asked if any script was available, because I searched and couldn't find anything |
|
| Back to top |
|
 |
jaco0646
Joined: 07 Oct 2006 Posts: 556 Location: MN, USA
|
Posted: Wed Nov 28, 2007 3:41 am Post subject: script |
|
|
I had some time on my hands this evening, so I threw a little code together to get you started. I think this is the basic idea you were looking for.
| Code: | #SingleInstance force
#NoTrayIcon
#NoEnv
EnvGet,UserProfile,UserProfile
EnvGet,SystemRoot,SystemRoot
SetBatchLines, -1
Gui,Add,ListView,r20 w750 Grid gClick
,Name|Path|Modified|Parameters
IL:=IL_Create(20)
LV_SetImageList(IL,1)
Loop,%UserProfile%\Recent\*.lnk
{
FileGetTime,time
FormatTime,time,%time%,h:mm:ss MM/dd/yy
FileGetShortcut,%A_LoopFileLongPath%,path,,params
SplitPath,path,name,,ext
RegRead,filetype,HKCR,.%ext%
RegRead,iconpath,HKCR,%filetype%\DefaultIcon
StringSplit,icon,iconpath,`,
StringReplace,icon1,icon1,`%SystemRoot`%,%SystemRoot%
ILnum:=IL_Add(IL,icon1,icon2)
LV_Add("Icon" ILnum,name,path,time,params)
}
LV_ModifyCol()
LV_ModifyCol(4,0)
Gui,Show,,%UserProfile%\Recent
return
GuiClose:
ExitApp
Click:
If A_GuiEvent=DoubleClick
{
LV_GetText(path,A_EventInfo,2)
LV_GetText(params,A_EventInfo,4)
If params
params="%params%"
SplitPath,path,,dir
Run,%path% %params%,%dir%
} |
_________________ http://autohotkey.net/~jaco0646/
Last edited by jaco0646 on Thu Nov 29, 2007 1:58 am; edited 1 time in total |
|
| Back to top |
|
 |
Babis
Joined: 08 Dec 2005 Posts: 45
|
Posted: Wed Nov 28, 2007 7:36 am Post subject: |
|
|
Thats very nice from you, thanks a lot. How can I add a column with date/time? Also it seems to take about 3-4 seconds to launch in a dual core PC, how can I improve launch time?
Thanks again. |
|
| Back to top |
|
 |
jaco0646
Joined: 07 Oct 2006 Posts: 556 Location: MN, USA
|
Posted: Thu Nov 29, 2007 2:02 am Post subject: update |
|
|
I updated the script to address both of your questions.
Regards. _________________ http://autohotkey.net/~jaco0646/ |
|
| Back to top |
|
 |
Lexikos
Joined: 17 Oct 2006 Posts: 2558 Location: Australia, Qld
|
Posted: Thu Nov 29, 2007 5:13 am Post subject: |
|
|
Why not simply: | Code: | EnvGet, UserProfile, USERPROFILE
Run, %UserProfile%\Recent |
jaco0646's script doesn't seem to work at all for me, perhaps because I'm on Vista. |
|
| Back to top |
|
 |
Babis
Joined: 08 Dec 2005 Posts: 45
|
Posted: Thu Nov 29, 2007 7:53 am Post subject: Re: update |
|
|
| jaco0646 wrote: | I updated the script to address both of your questions.
Regards. |
Thanks very much again. |
|
| Back to top |
|
 |
Babis
Joined: 08 Dec 2005 Posts: 45
|
Posted: Thu Nov 29, 2007 7:54 am Post subject: |
|
|
| lexikos wrote: | Why not simply: | Code: | EnvGet, UserProfile, USERPROFILE
Run, %UserProfile%\Recent |
jaco0646's script doesn't seem to work at all for me, perhaps because I'm on Vista. |
There is a simpler way too:
| Code: | | c:\documents and Settings\USERNAME\recent |
|
|
| Back to top |
|
 |
Lexikos
Joined: 17 Oct 2006 Posts: 2558 Location: Australia, Qld
|
Posted: Thu Nov 29, 2007 11:38 am Post subject: |
|
|
USERPROFILE = c:\documents and Settings\USERNAME
Assuming you meant to "hard-code" USERNAME, it may be simpler, but it isn't as portable. %USERPROFILE% should always reflect the current user's folder. (I used EnvGet because new scripts have #NoEnv by default.) |
|
| Back to top |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|