File association - auto open .qxw files

Request a feature that you would like to see in QLC+.
Explain in details why you would need it and which is your usage case.
Post Reply
smadds
Posts: 8
Joined: Wed Jul 15, 2015 11:51 pm
Real Name: Simon

It would be much more convenient if we could associate .qxw files with the app and open it by double clicking on a saved file.

I can't think of another program that is unable to do this, so if you have time, Massimo, this would be much appreciated.

Also, maybe a "Recent files" popup if the program is opened without being given a file?
mlohrey
Posts: 243
Joined: Mon Apr 20, 2015 5:07 am
Real Name: Mark Lohrey

What operating system are you using? Files can easily be associated with apps in mac and windows land. Try right clicking the file and choosing open with.

Also, for recent files, click and hold the open file icon (top row, second from left) and you will have a list of recent files.
Franzi
Posts: 32
Joined: Sun Nov 03, 2019 3:35 pm
Real Name: Franziskus Loibl

To assosciate a file extension to an app in windows is not that problem.
The issue is that qlc does not respectthe filename upon startup.
(At least in windows that´s the case)
Maybe Qt isn´t supporting it because of the multi platfrom strategy of the framework - I don´t know.
janosvitok
Posts: 1325
Joined: Mon Apr 13, 2015 7:05 am
Location: Bratislava, Slovakia
Real Name: Jano Svitok
Contact:

Does QLC+ open file properly when you run from another directory: <path to qlcplus>\qlcplus.exe --open "<full path to your qxw file>". for example:
in C:\Users\Admin run C:\QLC+\qlcplus.exe --open "C:\Users\Admin\Desktop\example.qxw"

What is your exact Windows version?
Franzi
Posts: 32
Joined: Sun Nov 03, 2019 3:35 pm
Real Name: Franziskus Loibl

As far as I know, Windows calls the application with "open" not "--open" as a verb/command
Maybe that´s the reason it doesn´work...
I´m using Windows 10.
janosvitok
Posts: 1325
Joined: Mon Apr 13, 2015 7:05 am
Location: Bratislava, Slovakia
Real Name: Jano Svitok
Contact:

In my fresh Windows 10 install the file association is missing. I guess it's because https://github.com/mcallegari/qlcplus/b ... t5.nsi#L21 does not request admin privileges.

According to:
https://stackoverflow.com/questions/552 ... nter-any-e
fix is to either request admin privileges or create per user associations in HKCU/Software/Classes.
I don't have QLC+ dev environment setup anymore, so I can't check whether the fixes work.

Jano
pgScorpio
Posts: 29
Joined: Sun Dec 15, 2019 5:24 pm
Real Name: Peter Goderie

Franzi wrote: Tue Dec 03, 2019 6:52 am To assosciate a file extension to an app in windows is not that problem.
The issue is that qlc does not respectthe filename upon startup.
(At least in windows that´s the case)
That is because QLC+ needs the '-o' command-line parameter before the filename.
See https://www.qlcplus.org/docs/html_en_EN ... eters.html
(@mcallegari: I really think -o should be the default if the first parameter does not start with '-' to make file associations easier.)

So after you made the association QLC starts up but does not open the file because you have to manually add the '-o' to the association.

To do that you will have to run the registry editor:
Type regedit in Search, right click regedit and choose Start as administrator.

In regedit browse to "Computer\HKEY_CLASSES_ROOT\qxw_auto_file\shell\open\command"
Doubleclick the (Default) value (this will show the current value, something like "C:\QLC+\qlcplus.exe" "%1")
Now add "-o" between "....\qlcplus.exe" and "%1" so it looks like "....\qlcplus.exe" -o "%1"
Click OK, close regedit and try clicking a .qxw file again....
:geek: Software is the stuff that makes Hardware flexible ! :lol:
mattallmighty
Posts: 8
Joined: Tue Jan 14, 2020 7:36 am
Real Name: Matt Muller

