AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

recent

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
Babis



Joined: 08 Dec 2005
Posts: 45

PostPosted: Thu Nov 22, 2007 1:24 pm    Post subject: recent Reply with quote

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
View user's profile Send private message
Babis



Joined: 08 Dec 2005
Posts: 45

PostPosted: Tue Nov 27, 2007 7:48 am    Post subject: Re: recent Reply with quote

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
View user's profile Send private message
BoBoĻ
Guest





PostPosted: Tue Nov 27, 2007 8:32 am    Post subject: Reply with quote

Code:
!y::Send, ^{Esc}D ; press Alt+y
Question
Back to top
Babis



Joined: 08 Dec 2005
Posts: 45

PostPosted: Tue Nov 27, 2007 1:19 pm    Post subject: Reply with quote

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
View user's profile Send private message
jaco0646



Joined: 07 Oct 2006
Posts: 556
Location: MN, USA

PostPosted: Wed Nov 28, 2007 3:41 am    Post subject: script Reply with quote

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
View user's profile Send private message Visit poster's website
Babis



Joined: 08 Dec 2005
Posts: 45

PostPosted: Wed Nov 28, 2007 7:36 am    Post subject: Reply with quote

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
View user's profile Send private message
jaco0646



Joined: 07 Oct 2006
Posts: 556
Location: MN, USA

PostPosted: Thu Nov 29, 2007 2:02 am    Post subject: update Reply with quote

I updated the script to address both of your questions.

Regards.
_________________
http://autohotkey.net/~jaco0646/
Back to top
View user's profile Send private message Visit poster's website
Lexikos



Joined: 17 Oct 2006
Posts: 2558
Location: Australia, Qld

PostPosted: Thu Nov 29, 2007 5:13 am    Post subject: Reply with quote

Why not simply:
Code:
EnvGet, UserProfile, USERPROFILE
Run, %UserProfile%\Recent
Question

jaco0646's script doesn't seem to work at all for me, perhaps because I'm on Vista.
Back to top
View user's profile Send private message
Babis



Joined: 08 Dec 2005
Posts: 45

PostPosted: Thu Nov 29, 2007 7:53 am    Post subject: Re: update Reply with quote

jaco0646 wrote:
I updated the script to address both of your questions.

Regards.


Thanks very much again.
Back to top
View user's profile Send private message
Babis



Joined: 08 Dec 2005
Posts: 45

PostPosted: Thu Nov 29, 2007 7:54 am    Post subject: Reply with quote

lexikos wrote:
Why not simply:
Code:
EnvGet, UserProfile, USERPROFILE
Run, %UserProfile%\Recent
Question

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
View user's profile Send private message
Lexikos



Joined: 17 Oct 2006
Posts: 2558
Location: Australia, Qld

PostPosted: Thu Nov 29, 2007 11:38 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group