| View previous topic :: View next topic |
| Author |
Message |
ChrisM
Joined: 28 Nov 2004 Posts: 58
|
Posted: Wed Oct 12, 2005 3:56 am Post subject: |
|
|
Hi Everyone:
A new version of the script is in the first post of this thread.
Here's the changes:
Oct 11/05
- fixed bug that read in the enviroment path variable when no valid path was found in window title or clipboard.
- added support for .pif files
- added support for ordering menu items (.lnk files only) and adding seperator lines, thru the comment field of the .lnk files
- added more error checking
| dmiranda wrote: | | sometimes when attemtpting to switch within to a subfolder's shortctu item, I am redirected to the favorites folder, instead. |
I could not reproduce that behavior so maybe it's fixed with this update.
The ordering of the menu items and seperator lines is something that people wanted from savage's original script. This is a partial solution, since it only works with one kind of shortcut file (.lnk). It's completely optional. If you want to use it just add "menu=(integer to indicate menu position)" to the comment field of the shortcut file. It won't work on .url or .pif shortcuts. FileGetShortcut does not read those types.
If you want a seperator line just add "blank" after the integer in the comment.
If a shortcut does not have any of this in it's comment it will be added to the bottom of the menu as normal.
I think this is a good feature to have in the script, but now that it's done I don't think this way of doing it is the best. I think a better way would be a seperate .ini file stored in the same folder as the main script that specifies the order of the menu items would be better. All kinds of shortcuts and even the submenus could be ordered in any way. But I think this would require a GUI to be used when adding or editing the menus in order to keep the .ini file up to date. I started working at it but it seems it may get pretty complicated handling the submenus. So I don't know if I'll ever get that done. _________________ ChrisM |
|
| Back to top |
|
 |
Guest
|
Posted: Wed Oct 12, 2005 5:14 am Post subject: |
|
|
Unbelieveably nice. Cheers!
Still, I have now the following (extremelly minor) issue: duplicated shortcut names in different forlders point to the same directory. To replicate this:
create two folders A and B;
create two shortcut to diferent directories, one in A and the other in B;
give the shortcuts the same name.
In my system this results on both shortcuts pointing to the same directory. |
|
| Back to top |
|
 |
aarondellis
Joined: 15 Aug 2005 Posts: 56
|
Posted: Wed Oct 12, 2005 2:19 pm Post subject: |
|
|
I still get the following message:
"The folder \\My Documents\Favorites could not be created.
Cannot save Favorites links."
In my case %HOMEPATH% translates to a "\" and not any path. Therefore in the error message above you get a "\\" before My Documents.
I still change my default path to c:\favs and the script works fine.
As the other comments state, This IS the most used script I have. Thanks for sharing it. |
|
| Back to top |
|
 |
ChrisM
Joined: 28 Nov 2004 Posts: 58
|
Posted: Thu Oct 13, 2005 6:11 am Post subject: |
|
|
Hi Everyone:
Another new version of the script is in the first post of this thread.
Here's the changes:
Oct 13/05
- fixed bug that didn't handle identical named shortcuts in different folders properly
- added better error checking for dynamic variable names that are too long
| Anonymous wrote: | | duplicated shortcut names in different forlders point to the same directory. |
It's fixed now. Thanks for pointing it out to me. Turned out to be some leftover logic from the pre-submenu days when I simply relied on the fact that every shortcut in the base folder would be a unique name.
| aarondellis wrote: | | In my case %HOMEPATH% translates to a "\" and not any path. Therefore in the error message above you get a "\\" before My Documents. |
Since someone may decide to use another enviroment variable or hard code the path I don't think I should add any error checking for that beyond the error you are already getting. It's up to the user to be sure the 'f_shortcuts_folder' variable is a valid absolute path. I'll add a line to that error message to clarify that. _________________ ChrisM |
|
| Back to top |
|
 |
aarondellis
Joined: 15 Aug 2005 Posts: 56
|
Posted: Fri Oct 14, 2005 3:10 pm Post subject: |
|
|
You're right! I had to stop and think where the %homepath% variable was getting set. When connected to the network at work evidently that variable is being set to "\". That is why I was getting the error. When not connected to our network the variable is how you intended it to be and the script works well.
I just hardcode the path and I have no problems.
A thought! What if the script instead of stopping with the error I was receiving asks you where you would like the shortcut folder to be located. That would require INI files to keep up with the location but would keep your script from failing.
Even if you don't incorporate that it is still a great script. Thanks again! |
|
| Back to top |
|
 |
vital
Joined: 05 Oct 2005 Posts: 17 Location: china
|
Posted: Mon Oct 17, 2005 10:20 pm Post subject: |
|
|
| would you add its icon to each menu item ? |
|
| Back to top |
|
 |
Guest
|
Posted: Tue Oct 18, 2005 12:40 am Post subject: |
|
|
| vital wrote: | | would you add its icon to each meu item ? | I hope not, that would slow the script down. |
|
| Back to top |
|
 |