pgScorpio wrote: Sat Jan 04, 2020 5:29 pm
Franzi wrote: Tue Dec 03, 2019 6:52 am To assosciate a file extension to an app in windows is not that problem.
The issue is that qlc does not respectthe filename upon startup.
(At least in windows that´s the case)
That is because QLC+ needs the '-o' command-line parameter before the filename.
See https://www.qlcplus.org/docs/html_en_EN ... eters.html
(@mcallegari: I really think -o should be the default if the first parameter does not start with '-' to make file associations easier.)

So after you made the association QLC starts up but does not open the file because you have to manually add the '-o' to the association.

To do that you will have to run the registry editor:
Type regedit in Search, right click regedit and choose Start as administrator.

In regedit browse to "Computer\HKEY_CLASSES_ROOT\qxw_auto_file\shell\open\command"
Doubleclick the (Default) value (this will show the current value, something like "C:\QLC+\qlcplus.exe" "%1")
Now add "-o" between "....\qlcplus.exe" and "%1" so it looks like "....\qlcplus.exe" -o "%1"
Click OK, close regedit and try clicking a .qxw file again....
I tried this in Windows 10 - admin user. Right clicked "Registry Editor" as run as admin, Correct directory: C:\QLC+\qlcplus.exe
Value data:

Code: Select all

"C:\QLC+\qlcplus.exe" -o "%1"
When I clicked the project file, it opened QLC+, but as a blank project file. Any suggestions?
janosvitok
Posts: 1325
Joined: Mon Apr 13, 2015 7:05 am
Location: Bratislava, Slovakia
Real Name: Jano Svitok
Contact:

One way to setup association si to create .bat file with the following content and run it as administrator:

Code: Select all

ASSOC .qxw=QLightControllerPlus.Document
FTYPE QLightControllerPlus.Document="C:\QLC+\qlcplus.exe" --open "%%1"

ASSOC .qxf=QLightControllerPlusFixture.Document
FTYPE QLightControllerPlusFixture.Document="C:\QLC+\qlcplus-fixtureeditor.exe" --open "%%1"
Change path of QLC+ as needed.
pgScorpio
Posts: 29
Joined: Sun Dec 15, 2019 5:24 pm
Real Name: Peter Goderie

mattallmighty wrote: Fri Jan 17, 2020 4:00 am I tried this in Windows 10 - admin user. Right clicked "Registry Editor" as run as admin, Correct directory: C:\QLC+\qlcplus.exe
Value data:

Code: Select all

"C:\QLC+\qlcplus.exe" -o "%1"
When I clicked the project file, it opened QLC+, but as a blank project file. Any suggestions?
This might be a known windows 10 issue, which happens sometimes when associating 32bit applications on win64.
In this case it is needed to associate again after changing the registry:
Right click a qxw file, choose open with, select choose another app, select (keep using this app) qlc+ and check "always use this app to open .qxw files". and click ok.
Now it should open the file ok. If so, the next time you double click a qxw it should open ok too.

If not, re-check the registry again as described earlier (did you click OK after changing ?)
If the -o is there you might check
"Computer\HKEY_CLASSES_ROOT\.qxw" and see if (Default) value is indeed "qxw_auto_file"
:geek: Software is the stuff that makes Hardware flexible ! :lol:
sparkyb
Posts: 11
Joined: Fri Apr 17, 2015 11:53 pm
Real Name: Ben Buchwald

Came here to report this issue, but it seems everything I wanted to say has already been said. I work with many people and most of their QLC file associations did not work (would open QLC but not open the file that was double-clicked on). This was on Windows 10. I was able to track down the issue to the same 2 causes that other people mention, both of which I think should be fixed.

1. The installer should request admin privileges so that it can actually install the file associations in HKCR. Right now it is not doing that.
2. When people set up their own associations ("Open with...") they don't work because QLC requires the --open argument before the filename. This is non-standard command-line argument parsing. Any command-line argument that doesn't start with a dash (or wasn't consumed as a parameter to a dashed argument) should be treated as a file to open.

I'm happy to submit a PR for these if I it would be welcome.

Our current workaround is to re-run the installer by right-clicking on it and choosing "Run as Administrator".
Post Reply