Welcome Guest.   Make a donation to an author on the site April 24, 2014, 12:24:44 PM  *

Please login or register.
Or did you miss your validation email?


Login with username and password (forgot your password?)
Why not become a lifetime supporting member of the site with a one-time donation of any amount? Your donation entitles you to a ton of additional benefits, including access to exclusive discounts and downloads, the ability to enter monthly free software drawings, and a single non-expiring license key for all of our programs.


You must sign up here before you can post and access some areas of the site. Registration is totally free and confidential.
 
Free DonationCoder.com Member Kit: Submit Request.
   
   Forum Home   Thread Marks Chat! Downloads Search Login Register  
Pages: [1] 2 Next   Go Down
  Reply  |  New Topic  |  Print  
Author Topic: Open Containing Folder  (Read 13638 times)
SleepingWolf
Supporting Member
**
Posts: 103


see users location on a map View Profile Read user's biography. Give some DonationCredits to this forum member
« on: October 25, 2008, 01:57:53 PM »

I have a useful context-menu extension created (with instructions from the web) via a registry key; it says "Open Containing Folder" so that right-clicking a file (or shortcut) and selecting that menu item opens explorer at that folder in the directory structure.

I have often wondered if it would be possible to get similar functionality for program windows - right clicking on the title bar will show an extra menu item: "Locate program" that would open explorer at the containing folder.

Also, by extension, other processes could be listed in a listbox (or better) GUI item and selected to open explorer there (or other file manager of course). I would love to try Skrommelling it (in Autohotkey) but I feel it would almost certainly be beyond me so feel it best to throw the idea out there to your tender mercies!
Logged

-------------------------------------------

Choose life -or at least respect it.
mouser
First Author
Administrator
*****
Posts: 32,700



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #1 on: October 25, 2008, 02:26:22 PM »

this is one of those great simple ideas.   thumbs up
Logged
Deozaan
Charter Member
***
Posts: 6,090



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #2 on: October 25, 2008, 02:30:03 PM »

I don't want to sound like a stick in the mud, but if you're right clicking a file (with the exception of a shortcut) wouldn't you already be exploring that directory?
Logged

mouser
First Author
Administrator
*****
Posts: 32,700



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #3 on: October 25, 2008, 02:40:33 PM »

what he means is, let's say you have a program running on your screen, like notepad or maybe some program started at windows boot time.  so now he's saying it would be nice to have an easy way to jump to that program's directory on disk.

i guess there are process explorers that will do this -- just seems like one of those ideas that should be built into windows so that you could click on a window of a running program somewhere and say "take me to this program's home directory".
Logged
SleepingWolf
Supporting Member
**
Posts: 103


see users location on a map View Profile Read user's biography. Give some DonationCredits to this forum member
« Reply #4 on: October 25, 2008, 02:57:57 PM »

You're both right. The existing Context-Menu item is most useful for shortcuts.

Process explorers (prcView mainly here)  generally give you option to copy path to clipboard ---> perhaps a clip-board monitor could open copied paths automatically.
Logged

-------------------------------------------

Choose life -or at least respect it.
cmpm
Charter Member
***
Posts: 2,020

View Profile Give some DonationCredits to this forum member
« Reply #5 on: October 26, 2008, 01:26:59 PM »

one of these may do it

http://search.techrepubli.../search/window+title.html

some of these hits seem to suggest they can
Logged
SleepingWolf
Supporting Member
**
Posts: 103


see users location on a map View Profile Read user's biography. Give some DonationCredits to this forum member
« Reply #6 on: October 28, 2008, 04:00:59 PM »

Quote
one of these may do it

http://search.techrepubli.../search/window+title.html

some of these hits seem to suggest they can


Thanks cmpm, I need to read them in detail, but the ones I've checked either need .NET or seem downright un-downloadable as the download links are well hidden.

I'd prefer an open-source Autohotkey solution; wouldn't you?
Logged

-------------------------------------------

Choose life -or at least respect it.
cmpm
Charter Member
***
Posts: 2,020

View Profile Give some DonationCredits to this forum member
« Reply #7 on: October 29, 2008, 07:31:53 AM »

Yes I would prefer that too.
That was all I could find with some various search strings.

If the icon in the title bar was actually an icon shortcut that would help.

There should be a way to add the command to to the right click title bar menu. Or make it an address bar. Then Skrommels 'Captain' could be used to paste the text into 'run'.

http://www.donationcoder....rommel/index.html#Captain

---

this is close but still dealing with the shortcuts

http://www.megaleecher.net/taxonomy/term/1761
« Last Edit: October 29, 2008, 09:22:01 AM by cmpm » Logged
AndyM
Charter Member
***
Posts: 615


see users location on a map View Profile Give some DonationCredits to this forum member
« Reply #8 on: October 29, 2008, 04:51:57 PM »

