 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
Chris Site Admin
Joined: 02 Mar 2004 Posts: 10463
|
Posted: Wed Dec 01, 2004 1:32 pm Post subject: |
|
|
| I think your idea is a good way to keep your favorites maintained in one place. I was just making sure everyone knew (including me, since I didn't know beforehand) that the sort order is not automatic except on NTFS. Example #2 at the bottom of the following page now contains the sorting and parsing procedure you described: http://www.autohotkey.com/docs/commands/LoopFile.htm |
|
| Back to top |
|
 |
Guest
|
Posted: Wed Dec 01, 2004 3:57 pm Post subject: |
|
|
Ok, I think your right Sandeep. I'll get rid of the ini file and prioritize with numbers. That's going to make it easier to maintain the list. I will also add the sorting routine for Loop output.
BTW, Chris:
Files returned by LoopFile are sorted, but folders are not. "dir" at the command prompt shows this as well. I know we are not sorting folders in this case, just thought I'd point that out. Perhaps you already know. |
|
| Back to top |
|
 |
Chris Site Admin
Joined: 02 Mar 2004 Posts: 10463
|
Posted: Wed Dec 01, 2004 4:42 pm Post subject: |
|
|
| Quote: | | Files returned by LoopFile are sorted, but folders are not. | That's good info, thanks. |
|
| Back to top |
|
 |
ChrisM
Joined: 28 Nov 2004 Posts: 58
|
Posted: Wed Dec 01, 2004 6:03 pm Post subject: |
|
|
That was me a couple of posts ago.
Can anyone suggest a good way of getting a directory path out of a window title? I don't want to tie it to any particular application, the path could be anywhere in the title.
For example here are two typical window titles:
AutoCAD 2000i - [\\export\cam_files\customer\TN7461\STATION 2.dwg]
EdgeCAM - Licenced to Miller - \\export\cam_files\customer\TN7461\STATION 2.ppf
I don't want to extract the file name, just the paths. I also don't want to say " if this is AutoCAD do this" " if this is EdgeCAM do that".
At my work we are directory based by \\server\task\customer\jobnumber\. We will have several differing applications all opening files to the same directory. If I could open one application, browse to the right place, bring up the favorites popup menu, and add the path found in the window title to the favorites. Then I can open all the other applications, do File->Open, bringup the favorites popup menu, and select the same directory as the first app.
Whenever we think of browing or changing directories in any app, the favorites popup meun should be able to do it for us. That's the dream anyway.
I don't think this sort of need would be rare in the general computing public. What do you think? Is it usefull to get the Favorite folders popup to work like this? _________________ ChrisM |
|
| Back to top |
|
 |
BoBo Guest
|
Posted: Wed Dec 01, 2004 6:24 pm Post subject: |
|
|
| Quote: | WinGetActiveTitle, Title
StringSplit, TitlePath, Title, \\
Path = \\%TitlePath2%
SplitPath, Path, OutFileName, OutDir, OutExtension, OutNameNoExt, OutDrive
MsgBox, %OutDir%
ClipBoard = %OutDir%
ExitApp |
Untested
Uncommented
Free of charge  |
|
| Back to top |
|
 |
Sandeep
Joined: 29 Nov 2004 Posts: 10
|
Posted: Thu Dec 02, 2004 1:48 am Post subject: |
|
|
Thanks for your understanding ChrisM! I am sure you will get benefit from it.
And, as you said it is quite common to have your kind of requirements and it is not a dream. If you think through you requirement in specific details, there is a high chance that you will get a solution out of AHK.
BTW, in your case, though it was not very clear from what you have written, if you have the same user working with different cutomers and within that different jobs, then, may I suggest using submenus for customers and jobs. You would create only one shortcut per task pointing to \\server\task\ and write script to create submenus from the actual folders automatically.
Please post your opinion on this! _________________ Sandeep |
|
| Back to top |
|
 |
ChrisM
Joined: 28 Nov 2004 Posts: 58
|
Posted: Fri Dec 03, 2004 1:04 am Post subject: |
|
|
Here is new version. No ini file. It can extract a valid path from anywhere within the active window's title or the clipboard. Saves valid paths as link file targets. The link file's name is what appears in the menu. The "Edit Favorites Folder" menu item always opens an explorer to the shortcuts to let the user modify shortcut names or delete them.
| Code: | | Comment from moderator: Large script removed because the very first post of this topic contains all of these updates. |
Sandeep, please note I changed the comments at the top to organize revision history a bit and to make it easier for a new user to undestand what's going on. Suggest any changes if you want.
| Quote: |
may I suggest using submenus for customers and jobs. You would create only one shortcut per task pointing to \\server\task\ and write script to create submenus from the actual folders automatically.
|
Do you mean a popup menu with submenus and other submenus from them? I sort of do that by just having shortcuts on the popup to each task directory. Then with regular browsing I get to the job directory, make a shortcut from there, and use that for as long as the job is active ( about 2 weeks ). When the job is done I delete the shortcut, since it may be a year or two before we get the job again. That's why I wanted to be able to make and delete the shortcuts right from the popup menu. _________________ ChrisM |
|
| Back to top |
|
 |
savage
Joined: 02 Jul 2004 Posts: 206
|
Posted: Thu Dec 09, 2004 10:50 pm Post subject: |
|
|
Heh, wow, I didn't realize people were putting so much work into my script. I definitely like this way of doing things, it makes it a bit easier to manage. The one thing that I think still needs to be added to this, and I doubt I'll get around to doing it because I'm a lazy bum, is a auto favorites, or history function. Powerpro has this, it tracks the folders used in the dialogs (up to a number of entries you specify) and keeps them in a menu. This way if there's something you're using a lot that doesn't really warrant being placed on the menu, you can still get to it very easily. I just bound the Powerpro menu to another hotkey and use both, but it would be nice to have a pure AHK solution. |
|
| Back to top |
|
 |
ChrisM
Joined: 28 Nov 2004 Posts: 58
|
Posted: Sat Dec 11, 2004 3:31 am Post subject: |
|
|
| Quote: |
a auto favorites, or history function. Powerpro has this, it tracks the folders used in the dialogs (up to a number of entries you specify) and keeps them in a menu.
|
See the new post "Most Recently Opened Folders Popup Menu".
Perhaps that's the sort of thing your thinking of. _________________ ChrisM |
|
| Back to top |
|
 |
savage
Joined: 02 Jul 2004 Posts: 206
|
Posted: Sat Dec 25, 2004 2:27 am Post subject: |
|
|
Yep, that's it. Now we just need to merge the two.  |
|
| Back to top |
|
 |
Peter Guest
|
Posted: Sun Jan 30, 2005 11:31 pm Post subject: Re: Here is the updated code |
|
|
| Quote: | | window types are supported: 1) Standard file-open or file-save dialogs |
Hi,
the Tool ist great, but its doesnt work in Standard file-open or file-save dialogs at my windows. (Autohotkeyversion: 1.0.25.08)
On Click doesnt start anything (with the tilde), without the tilde: its start a new explorer.
What could be wrong?
Thanks
Peter |
|
| Back to top |
|
 |
