Welcome Guest.   Make a donation to an author on the site October 31, 2014, 09:29:14 AM  *

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.
 
The N.A.N.Y. Challenge 2013! Download dozens of custom programs!
   
   Forum Home   Thread Marks Chat! Downloads Search Login Register  
Pages: [1] 2 Next   Go Down
  Reply  |  New Topic  |  Print  
Author Topic: DONE: Space + click on file reveals "Open With" list of programs  (Read 9821 times)
nudone
Cody's Creator
Columnist
***
Posts: 4,116



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« on: May 24, 2010, 09:16:44 AM »

i'd like to have immediate access to the "Open With" menu (found in the context menu) when opening a file - BUT, i don't want it to open every time i select a file as many times i'll just want the default associated program to open instead.

i'd like to be able to bring this "open with" menu up by just using the keyboard - maybe using a hotkey like "space + enter". AND, it would be useful to be also make the menu appear by using the mouse, so a combo of something like "Ctrl + Left button click" would be nice.

(the "Open With" menu is pretty basic - so, maybe it would be nice to add extra features.)

i know this has been done years ago because i used a program that did it. but, i can't remember the name of it (does anyone know it) and, i believe, i stopped using it because it didn't work perfectly. i also vaguely remember a autohotkey script doing it - possibly by a DC forum member (if so, i must have stopped using that also because it didn't work correctly).

thanks
Logged
tomos
Charter Member
***
Posts: 8,629



see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #1 on: May 24, 2010, 10:40:52 AM »

FWIW . . . IDEA: Replacement for Windows 'Open With...' dialogue

You recommended:
quickassociation will do this and more. but it's not free. i bought it because i believe it to be the best for what it does. find it at http://www.pcmag.com/arti...le2/0,1895,1654639,00.asp

Another recommendation was Choice Editor - which never worked properly for me on XP, but seemed to work for (some) others
Lanux recommends another which hasnt been updated in a while...

XYPlorer has a super implementation of "open with: menu list of pre-selected programmes" but if you're not using XY it's not much good
 
Logged

Tom
daddydave
Supporting Member
**
Posts: 818



see users location on a map View Profile Give some DonationCredits to this forum member
« Reply #2 on: May 24, 2010, 11:02:16 AM »

Not what you asked for, but I wanted to make sure you are aware:

In Windows XP, Shift-Right-Click gives Open With... as an option. In Windows 7, a plain right click will do the same.
Logged
nudone
Cody's Creator
Columnist
***
Posts: 4,116



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #3 on: May 24, 2010, 11:12:50 AM »

thanks both for the suggestions.

unfortunately neither methods are enough as i really want the "open with" feature to be an extra feature - and immediately accessible, i.e. no right clicking and then having to select something from a submenu.

Choice Editor would be okay, but it means associating to the extensions as the default program.

i know i'm being picky, but i'm sure this is do-able with autohotkey - i just haven't the ability to write the script myself.

edit:
i'm going to try using "Choice Editor" for a while (until the perfect solution comes along). anyone else wishing to try it will require "msvbvm50.dll" in their \windows\system directory.
« Last Edit: May 24, 2010, 11:18:17 AM by nudone » Logged
daddydave
Supporting Member
**
Posts: 818



see users location on a map View Profile Give some DonationCredits to this forum member
« Reply #4 on: May 24, 2010, 11:19:58 AM »

From your response I take it that adding an extra item on the right button menu like "Edit with such and such" would not fill the bill either.
Logged
tomos
Charter Member
***
Posts: 8,629



see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #5 on: May 24, 2010, 11:28:26 AM »

The XYplorer implementation allows 'normal' opening and then using a shortcut keycombo you open the list.
You edit an ini file for the list but it's all made very easy really (& it's a set it once & forget it scenario)

I dont know if that would be possible with AHK but I'd certainly love to see something like it as well!

nudone are you more interested in the actual "Open with" menu or would something like XY implementation suit?
Logged

Tom
nudone
Cody's Creator
Columnist
***
Posts: 4,116



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #6 on: May 24, 2010, 11:32:08 AM »

From your response I take it that adding an extra item on the right button menu like "Edit with such and such" would not fill the bill either.
i agree, it ought to be fine, but the problem is that my context menu is so full of other things it takes too much trying to look through it - which is one reason i don't use the normal "Open With" menu. it simple takes too long to identify where it is in the menu.

perhaps if "Open With" was always stuck at the top of the context menu (right click menu) then i'd use it. well, i would use it.

