AutoHotkey Community

It is currently May 26th, 2012, 2:05 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 40 posts ]  Go to page Previous  1, 2, 3
Author Message
 Post subject:
PostPosted: November 23rd, 2007, 12:58 pm 
Offline

Joined: October 5th, 2007, 7:10 pm
Posts: 21
Ok. This is so weird.

I found this script to be very useful for me... and I just decided to enter the forum and make a request so that the script would display the whole path, or at least a few more folders. And maybe if the path is too long... it should display something like that :

C:\..\downloads\tools

And then I noticed that a user with a similar nickname "sebastian" already made the same request :

"Is it possible to display the whole path or at least more than the folder name in the menu "

Weird.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: December 7th, 2007, 9:09 am 
Offline

Joined: October 5th, 2007, 7:10 pm
Posts: 21
I wish someone could repair this script because is very useful. And I have the same problems with this script as the previous posted here.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 4th, 2008, 5:14 pm 
Offline

Joined: August 8th, 2006, 3:55 pm
Posts: 49
sebastian___ wrote:
I wish someone could repair this script because is very useful. And I have the same problems with this script as the previous posted here.

I implemented a version where
- is shown the full path of the folders
- one can choose to see the tree folder to the left using the menu
- one can set the hotkey by the menu
- one can set the number of folders by the menu
- one can set the WatchDelay by the menu

#LButton is the default hotkey
All values are saved in a file together with to last subfolders.