Peter Guest
|
Posted: Mon Jan 31, 2005 1:38 pm Post subject: Re: Here is the updated code |
|
|
Hi,
I did a mistake:
It works in all Standard file-open or file-save dialogs! I didnt now, that all MS-Office programs didnt use the Standard dialogs.
I would be happy the script would be work in MS-Office programs too.
I use OfficeXP and Office2003! It is possible?
Thanks
Peter |
|
| Back to top |
|
 |
JHoward Guest
|
Posted: Mon Jan 31, 2005 6:39 pm Post subject: |
|
|
I use the Microsoft Office applications myself a great deal and modified the code to handle their dialog boxes. It is posted below. It works properly with Office 2002, but should work with properly with other versions, unless the classes and controls have changed. Please note that the base script used is that in the Script Showcase.
| Code: | | Comment from moderator: Large script removed because the very first post of this topic contains these updates. |
|
|
| Back to top |
|
 |
JHoward Guest
|
Posted: Tue Feb 01, 2005 12:20 am Post subject: |
|
|
I have modified ChrisM's latest version to include handling for Microsoft Office file Open and Save As dialog boxes. The previous post used the original script in the Script Showcase.
| Code: | | Comment from moderator: Large script removed because the very first post of this topic contains these updates. |
|
|
| Back to top |
|
 |
Chris Site Admin
Joined: 02 Mar 2004 Posts: 10463
|
Posted: Tue Feb 01, 2005 1:49 am Post subject: |
|
|
| Looks good. Thanks for the improvement. |
|
| 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
|