@tomos
sorry, not using XYplorer (i'm a dopus man). but really, this would be more something i'd want to be universal throughout the system and not tied down to any file manager - i use the desktop a lot for working on files.
Logged
daddydave
Supporting Member
**
Posts: 818



see users location on a map View Profile Give some DonationCredits to this forum member
« Reply #7 on: May 24, 2010, 12:29:54 PM »

EDIT: @nudone: OK I read your posts another few more times, you're not saying your Open With menu is full, just the initial context menu. I don't see an easy way to move Open With to the top of that menu, but that's not to say there isn't a way. Hmmm...

I'm still trying to get a fix on what this would look like (I don't think I am competent enough to code it, but I'm just trying to pin down requirements.) It's almost like you need an Open With 2 menu which only has your favorite Open Withs, and the only other requirement is a hotkey to go simulate the Context Menu key and then the shortcut key for Open With 2 (perhaps the '2' key).

In fact, before Open With, there was Send To, which you can access by going Start > Run > shell:sendto. Each shortcut creates a menu item which appears on the Send To menu for all file types.

But I'm guessing your SendTo menu looks like mine:



(Yes, I don't use half of this and probably do need to clean this up.)

« Last Edit: May 24, 2010, 12:45:49 PM by daddydave » Logged
daddydave
Supporting Member
**
Posts: 818



see users location on a map View Profile Give some DonationCredits to this forum member
« Reply #8 on: May 24, 2010, 01:20:23 PM »

Quote
(the "Open With" menu is pretty basic - so, maybe it would be nice to add extra features.)

What do you have in mind, other than the hotkey?
Logged
nudone
Cody's Creator
Columnist
***
Posts: 4,116



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #9 on: May 24, 2010, 01:31:28 PM »

i had this in the back of my mind all along and you've prompted me to do it, daddydave  smiley

Formatted for AutoIt with the GeSHI Syntax Highlighter [copy or print]
  1. CapsLock & /::Send {AppsKey} h {Enter}
  2. Ctrl & LButton::Send {AppsKey} h {Enter}

so, if a file is highlighted:
capslock and ? will display "open with"
Ctrl + left mouse click will display "open with"

not brilliant, you'll get the idea. would be nice if it was just the "open with" menu that appeared all on it's own.

edit:
forgot to say, this is just something i've taken out of a bigger script so the capslock key is always off unless i hold down capslock + shift to turn it on.

ps.
can't really think of any extra features at the moment. i was probably jumping the gun there; i forgat that there's an add more programs at the bottom of the "open with" menu. maybe if each item was prefixes with a number so you could just hit that to open the program would be good.

pps.
when using the ctrl + left mouse to open the menu, it would probably be good to use the scroll wheel to select a program from the list. i might be able to do that - if my autohotkey skills hold out.
« Last Edit: May 24, 2010, 01:37:19 PM by nudone » Logged
nudone
Cody's Creator
Columnist
***
Posts: 4,116



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

okay, that doesn't work well enough anyway.

Directory Opus decides that the "h" is used for selecting something else in the context menu - so i'm thinking that trying to use the systems "Open With" menu isn't going to work in the long run. there's the possibility of even more "h" shortcuts being used in the context menu.

looks like a more intelligent version of "Choices Editor" would be very nice. i'd try to get that to work with a hotkey trigger (so my default program would open if the trigger wasn't used). but Choices Editor didn't appear to want to work with the .url extension. maybe that's not a great problem really.
Logged
tomos
Charter Member
***
Posts: 8,629



see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #11 on: May 24, 2010, 02:18:57 PM »

nudone,
you misread my post - I was describing how XY worked* & saying I would like to see that via AHK - Dopus is my main file manager as well

* I think XY's implementation is very good - it allows you to associate various filetypes with different programmes - again I'm saying this because I would love to see something like that via AHK (or some way it could work universally). It's the same idea as the open-with menu but much tidier...

[edit] I just wanted to make the point I'm also interested (& I'm sure there would be a lot of interest) if someone's thinking of coding smiley [edit]
« Last Edit: May 24, 2010, 02:22:11 PM by tomos » Logged

Tom
nudone
Cody's Creator
Columnist
***
Posts: 4,116



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #12 on: May 24, 2010, 02:41:43 PM »

ah right, sorry. but yes. definitely something that is long overdue - fingers crossed someone takes up the challenge.
Logged
skwire
Global Moderator
*****
Posts: 4,119



Another Coding Snack request? Om nom nom...

see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #13 on: May 24, 2010, 03:08:57 PM »

This is easily done.  However, some thoughts as to how to implement it:

