Page 1 of 1
File association - auto open .qxw files
Posted: Mon Dec 02, 2019 1:23 pm
by smadds
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?
Re: File association - auto open .qxw files
Posted: Tue Dec 03, 2019 1:28 am
by mlohrey
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.
Re: File association - auto open .qxw files
Posted: Tue Dec 03, 2019 6:52 am
by Franzi
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.
Re: File association - auto open .qxw files
Posted: Thu Dec 05, 2019 9:30 am
by janosvitok
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?
Re: File association - auto open .qxw files
Posted: Fri Dec 06, 2019 2:45 pm
by Franzi
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.
Re: File association - auto open .qxw files
Posted: Fri Jan 03, 2020 11:48 pm
by janosvitok
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
Re: File association - auto open .qxw files
Posted: Sat Jan 04, 2020 5:29 pm
by pgScorpio
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....
Re: File association - auto open .qxw files
Posted: Fri Jan 17, 2020 4:00 am
by mattallmighty
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:
When I clicked the project file, it opened QLC+, but as a blank project file. Any suggestions?
Re: File association - auto open .qxw files
Posted: Fri Jan 17, 2020 1:04 pm
by janosvitok
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.
Re: File association - auto open .qxw files
Posted: Fri Jan 17, 2020 6:44 pm
by pgScorpio
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:
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"
Re: File association - auto open .qxw files
Posted: Thu Apr 02, 2020 4:47 pm
by sparkyb
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".