hps
Joined: 19 Aug 2005 Posts: 14 Location: Germany
|
Posted: Wed Oct 26, 2005 7:41 pm Post subject: Hyperlinks |
|
|
Great script, I have integrated it in my multi-porpose utility.
A "Hyperlink" functionality would be nice, so a link to the desktop
the "original" favorites folder and the Quicklauch could be established.
Adding a special name ? shortcut, e.g. HYPER_Quicklaunch pointing to "%APPDATA%\Microsoft\Internet Explorer\Quick Launch" should be presented as a submenu ( like a folder) and showing the original shortcuts.
And how about "my subfolder\first shortcut" entered in the "add folder to favorites" creating a "my subfolder" subfolder and the "first shortcut" in this subfolder ?
Keep on autohotkeying
Hans Peter |
|
| Back to top |
|
 |
savage
Joined: 02 Jul 2004 Posts: 205
|
Posted: Thu Oct 27, 2005 3:45 pm Post subject: |
|
|
If you're using ntfs you could hard link the quicklink folder into your favorites folder. _________________ <enormous animated gif> |
|
| Back to top |
|
 |
TucknDar Guest
|
Posted: Sat Jan 07, 2006 12:51 pm Post subject: |
|
|
just started using the app, and this is a great script!
A little thing I've added, is a variable pointing to my file-manager (and parameters) of choice, for the 'f_EditFavorites' function. Sorry that I didn't bother reading the whole thread for something similar, but if it hasn't been suggested before, then consider it a request. I suppose I'm not the only one who prefers other filemanagers than explorer
again, though, fabulous script! |
|
| Back to top |
|
 |
boardtc
Joined: 31 Jan 2006 Posts: 12
|
Posted: Wed Feb 01, 2006 1:40 pm Post subject: |
|
|
I have been looking for a shell extension to have a list if commonly used folders available in the open / save dialogs and came across AutoHotKey.
All the help I have read seem to be geared towards creating your own scripts. I just want to run one to do the above - this Favorite Folders script
After installing AutoHotKey I replaced AutoHotkey.ini with the above script and restarted wiht AutoHotKey running. But when I am in a file open dialog the middle button does nothing, it's mean to access a favourite list I believe.
Am I doing something wrong?
Thanks, Tom. |
|
| Back to top |
|
 |
Chris Site Admin
Joined: 02 Mar 2004 Posts: 10450
|
Posted: Thu Feb 02, 2006 2:52 am Post subject: |
|
|
Note that mouse button hotkeys are not supported on Windows 9x. If that's the problem, you could try substituting a keyboard hotkey.
Otherwise, you might try running the script as a separate .ahk file. If the script in this topic gives you any trouble, perhaps your mouse's middle button is controlled by your mouse driver. To test your mouse, you could try making a short script called test.ahk, containing one line:
MButton::MsgBox You pressed the middle mouse button.
Run it and press your middle mouse button to see if a MsgBox window appears. |
|
| Back to top |
|
 |
ChrisM
Joined: 28 Nov 2004 Posts: 58
|
Posted: Thu Feb 02, 2006 4:25 am Post subject: |
|
|
My apologies boardtc.
I see that the first line of the script description was not updated properly and mislead you. It has now been changed to read:
| Code: | ; When you hold the control key and click the middle mouse button while certain
; types of windows are active, this script displays a menu of your favorite
; shortcuts. |
Further down the config section of the script you will see two settings:
| Code: | ; CONFIG: CHOOSE WHEN TO SHOW THE MENU
...
f_AlwaysShowMenu = y
; CONFIG: CHOOSE YOUR HOTKEYS
...
f_Hotkey1 = ^MButton ; Control+MiddleButton
|
If you do want to use only the middle button in only open / save dialogs then you may want to make these changes:
| Code: | | f_AlwaysShowMenu = n |
and:
| Code: | | f_Hotkey1 = ~MButton |
_________________ ChrisM |
|
| Back to top |
|
 |
boardtc
Joined: 31 Jan 2006 Posts: 12
|
Posted: Thu Feb 02, 2006 11:56 am Post subject: |
|
|
Thanks for this.
I tried the new changes and after rebooting Ctrl+middle btn in the open dialog (standard) for my text editor (editpad) did not work. I also tried chnaging the script as suggested to just work for the middle btn and that did not work either.
I must be doing something wrong. I am running xp pro sp 2.
I see in the help about the reload command.
^!r::Reload ; Assign a hotkey to restart the script.
Does this mean if I hold down ctrl and caps+1 (!) r it will reload? Ihave been
rebooting to reload each time.
Thanks for the hand holding  |
|
| Back to top |
|
 |
Chris Site Admin
Joined: 02 Mar 2004 Posts: 10450
|
Posted: Sat Feb 04, 2006 3:19 pm Post subject: |
|
|
You don't have to reboot to reload. The hotkey you mentioned above (^!r::Reload) will do that for you -- or you can select Reload from the tray menu.
As for the rest of your questions, I'm not an expert on this script so don't have any other quick advice. |
|
| Back to top |
|
 |
|