1) As an executable that you can pass a filename to.  The user will have to determine how to get and pass the filename.
2) As a slightly more complete application that includes a hotkey and path-getting capabilities.  For this, though, the utility will need to stay running.  Also, there is no one good way to get a filename/path so that's why I like to leave it up to the user (and their computer).

Your thoughts?
Logged

tomos
Charter Member
***
Posts: 8,629



see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #14 on: May 24, 2010, 03:30:09 PM »

1) As an executable that you can pass a filename to.  The user will have to determine how to get and pass the filename.

I'm a bit lost there - I suppose it could probably be done fairly easily with dopus - but if someone is using Explorer?


2) As a slightly more complete application that includes a hotkey and path-getting capabilities.  For this, though, the utility will need to stay running.

I dont see having it running all the time a problem.
- When you say "there is no one good way to get a filename/path so that's why I like to leave it up to the user (and their computer)" do you suspect it wont work for a lot of people; and / or that it would mean it very awkward to code ?
Logged

Tom
skwire
Global Moderator
*****
Posts: 4,119



Another Coding Snack request? Om nom nom...

see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #15 on: May 24, 2010, 04:44:35 PM »

I'm a bit lost there - I suppose it could probably be done fairly easily with dopus - but if someone is using Explorer?

I dont see having it running all the time a problem.
- When you say "there is no one good way to get a filename/path so that's why I like to leave it up to the user (and their computer)" do you suspect it wont work for a lot of people; and / or that it would mean it very awkward to code ?

Well, that's the thing.  People use all sorts of file managers so about the only way to make this universal would be to use the clipboard.  However, some people don't like applications that screw with the clipboard so that's why I wanted to leave this open-ended and let the user handle getting the filepath to the executable.  The actual code to bring up the Open With dialog is easy:

rundll32.exe shell32.dll, OpenAs_RunDLL <filepath>

If I leave it up to the user, they can use the application is any number of applications or scripts.  If I tie it down to one specific way of getting the filepath, its usability is lessened.  Make sense?
Logged

nudone
Cody's Creator
Columnist
***
Posts: 4,116



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #16 on: May 24, 2010, 06:18:36 PM »

my personal preference is to make it as universal as possible. so, it's not tied down to any file manager - i mean, i'd like it to be a global system wide "open with" menu as i'll be using Dopus and the desktop (maybe other file managers too one day).

if that means using the clipboard that's okay by me.

one thing i'd like to add that i think is important: i don't actually trust the built in system "Open With" menu. i think it's too temperamental as i'm sure i've had to tell my system on several occasions which extensions open with what after it's forgotten - again.

so, you could say, i think the default "open with" menu just isn't worth investigating (unless it really is simple to implement).

but, as i'm not the one with the headache of trying to make it work, i'm happy to use whatever can be created.

if i could i'd make it...
1. global, i.e. just works regardless of where and which file manager
2. work with a hotkey
3. work with mouse click (and key hold)
4. have quick key numbers for each program in the list
5. menu only appears when called specifically - otherwise default associated program is run as normal

extras...
6. would be nice to have an easy way to link another program to an extension (even if this just means an .ini file opens up that you manually edit)
7. would be nice if program icons were in the list


thanks for picking this up, skwire.
Logged
skwire
Global Moderator
*****
Posts: 4,119



Another Coding Snack request? Om nom nom...

see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #17 on: May 24, 2010, 10:49:57 PM »

Making the default 'Open With' dialog callable as an executable is a piece of cake.  Honestly, it's one line of code.  I can't modify that 'Open With' dialog so all the custom stuff you want would entail writing something completely from scratch.
Logged

nudone
Cody's Creator
Columnist
***
Posts: 4,116



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #18 on: May 25, 2010, 01:35:44 AM »

i see. could you please try the default "open with" dialog then. anything over the current context menu click, click, click method will be more than enough. (but it would be greatly appreciated if you could go further with the idea one day.)
Logged
skwire
Global Moderator
*****
Posts: 4,119



Another Coding Snack request? Om nom nom...

see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #19 on: May 25, 2010, 02:02:34 AM »

Here you go, OpenWiff (source/binary included): http://skwire.dcmembers.c.../apps/snacks/OpenWiff.zip

For a sample hotkey in AHK, you could use something like this:

