Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
assign file extension to a certain application
#1
Is there a way to associate an application to a file extension.
For example ".txt" associated with 'Notepad++' (Every time a .txt get's double clicked, it will be opened with 'Notepad++'

I now have a rather long macro that does through the GUI, (right click on file, open "Properties", click button "Change..." , etc...).
I tried to find a more direct way through commandline, but I could not find a way.

Can QM handle this?
#2
Look in the file category.
file.FileTypeRegister and other similar functions.
#3
wow!
Didn't know about that!!!
Thank you, this will cut down my macro size!!!

Thank you!!!!!
#4
Sorry to kick this topic up but in windows 7 this worked perfectly.
Recently I moved to windows 10 and the function generates an error, I used the F1 example of FileTypeRegister to try it in it's most basic form but it errors at the FileTypeRegister command:

Macro Macro40
Code:
Copy      Help
FileTypeRegister "vig" "vigfile" "Vig File" "shell32.dll,20" "notepad.exe ''%1''"

str s="test"
s.setfile("$desktop$\test.vig")
run "$desktop$\test.vig"


Also tried

Macro Macro40
Code:
Copy      Help
FileTypeRegister "vig" "vigfile" "Vig File" "d:\npp\notepad++.exe" "d:\npp\notepad++.exe ''%1''"

str s="test"
s.setfile("$desktop$\test.vig")
run "$desktop$\test.vig"
#5
first example worked no problem for me on win10

second example had to change slightly to get it to work

Code:
Copy      Help
FileTypeRegister "vig" "vigfile" "Vig File" "C:\Program Files\Notepad++\notepad++.exe" "notepad++.exe ''%1''"
str s="test"
s.setfile("$desktop$\test.vig")
run "$desktop$\test.vig"
#6
Macro Macro7
Code:
Copy      Help
;/exe 2
FileTypeRegister "vig" "vigfile" "Vig File" "shell32.dll,20" "notepad.exe ''%1''"

;BEGIN PROJECT
;END PROJECT
#7
@Kevin and Gintaras,

thanks!


Forum Jump:


Users browsing this thread: 2 Guest(s)