Macro Express might do what you want. 
www.macros.com
Logged
SleepingWolf
Supporting Member
**
Posts: 103


see users location on a map View Profile Read user's biography. Give some DonationCredits to this forum member
« Reply #9 on: October 30, 2008, 02:20:08 PM »

Quote
this is one of those great simple ideas.

Yes, Mouser, that's why I thinkthat someone will have solved it before.


Quote
Macro Express might do what you want.

Thanks, AndyM. Unfortunately, Macro express seems to be an expensive equivalent of AutoHotkey. Sure it may be able to do it, but then so might AHK and so might Macro Scheduler that I was trying before -so why pay for the possibility of a solution when it may be AHK-solvable with the advantage of using less tools with less of a syntax learning curve? Unless you have experience of a greater (and more relevant) command set...?

No, I think AHK COULD be made to do the trick. I'm also sure that it will take me a while and that maybe someone here would relish the challenge -and may even have solved a similar problem before -hence my reasons for posting.
Logged

-------------------------------------------

Choose life -or at least respect it.
cmpm
Charter Member
***
Posts: 2,020

View Profile Give some DonationCredits to this forum member
« Reply #10 on: October 30, 2008, 08:35:53 PM »

Yeah, I think it would be a great convenience.
But not worth a hefty price for a small function.

I found this for $50.
It does everything but what this thread is about.

http://www.actualtools.com/

I found programs that put the time or calendar or both in it.
Also found one that will scroll a text file across the title bar for entertainment.
Found some that will scroll news or stocks.

But no target or address function without copy paste.
Logged
AndyM
Charter Member
***
Posts: 615


see users location on a map View Profile Give some DonationCredits to this forum member
« Reply #11 on: October 30, 2008, 10:29:08 PM »

Macro Express might do what you want. 
www.macros.com
Oh no!  This reply was meant for another thread (something about clicking on buttons or controls).  Sorry! embarassed
Logged
AndyM
Charter Member
***
Posts: 615


see users location on a map View Profile Give some DonationCredits to this forum member
« Reply #12 on: October 30, 2008, 10:42:08 PM »

But I atone.  Here's an ahk script from Skrommel that displays the .exe file and path next to the mouse for whatever window the mouse is hovering over.

You could use the GetModuleFileNameEx(p_pid) subroutine to get the path and open the folder, and put it in an .ahk or .exe file to use as a context menu choice.
[copy or print]
;WinProcPath.ahk
; Show the filename of the windows below the mouse
;Skrommel @ 2007

#SingleInstance,Force
#NoEnv

Loop
{
  MouseGetPos,x,y,winid,ctrlid
  WinGet,pid,Pid,ahk_id %winid%
  path:=GetModuleFileNameEx(pid)
  ToolTip,%path%
  Sleep,100
}


GetModuleFileNameEx(p_pid) ;by shimanov at www.autohotkey
{
   If A_OSVersion in WIN_95,WIN_98,WIN_ME
   {
     WinGet,name,ProcessName,ahk_id %p_pid%
     Return,name
   }
   h_process:=DllCall("OpenProcess","uint",0x10|0x400,"int",false,"uint",p_pid) ;  PROCESS_VM_READ=0x0010  PROCESS_QUERY_INFORMATION=0x0400
   If (ErrorLevel or h_process=0)
      Return
   name_size=255
   VarSetCapacity(name,name_size)
   result:=DllCall("psapi.dll\GetModuleFileNameExA","uint",h_process,"uint",0,"str",name,"uint",name_size)
   DllCall("CloseHandle",h_process)
   Return,name
}
« Last Edit: October 30, 2008, 10:47:21 PM by AndyM » Logged
cmpm
Charter Member
***
Posts: 2,020

View Profile Give some DonationCredits to this forum member
« Reply #13 on: October 31, 2008, 09:24:04 AM »

This script has the target following the mouse in a box.
I don't know how to use it except for just showing the directory.
No way to drop in run or open the folder.

The script is missing something or I am.
Logged
AndyM
Charter Member
***
Posts: 615


see users location on a map View Profile Give some DonationCredits to this forum member
« Reply #14 on: October 31, 2008, 08:38:27 PM »

Quote
This script has the target following the mouse in a box.

And isn't the folder which contains that target the one you want to open?

The script has a subroutine that identifies the executable associated with that window.  One could build on that to write a script to do what you want. 

Writing the subroutine would have been way beyond me, but if I spent the time, I think I could use it to write an ahk script that would do what you want.  It would be a stretch but  if I wanted the utility bad enough I would spend the time and enjoy it as a learning experience.

But I have too much going on at the moment to get sidetracked, so either someone else can do it (Skrommel?), or you could have your own learning experience. Grin
« Last Edit: October 31, 2008, 08:46:25 PM by AndyM » Logged
cmpm
Charter Member
***
Posts: 2,020