Formatted for AutoIt with the GeSHI Syntax Highlighter [copy or print]
  1. F1::
  2. {
  3.    ClipSave := ClipboardAll ; Save the entire clipboard.
  4.    Clipboard := ""          ; Null out clipboard.
  5.    SendInput, ^c            ; Copy to clipboard (assumed to be a filepath).
  6.  
  7.    ; Small amount of error-handling.
  8.    ClipWait, 2            
  9.    If ( Errorlevel != 0 )
  10.    {
  11.        MsgBox, Clipboard timed out.
  12.    }
  13.  
  14.    ; Call the 'Open With' dialog and pass in copied path from above.
  15.    Run, C:\tmp\OpenWiff.exe "%Clipboard%"
  16.  
  17.    Clipboard := ClipSave ; Restore the original clipboard.
  18.    ClipSave  := ""       ; Free memory.
  19. }

Regarding anything custom, I'm wondering if it might be well-suited as a FARR plugin.  Do you use FARR?
« Last Edit: May 25, 2010, 09:19:43 AM by skwire » Logged

nudone
Cody's Creator
Columnist
***
Posts: 4,116



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #20 on: May 25, 2010, 03:12:53 AM »

okay, that's brilliant.

if you could add the feature so that "Always use the selected program to open this kind of file" is automatically deselected when the dialog appears - then i'd say that will be near perfection.



(i just think that problems are likely to occur if people don't realise that "always use..." is selected and they go and click a none default program.)
Logged
skwire
Global Moderator
*****
Posts: 4,119



Another Coding Snack request? Om nom nom...

see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #21 on: May 25, 2010, 03:35:41 AM »

if you could add the feature so that "Always use the selected program to open this kind of file" is automatically deselected when the dialog appears - then i'd say that will be near perfection.

I don't know of any way to do that programatically.  That being said, you could write in some more code into your hotkey that waits for the window, checks the state of that box, and sets it accordingly.  Something like this:

Formatted for AutoIt with the GeSHI Syntax Highlighter [copy or print]
  1. F1::
  2. {
  3.    ClipSave := ClipboardAll ; Save the entire clipboard.
  4.    Clipboard := ""          ; Null out clipboard.
  5.    SendInput, ^c            ; Copy to clipboard (assumed to be a filepath).
  6.  
  7.    ; Small amount of error-handling.
  8.    ClipWait, 2            
  9.    If ( Errorlevel != 0 )
  10.    {
  11.        MsgBox, Clipboard timed out.
  12.        Return
  13.    }
  14.  
  15.    ; Call the 'Open With' dialog and pass in copied path from above.
  16.    Run, C:\tmp\OpenWiff.exe "%Clipboard%"
  17.  
  18.    ; Determine the state of the "Always use the selected program to open
  19.    ; this kind of file" checkbox and uncheck it if it's checked.
  20.    WinWaitActive, Open With
  21.    ControlGet, myState, Checked, , Button2, Open With
  22.    If ( myState = 1 )
  23.    {
  24.        Control, Uncheck, , Button2, Open With
  25.    }
  26.  
  27.    ; Restore the original clipboard and free memory.
  28.    Clipboard := ClipSave
  29.    ClipSave  := ""
  30. }
« Last Edit: May 25, 2010, 09:20:12 AM by skwire » Logged

tomos
Charter Member
***
Posts: 8,629



see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #22 on: May 25, 2010, 03:55:03 AM »

Regarding anything custom, I'm wondering if it might be well-suited as a FARR plugin.  Do you use FARR?

I had thought of mentioning FARR but didnt as the focus here (mine included) was on File managers.
In FARR you would have to search for the file presumably?
or
could it recognise what file is selected in File Manager and work from there - that's asking a lot though I suspect smiley

Love the name btw  ;-)
Logged

Tom
nudone
Cody's Creator
Columnist
***
Posts: 4,116



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #23 on: May 25, 2010, 04:02:37 AM »

thanks for that, skwire. unfortunately it doesn't appear to work.

would it be simpler to just send alt+a to the dialog? i have tried to do that myself already but i've no idea what i'm doing wrong as that doesn't work either - but i assumed that's because i don't really know what i'm doing.
Logged
skwire
Global Moderator
*****
Posts: 4,119



Another Coding Snack request? Om nom nom...

see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #24 on: May 25, 2010, 04:10:39 AM »

thanks for that, skwire. unfortunately it doesn't appear to work.

Could be a Windows 7 thing since it appears to work here.  It could also be that the checkbox under Windows 7 is a different ClassNN than under Windows XP.  It's "Button2" under XP.  Are you able to tell me what it is under Windows 7?  You can use the WindowSpy utility included with a standard AHK install.

would it be simpler to just send alt+a to the dialog?

No, because that would toggle it instead of explicitly setting it to an unchecked state.
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.237s | Server load: 0.22 ]