AutoHotkey Community

It is currently May 27th, 2012, 2:13 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 28 posts ]  Go to page Previous  1, 2
Author Message
 Post subject: Re: Time order & Icon
PostPosted: February 3rd, 2010, 5:05 pm 
Offline

Joined: January 19th, 2010, 11:39 am
Posts: 12
Location: Philippines
Ok, I'm using WinXP SP3 and this is what I got.

Click for .jpg of error.
http://3.ly/eqUO

... Tim Gott


Mon+ wrote:
Hi, this is the update.

Note: This code must be used on AutoHotkey_U
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 here I couldn't re-assign my passowrd either)

Code:
; 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

;======================================================
; Your Setting
;======================================================
TR_WhatType= .ahk,.txt ; File type which will show in the menu
TR_Hotkey= ^P

;======================================================
; 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 if 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
      }

      if (TR_FileExist = 0)  AND (TR_FileFolder = 0)
         MsgBox,4096,TidyRecentAccessMenu,No Recent File/Folder was currently Found.
      else
         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
      
      if TR_KeyState = 1
         clipboard := A_ThisMenuItem
      else if TR_KeyState = 2
      {
         msgbox,4100,TidyRecentAccessMenu,Do you wish to remove this shortcut from recent?
         IfMsgBox, Yes
         {
            SplitPath,A_ThisMenuItem,TR_Temp
            filedelete,%TR_RecentD%\%TR_Temp%.lnk
            Menu,%A_ThisMenu%,Delete,%A_ThisMenuItem%
         }
      }
      else if TR_KeyState = 3
      {
         SplitPath,A_ThisMenuItem,TR_Temp
         clipboard := TR_Temp
      }
      else
      {
         SplitPath,A_ThisMenuItem,TR_Temp
         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 for 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_LoopFileLongPath%`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_ItemPath2%,TR_Path

         IfNotExist, %TR_Path% ; Delete link if actual file is re/moved
         {
            filedelete,%TR_RecentD%\%TR_ItemPath2%
            continue
         }

         SplitPath,TR_Path,,,TR_Whatisit          

            if TR_Whatisit =
            {
                TR_FolderExist = 1
                Menu,TR_Folder,add,%TR_Path%,TR_LinkRun
                Menu,TR_Folder,Icon,%TR_Path%,shell32.dll,4
            }
            else if TR_ItemPath2 contains %TR_WhatType%
            {
               TR_FileExist = 1
               Menu,TR_File,add,%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_Path%,%TR_OutputVar1%,%TR_OutputVar2%
               }
            }
            }
      }

       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 600
      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


Report this post
Top
 Profile  
Reply with quote  
 Post subject: Hmm
PostPosted: February 3rd, 2010, 5:15 pm 
Offline

Joined: February 3rd, 2010, 1:00 pm
Posts: 12
Thanks for the screenshot and Windows version, that really helps.

Hmm.... are you using AutoHotkeyU(UNICODE version of AutoHotkey) ??
This code must be ran by AutoHotkey_U since
Icon display for Menu other than Tray Menu is original function of AutoHotkeyU I think.


Last edited by Mon+ on February 3rd, 2010, 5:29 pm, edited 1 time in total.

Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 3rd, 2010, 5:27 pm 
Offline

Joined: January 19th, 2010, 11:39 am
Posts: 12
Location: Philippines
Hmmm. I just looked up the UniCode version. ... Do I have to uninstall the AutoHotKey that I have? Or do I install the "U" version and it will run everything I have?


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 3rd, 2010, 5:36 pm 
Offline

Joined: February 3rd, 2010, 1:00 pm
Posts: 12
Actually I'm not sure if all the script you already have will work on AutoHotkeyU but AutoHotkeyU is enhanced version of AutoHotkey so it should work for most of them.

To install AutoHotkeyU, you can simply replace AutoHotkey.exe by AutoHotkeyU.exe I think.
Before you do, rename your original AutoHotkey.exe as something like AutoHotkey_O.exe
so you can get the original version back if you have problem using UnicodeVer. :)

There was also this note in Unicode version of AutoHotkey page so you might want try this if you have problem.
Code:
Read the 'Script compatibility' section if your scripts don't work.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 3rd, 2010, 7:24 pm 
Offline

Joined: January 19th, 2010, 11:39 am
Posts: 12
Location: Philippines
Ok I've been running the Unicode version for the last half an hour and so far no problems with my other scripts. However "Tidy Access Menu" still isn't working for me.

No errors this time so maybe it's a problem on my part. Am I right (in reading your code) that the "HotKey" to bring up the menu is <CTRL+P>? and of course I have to create a menu first by (for instance) holding down the SHIFT key and selecting a start menu item?


Report this post
Top
 Profile  
Reply with quote  
 Post subject: Fixed it (?)
PostPosted: February 4th, 2010, 7:53 am 
Offline

Joined: February 3rd, 2010, 1:00 pm
Posts: 12
It's good U version is working for you :)

Yeah default hotkey's Ctrl+P and no I think its my script.
I found a miss on getting XP recent path.
Could you try this code instead?

It'll build the menu when you first run it.
Use Refresh when the menu is outdated.


NOTE: This code is updated now to the newest one I posted below this.
Code:
; 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


Last edited by Mon+ on February 4th, 2010, 11:49 am, edited 4 times in total.

Report this post
Top
 Profile  
Reply with quote  
 Post subject: Little Change + Fix
PostPosted: February 4th, 2010, 9:12 am 
Offline

Joined: February 3rd, 2010, 1:00 pm
Posts: 12
[ CHAGE ]
Now menu will show in

Name ... Directory

format. This will give better access to item when selecting item by keyboard.

[ FIX ]
Problem user folders(C:\User\Docments, etc) in environment which use different language other than "en" didn't launch is fixed.
(NOTE: Windows will show user folder name in user selected language when actual path is in alphabet. It will also make shortcut by that name and not by the actual path name.)


Code:
; 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


Last edited by Mon+ on February 4th, 2010, 11:50 am, edited 1 time in total.

Report this post
Top
 Profile  
Reply with quote  
 Post subject: Sorry, I left some miss
PostPosted: February 4th, 2010, 10:23 am 
Offline

Joined: February 3rd, 2010, 1:00 pm
Posts: 12
Fixed path getting error on user folders.
(All codes posted by me Mon+ here are now updated)


Report this post
Top
 Profile  
Reply with quote  
 Post subject: Fixed
PostPosted: February 4th, 2010, 11:51 am 
Offline

Joined: February 3rd, 2010, 1:00 pm
Posts: 12
Problem item delete wasn't working for user folders shortcut is now fixed.
(All scripts posted in this topic by Mon+ is now updated to newest ver.)


Report this post
Top
 Profile  
Reply with quote  
 Post subject: I'm Interested.
PostPosted: February 8th, 2010, 7:27 am 
Offline

Joined: January 19th, 2010, 11:39 am
Posts: 12
Location: Philippines
Sorry I dropped off the planet for a couple of days. Had a weird Windows Update thing that disabled my computer. I thought it was a Trojan at first but narrowed it down to an update that had disabled my user profiles.

In any case, how far are you planning to take this script? You are probably doing this for fun (in addition to your own personal use). I have put so much time into reviewing so many many products just to meet my session recovery needs.

Feel free to glance over my person notes that I have kept for myself below. I've also included my notes and references of other products below as well. ... You'll quickly get the idea of what I've been searching for and why your script has interested me ... thanks for all of the work that you've done.

~~~~~~~~~~~~~~~~~~~~
~~ Session Recovery Notes ~~
~~~~~~~~~~~~~~~~~~~~


It has been quite an undertaking to review at least a hundred programs to meet my "what was I doing" recovery needs. When I first embarked on this endeavor I was 'just' looking for a program that would keep track of every folder that I was opening just in case I was unscrupiously logged off by someone or in case of a power failure.

However over the course of my reviewing all of these products I have explored several scenerious which have lead me to a list of features which would really make my life (behind the computer) much easier.

~~~~~~~~~~~~~~~~~~~~
~~ Essential Features List ~~
~~~~~~~~~~~~~~~~~~~~

- Keep track of every folder that I visit (including UNC named folders)
- Autosave this list in a log file.
- Setting I can adjust for the number of seconds of my "folder visit" before it is logged.
- This list should be searchable "on the fly" (dynamic list) like "FolderCache"



~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~ Preliminary Commentary ~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~

After the review of several products I have found many of them with a lot of 'cool' features. Some of the features are nice, some of the features are great, but none of them have all of the 'essential' features that I would like to have in one product. As a result I am running two or three of the products in a 'crippled' effort to get everything that I am wanting.



~~~~~~~~~~~~~~~~~~~~~~~
~~ Product Finalists ~~
~~~~~~~~~~~~~~~~~~~~~~~

** Tiny Access Menu
... http://3.ly/sKzH

This one is starting to interest me now that it has been just recently updated to work with WinXP. I like that it tracks UNC File names.

I would like to see it track more than thirty of the recent folder and files, and also give me the ability to do a dynamic search thru the list of files that comes up. For example, if I did a 'lot' of work that day and wanted to see every folder I did work in for my He Cares Foundation volunteer work, I could start typing "Care" and it would bring up every folder with that word in it which would of course include "He Cares".


** FavesSA: http://3.ly/cK1G

This seems to be the most "finished" product. of the hundred'ish that I've reviewed. I really like the way the display gives me a sort of "control panel" where I can do more than just manage the list of folders that I have been to.

... Problems -> No way to do a "search on the fly" of the folder that it is logging. Consequentely if you are a "power browser" like myself, trying to remember which of the last two hundred folders you were in over the course of one day can be a bit unwieldy.

There is a "QC launches Faves" program which claims to be an addition to FavesSA. I should try to install it and see what it does.



** ReOpen

This one was 'oh so' promising. Has two of the things that I am really looking for on this. 1) It autosaves the files in a log file and 2) I can search the items in the list.
... Problems -> Not able to keep track of UNC files.
... Possible Solution -> Map my UNC drives as a workaround.


** FolderCache: http://3.ly/qaEu
Please take anohter look at this one.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 9th, 2010, 6:14 am 
Offline

Joined: February 3rd, 2010, 1:00 pm
Posts: 12
Windows update is a trouble maker indeed. :(

I've been tring to make what will meet your need because I first thought I can handle it without much trouble but regExMatch method I thought it'll work isn't working as I planned I'm stuck...
Sorry I can't help.


btw I found this script that does most of what you need? except for "on demand search". But somehow I couldn't get it working. Maybe because I'm using Vista.

http://www.autohotkey.com/forum/topic1942.html


* This need to be modified so it'll record folders in log everytime it checks folders.


If you are planning to code it yourself, here's a note I was making for myself.
Not really much ...


Code:
Gui,Add, Edit, vSearchQ X10 W200,

^P::
Gui,show,,FolderHistory
return

#IfWinActive FolderHistory ahk_class AutoHotkeyGUI

Enter::
Gui,Submit,NoHide

; search folder function

return



In "search folder function" part,
I was thinking about reading the log by

Loop, read, file
Loop, parse, A_LoopReadLine,

and searching with

regExMatch

and if match found create menu

menu,matchedfolders,add,item,command

and show the result by

menu,matchfolders,show


Report this post
Top
 Profile  
Reply with quote  
PostPosted: February 9th, 2010, 11:57 am 
Offline

Joined: February 3rd, 2010, 1:00 pm
Posts: 12
This might work ?
Since I don't need this myself this is as far as I can work. Sorry.
Hope it helps.

(Also menu in tray menu)

FIXED

Code:
; CREDIT
; f_GetExplorerList / f_split2 function from Folder Menu 2 by rexx
; Idea of using settimer to record folder only used for some time from Recent Folders script by CarlosTheTackle

;======================================================
; Your Setting
;======================================================

fh_cycle= 3000
fh_hotkey=^P

;======================================================
; Main
;======================================================

Gui,Add, Edit, vfh_SQ X10 W200,
Menu,tray,add,
Menu,tray,add,See Log,fh_open_log
Menu,tray,add,Open Log Folder,fh_open_folder

fh_folderlist=
fh_menuexist = 0
fh_firsttime = 0
Hotkey, %fh_hotkey%,fh_SHOWHIDE

ifNotExist,%A_ScriptDir%\log
   FileCreateDir, %A_ScriptDir%\log
FileRead, fh_folderlist, %A_ScriptDir%\log\folderlist%A_MM%%A_DD%%A_YYYY%.log
fh_folderlist := RegExReplace(fh_folderlist, "\(","(")
fh_folderlist := RegExReplace(fh_folderlist, "\\","¥")
fh_folderlist := RegExReplace(fh_folderlist, "`n|`r","`n")

SetTimer, fh_evaluate, %fh_cycle%

fh_SHOWHIDE:
   if fh_firsttime = 0
      fh_firsttime = 1
   else
      Gui,show,,FolderHistory
return

fh_evaluate:
   AllExplorerPaths := f_GetExplorerList()
   AllExplorerPaths := RegExReplace(AllExplorerPaths, "\(","(")
   AllExplorerPaths := RegExReplace(AllExplorerPaths, "\\","¥")
   Temp2 =
   loop,parse,AllExplorerPaths,`n
   {
      if A_LoopField =
         continue
      fh_folderlist := RegExReplace(fh_folderlist, "(\d+)`t" . A_LoopField . "`t\d`n",  A_Now . "`t" . A_LoopField . "`t1`n",fh_cnt)
      if fh_cnt = 0
         Temp2 .= A_LoopField . "`n"
   }
   AllExplorerPaths := Temp2

   

   Temp2 =
   loop,parse,fh_folderlist,`n
   {
      if A_LoopField =
         continue
      Temp1 := RegExReplace(A_LoopField, "^.*?0$",  "")
      Temp2 .= Temp1 . "`n"
   }
   fh_folderlist := Temp2

   loop,parse,AllExplorerPaths,`n
   {
      if A_LoopField =
         continue

      fh_folderlist := fh_folderlist . A_Now . "`t" . A_LoopField . "`t0`n"
   }

   Sort, fh_folderlist, R
   Temp := RegExReplace(fh_folderlist, "(","(")
   Temp := RegExReplace(Temp, "¥","\")
   FileDelete, %A_ScriptDir%\log\folderlist%A_MM%%A_DD%%A_YYYY%.log
   FileAppend, %Temp%, %A_ScriptDir%\log\folderlist%A_MM%%A_DD%%A_YYYY%.log, UTF-8
return




; f_GetExplorerList / f_split2 function from Folder Menu 2 by rexx
; --------------------------------------------------------------
f_GetExplorerList() ; Thanks to F1reW1re
{
   WinGet, IDList, list, , , Program Manager
   Loop, %IDList%
   {
      ThisID := IDList%A_Index%
      WinGetClass, ThisClass, ahk_id %ThisID%
      if ThisClass in ExploreWClass,CabinetWClass
      {
         if A_OSVersion = WIN_VISTA
         {
            ControlGetText, ThisPath, ToolbarWindow322, ahk_id %ThisID%
            f_Split2(ThisPath, ":", ThisPath, ThisPath)
            ThisPath = %ThisPath%
         }
         else
            ControlGetText, ThisPath, ComboBoxEx321, ahk_id %ThisID%
         if ThisPath = ; if cannot get path, use title instead
            WinGetTitle, ThisPath, ahk_id %ThisID%
;         PathList = %PathList%%ThisID%=%ThisPath%`n
         PathList = %PathList%%ThisPath%`n
      }
   }
   return PathList
}


f_Split2(String, Separator, ByRef LeftStr, ByRef RightStr)
{
   SplitPos := InStr(String, Separator)
   if SplitPos = 0 ; Separator not found, L = Str, R = ""
   {
      LeftStr := String
      RightStr:= ""
   }
   else
   {
      SplitPos--
      StringLeft, LeftStr, String, %SplitPos%
      SplitPos++
      StringTrimLeft, RightStr, String, %SplitPos%
   }
   return
}
; --------------------------------------------------------------
; f_GetExplorerList / f_split2 function from Folder Menu 2 by rexx

Enter::
   IfWinActive FolderHistory ahk_class AutoHotkeyGUI
   {
      Gui,Submit,NoHide
      fh_SQ := RegExReplace(fh_SQ, "\(","(")
      fh_SQ := RegExReplace(fh_SQ, "\\","¥")
      Temp := fh_folderlist
      loop,parse,Temp,`n
      {
         fh_FSQ := RegExReplace(A_LoopField,"i)\d+`t(.*?" . fh_SQ . ".*?)`t\d+","$1",fh_cnt)
         if fh_cnt > 0
         {
               Menu,fh_menu,add,%fh_FSQ%,fh_LinkRun
               Menu,fh_menu,icon,%fh_FSQ%,shell32.dll,4
               fh_menuexist = 1
         }
      }
      if fh_menuexist = 1
      {
         Gui,show,hide
         Menu,fh_menu,show
         Menu,fh_menu,delete
      }
      fh_menuexist = 0
   }
   else
      Send {Enter}
return

fh_open_log:
run %A_ScriptDir%\log\folderlist%A_MM%%A_DD%%A_YYYY%.log
return

fh_open_folder:
run %A_ScriptDir%\log
return


fh_LinkRun:
      Temp := RegExReplace(A_ThisMenuItem, "(","(")
      Temp := RegExReplace(Temp, "¥","\")
      if GetKeyState("Shift")
         clipboard := Temp
      else if GetKeyState("Ctrl")
      {
         SplitPath,Temp,Temp
         clipboard := Temp
      }
      else
         run %Temp%
return


Last edited by Mon+ on February 9th, 2010, 1:41 pm, edited 1 time in total.

Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 9th, 2010, 1:31 pm 
Offline

Joined: February 3rd, 2010, 1:00 pm
Posts: 12
I left important part unfinished :oops:
I've replaced the old code with the new code so I hope you try the new one if you have the old one.


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 28 posts ]  Go to page Previous  1, 2

All times are UTC [ DST ]


Who is online

Users browsing this forum: Google [Bot], MSN [Bot], notsoobvious and 6 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group