View Profile Give some DonationCredits to this forum member
« Reply #15 on: October 31, 2008, 09:53:48 PM »

Thanks AndyM, it is interesting and got me into AHK.

Yes that does show the target of whatever you are on.
Like you, other things to do as well.
But worth the time for the learning.

A program by lanux128 'CopyCap' does what Captain does also.

http://www.donationcoder....opic=14275.0;attach=31748

Both good programs and good folks.
Logged
cmpm
Charter Member
***
Posts: 2,020

View Profile Give some DonationCredits to this forum member
« Reply #16 on: November 01, 2008, 08:41:26 AM »

Found one.
Uses .Net 3.5 though and it does work.
It's called 'Titlebar'. Free.

http://www.r-nsoft.com/download.html

Version Tracker had it on their site

Logged
lanux128
Global Moderator
*****
Posts: 6,049



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #17 on: November 01, 2008, 09:26:45 AM »

actually this feature can be included as part of CopyCap. the code by AndyM/Shimanov can be inserted easily into my script, which i have done so. please try out and let me know. smiley



Note: this script might require 'psapi.dll'.

* CopyCap+LocateFolder.ahk (3.46 KB - downloaded 277 times.)
Logged

ewemoa
Honorary Member
**
Posts: 2,246



View Profile Give some DonationCredits to this forum member
« Reply #18 on: November 01, 2008, 09:43:34 AM »

Seems to work nicely here smiley

(I changed MButton to XButton1 as I was already using MButton for something else [1].  In my tired state, I didn't think of any good approaches to work around the issue of multiple programs using the same mouse button -- any ideas on that front?  Is it easy to detect whether something else is already using a particular mouse button for something in AHK (or anything else for that matter)? [2])


[1] Either I configured VirtuaWin to do this or it does it by default -- don't remember...

[2] Ah, I guess Captain has an option to change the hotkey.
« Last Edit: November 01, 2008, 09:48:30 AM by ewemoa » Logged
cmpm
Charter Member
***
Posts: 2,020

View Profile Give some DonationCredits to this forum member
« Reply #19 on: November 01, 2008, 09:44:42 AM »

It works good lanux.

If there is a program running with the middle click button taken it won't though.
Such as ipoint.

But that function in ipoint could be changed to a different mouse click i suppose. It's the default setup for ipoint that has the middle click tile open windows.
Logged
lanux128
Global Moderator
*****
Posts: 6,049



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #20 on: November 01, 2008, 11:21:19 AM »

i'm glad to see that it works. as for the hotkey, the script will show the menu only if the middle-click is on the titlebar elsewhere middle-click should work as normal. smiley

@ewemoa: hotkey detection is a bit tricky with AHK but it could made configurable instead.

@cmpm: i'm not familiar with ipoint but does the function to tile open windows requires middle-click on the caption/titlebar?

Note: just to clarify things, i've tested the script with the latest version - 1.0.47.06 so if it doesn't work, please provide more details such as AHK version, Windows version and the conflicting programs. smiley
Logged

cmpm
Charter Member
***
Posts: 2,020

View Profile Give some DonationCredits to this forum member
« Reply #21 on: November 01, 2008, 11:47:25 AM »

No, just middle click anywhere and ipoint will tile the windows, including the title bar.

ipoint is microsoft's software for their mice
you knew that probably

Anyway ipoint disables CopyCap and Captain as far as using the middle click on the title bar. Which can easily be worked around by changing one of the programs function for the middle click.

So it's not a big deal. Thought I would mention it in case it wasn't working for someone.
Logged
lanux128
Global Moderator
*****
Posts: 6,049



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #22 on: November 01, 2008, 12:03:26 PM »

Anyway ipoint disables CopyCap and Captain as far as using the middle click on the title bar. Which can easily be worked around by changing one of the programs function for the middle click.

okay, now i understand. the iPoint program has a higher priority in intercepting the mouse-clicks than AHK. so if you're in mood for some testing, you can place the following line in the AHK script and see if that solves the problem.

[copy or print]
#InstallMouseHook

Logged

cmpm
Charter Member
***
Posts: 2,020

View Profile Give some DonationCredits to this forum member
« Reply #23 on: November 01, 2008, 12:15:25 PM »

ehh, no go
i put it after
'#NoTrayIcon'
is their a different place for it?
Logged
lanux128
Global Moderator
*****
Posts: 6,049



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #24 on: November 01, 2008, 12:24:10 PM »

well it seems that iPoint retains the upper-hand but at least we tried. smiley
Logged

Pages: [1] 2 Next   Go Up
  Reply  |  New Topic  |  Print  
 
Jump to:  
   Forum Home   Thread Marks Chat! Downloads Search Login Register  

DonationCoder.com | About Us
DonationCoder.com Forum | Powered by SMF
[ Page time: 0.047s | Server load: 0.18 ]