Hello folks, I'm looking for a program that by using a hotkey and pressing double-click will open a file w/desired app Topic is solved

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
wisenode
Posts: 19
Joined: 05 Apr 2016, 19:17

Hello folks, I'm looking for a program that by using a hotkey and pressing double-click will open a file w/desired app

18 Aug 2018, 11:32

Now let me explain,

Let's say I have a media file (.mov) and I want to open it with Winamp. I would press a series of modifiers Plus the left Mouse button and it will open it with the program associated with that shortcut or hotkey.

I know of the option that you can go and right click and then choose to open with, but those are just too much clicks.

Does anyone know of a software that can mimic something like hotkeys that you can assign to different extensions that will open by your desired key combination the desired file in the desired application.

I'm not a AutoHotkey Savvy programmer but if I was I would to program a piece of software that by pressing set of hotkeys, AutoHotkey will translate that to opening the highlighted file with the associated program.

.MP4 > Press ALT+1+Doubleclick > Play in Winamp.
.MP4 > Press ALT+2+Doubleclick > Open in Adobe premiere.
.MOV > Press ALT+1+Doubleclick > Play in Apple QuickTime.
.MOV > Press ALT+2+Doubleclick > Open in Adobe premiere.
This software will be a gem to all Video-editors and super users that want to operate quickly.

I wish I knew how to make this.
GEV
Posts: 1002
Joined: 25 Feb 2014, 00:50

Re: Hello folks, I'm looking for a program that by using a hotkey and pressing double-click will open a file w/desired a  Topic is solved

18 Aug 2018, 13:30

Click on the file in explorer after pressing and holding LAlt+1 or LAlt+2 to open it in the desired program:

Code: Select all

#NoEnv
#SingleInstance Force

LAlt & 1:: ALT_1 := true ; assign the Boolean value "true" to the variable ALT_1
LAlt & 1 Up:: ALT_1 := false

LAlt & 2:: ALT_2 := true
LAlt & 2 Up:: ALT_2 := false

#If ((WinActive("ahk_class CabinetWClass")) && ((ALT_1) || (ALT_2)))   ; "&&" means "AND"  and  "||" means "OR"

	~*LButton Up::
		ClipSaved := ClipboardAll       ; save the entire clipboard to the variable ClipSaved
		clipboard := ""                 ; empty the clipboard (start off empty to allow ClipWait to detect when the text has arrived)
		Send, ^c                        ; copy the selected file
		ClipWait, 1                     ; wait for the clipboard to contain data. 
		if (!ErrorLevel)                ; If NOT ErrorLevel clipwait found data on the clipboard
		{
			; MsgBox, "%clipboard%"       ; display the path
			; separate the copied file's path into its name, directory, extension, and drive
			SplitPath, clipboard, name, dir, ext, name_no_ext, drive
			If ext not in mp4,mov
			{
				MsgBox, No media file selected
				clipboard := ClipSaved      ; restore original clipboard
					return
			}
			; otherwise:
			If (ALT_1)
			{
				If  (ext = "mp4")
					Run, "path of winamp.exe" "%clipboard%"
				else
				If  (ext = "mov") 
					Run, "path of QuickTime.exe" "%clipboard%"
			}
			else
			If ((ALT_2) && ((ext = "mp4") || (ext = "mov")))
					Run, "path of premiere.exe" "%clipboard%"
		}
		else
			MsgBox, No file selected
		Sleep, 300	
		clipboard := ClipSaved       ; restore original clipboard
		ALT_1 := false
		ALT_2 := false
	return

#If ; turn off context sensitivity
Relace "path of QuickTime.exe" etc with the executable's path.
wisenode
Posts: 19
Joined: 05 Apr 2016, 19:17

Re: Hello folks, I'm looking for a program that by using a hotkey and pressing double-click will open a file w/desired a

19 Aug 2018, 01:58

I can't, even remotely, express my thank-you's to you. You are a GENIUS and above all a wonderful helping hand. Thank you SO MUCH GEV!

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: peter_ahk, Spawnova, toddhere, USS_Sandhu and 318 guests