I programmed it on WinXP SP2 (not seriously tested), let me know the if it is running without many errors.
Code:
; from CarlosTheTackle ; changed by robiandi
#singleinstance force
autoexec:
   SetTitleMatchMode, Slow
  tempBat = %a_temp%\ahk.bat
  IniFile=RecentFolderslist.log
  setworkingdir %a_scriptdir%
  ifexist %IniFile%
   {
    fileread foldersIni         ,%IniFile%
    iniread  foldernum          ,%IniFile%,Settings,foldernum
    iniread  Hkey               ,%IniFile%,Settings,Hotkey
    iniread  TreeFolderToTheLeft,%IniFile%,Settings,TreeFolderToTheLeft
    iniread  timer              ,%IniFile%,Settings,timer
    loop parse,foldersIni,`n
     {
      if (a_index >5)
       folders .= a_loopField "`n"
     }
   }
  else
   {
    foldernum=10
    timer=5000
    folders = C:\`n
   }
  if hkey =
   hkey=#LButton   
  hotkey %hkey%,menuShow
  gosub menu_build
  gosub guiBuild
  SetTimer, rf_trackfolders, %timer%
return
guiBuild:
   Gui add, hotkey  ,w200      vHK
   gui add, checkbox,          vLButton           , LButton
   gui add, checkbox,x+0       vMButton           , MButton
   gui add, checkbox,x+0       vRButton           , RButton
   gui add, checkbox,xm   y+15 vWin,Win
   Gui add, button  ,x+35 yp-5          gHotkeySet, Submit
   Gui add, button  ,x+5                gCancel   , Cancel
return
Cancel:
    gui hide
return
HotkeySet:
   gui submit
   hotkey %hkey%,off
   hkey = %hk%
   if lbutton
     hkey .= "LButton"
   if mbutton
     hkey .="MButton"
   if rbutton
     hkey .="RButton"
   if win
     hkey = #%hkey%
   hotkey %hkey%,menuShow,on
   tooltip `n   hotkey: %hkey%   `n
   sleep 4000
   tooltip
return
rf_trackfolders:
  ;formattime time,,mm:ss   tooltip %time%
  IfWinNotActive ahk_class CabinetWClass
   return
  SetTimer, rf_trackfolders, off
  WinGetTitle, rf_current_win,ahk_class CabinetWClass
  WinGetText, rf_win_info, %rf_current_win%, %rf_current_win%,
  StringSplit, rf_new_folder, rf_win_info,`n
  rf_new_folder= %rf_new_folder1%
  StringTrimRight, rf_new_folder, rf_new_folder, 1
  SecondLetter := substr(rf_new_folder,2,1)
  permitted := false
  if Secondletter = :
    permitted := true
  if rf_new_folder in Desktop,My Documents,Eigene Dateien
    permitted := true
  if (! permitted)
    return
  IsNew = 1
  loop %folders0%
  {
    folder := folders%a_index%
    if rf_new_folder = %folder%
     IsNew =
  }
  if IsNew
   { 
     folders =%rf_new_folder%`n%folders%
     gosub menu_build
   }
  SetTimer, rf_trackfolders, %timer%
return
rf_launch:
   if A_ThisMenuItem = Desktop
    {
     Run, %A_Desktop%
     return
    }
   If A_ThisMenuItem in My Documents,Eigene Dateien
    {
     Run, %A_MyDocuments%
     return
    }
   if (TreeFolderToTheLeft)
    {
      ifexist %tempBat%
        filedelete %tempBat%
      fileappend cmd /k explorer.exe %A_ThisMenuItem%`,/e,%tempBat%
      run %tempBat%
     ; PostMessage, 0x111, 41525,,, A ; <== would be another possibility
    }
   else
    run %A_ThisMenuItem%
return
menu_build: 
  stringreplace folders,folders,`r,,A
  stringsplit   folders,folders,`n
  folders =
  folders0 -= 1
  menu tray, useErrorLevel
  Menu Tray, NoStandard
  menu tray, deleteAll
  Menu Tray, Add, Exit Recent Folders, rf_close
  menu tray, add                      ,Hotkey
  menu tray, add                      ,WatchDelay
  menu tray, add                      ,No. of Folders           ,noOfFolders
  menu tray, add                      ,ToggleTreeFolderToTheLeft
  menu tray, Add
  Menu Tray, Default, Exit Recent Folders
  Loop, %folders0%
   {
    if (a_index > foldernum)
     {
      folders0 := foldernum
      break
     }
    folders .= folders%a_index% "`n"
    Menu, Tray, Add, % folders%a_index%, rf_launch
   }
return
hotkey:
   gui show,,New Hotkey
return
ToggleTreeFolderToTheLeft:
  TreeFolderToTheLeft := not TreeFolderToTheLeft
  tooltip `n   TreeFolderToTheLeft = %TreeFolderToTheLeft%   `n
  sleep 4000
  tooltip
return
WatchDelay:
  inputbox watchdelay,WatchDelay in Seconds,,,220,100
  if ErrorLevel
   return
  if watchdelay is integer
   if watchdelay between 1 and 60
     timer := 1000 * watchdelay
  SetTimer, rf_trackfolders, %timer%
  tooltip `n   WatchDelay = %timer%  (milliseconds) `n
  sleep 4000
  tooltip
return
noOfFolders:
  inputbox foldernum1,No. of Folders,,,150,100
  if ErrorLevel
   return
  if foldernum1 is integer
   if foldernum1 between 10 and 70
     foldernum := foldernum1
  tooltip `n   foldernum = %foldernum%   `n
  sleep 4000
  tooltip
return
rf_close: 
  FileDelete, %IniFile%
  txt =
  (Ltrim
  [Settings]
  foldernum=%foldernum%
  Hotkey=%hkey%
  timer=%timer%
  TreeFolderToTheLeft=%TreeFolderToTheLeft%
  %folders%
  )
  fileappend %txt%,%IniFile%
  ExitApp
return
MenuShow:
   Menu, Tray, Show
return   


Last edited by robiandi on January 4th, 2008, 5:17 pm, edited 1 time in total.

Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 4th, 2008, 5:16 pm 
Offline

Joined: May 24th, 2006, 2:49 pm
Posts: 4511
Location: Belgrade
Add UseErrorLEvel on Menu command somewhere on the scripts start.

Other then that this script is fairly limited, and it grab folder on unreliable way.


Its better to use COM. You can recreate it using Shell module in few hours.

_________________
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 4th, 2008, 5:32 pm 
Offline

Joined: August 8th, 2006, 3:55 pm
Posts: 49
@majkinetor
Quote:
Add UseErrorLEvel on Menu command somewhere on the scripts start.

At label menu_build: there is a line
Code:
menu tray, useErrorLevel


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 4th, 2008, 5:40 pm 
Offline

Joined: May 24th, 2006, 2:49 pm
Posts: 4511
Location: Belgrade
LOL

I was answering to the ending post at first page, with the picture :D


Soz...

_________________
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 4th, 2008, 5:45 pm 
Offline

Joined: August 8th, 2006, 3:55 pm
Posts: 49
ok


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 29th, 2008, 10:28 pm 
Offline

Joined: October 5th, 2007, 7:10 pm
Posts: 21
Uuhhuuu . GREAT. Finally. I am trying now. I will reply after a week or two of testing. And since my gf also requested this, I will report how it went on her computer also.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 15th, 2008, 9:22 pm 
Offline

Joined: October 5th, 2007, 7:10 pm
Posts: 21
So far it works without errors. I say this is one of the best script. It saves you from those endless searching and returning to folders. And it's better than most of the similar commercial programs.

It has so far, just one drawback. You can't use this script when you are in a "open dialog" or "save as" dialog box . You can use this script, but it doesn't makes the Dialog Box go to that folder.

Is it possible to implement that in ? Or is it beyond the possibilities of AHK ?


Report this post
Top
 Profile  
Reply with quote  
PostPosted: January 19th, 2010, 11:48 am 
Offline

Joined: January 19th, 2010, 11:39 am
Posts: 12
Location: Philippines
This script is really hit and miss with me. I've been using it for two days and it's exactly what I'm looking for (when it is working).

In fact it's so important to me that when it's 'not' working I added a function in a DOS batch file that I use to edit the "Recent Folders list.log" file :-)

1) The primary problem that it has is that it will log the last folder that I was in only if I click on one of my shortcut links and then navigate to where I intend to be.
... For instance I have a shortcut on my JetToolBar that goes to my external HD G:\Tim\My_Stuff . If I click on that and navigate to the subdirectory for NewProjects then this script will add it to the list no problem.
* However if I use <Windows Key>+E to open up explorer and then navigate to where I want to go then it doesn't log the folder that I am going to.

2) I'll also add that it stops working completely if I right-click on the icon in the System Tray and Close it, then attempt to restart it by double-clicking on the Recent Folders.ahk file.

Thanks for all of the wonderful work all of you have done on this :-)

BTW I'm using Windows XP SP3, Home Edition


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

All times are UTC [ DST ]


Who is online

Users browsing this forum: Exabot [Bot], JamixZol, Stigg and 21 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