Hi,
We would like to use Fusion 360 protocol to launch and open the software through a browser (Chrome, Firefox, Opera and IE).
We want to enable the feature only if the user has installed Fusion360. How to detect that the protocol is available on each of these browser?
Thanks for your help.
Is this for Windows or Mac or both? And where is your code running that wants to know? In a browser or a desktop app?
Hi,
Thanks for your reply.
It is for Windows. The code runs on the client side (on a browser). The process is the following :
<!DOCTYPE html> <html> <body> file URN or path: <input id='fileinput' type='text'/><br> <button type='button' onclick='window.location.href = "fusion360://command=open&file=" + encodeURIComponent(document.getElementById("fileinput").value)'>Open in Fusion360</button> <button type='button' onclick='window.location.href = "fusion360://command=insert&file=" + encodeURIComponent(document.getElementById("fileinput").value)'>Insert in Fusion360</button> </body> </html>
I would like to detect if fusion360 is installed prior to launch the insert or open command, so far I haven't found any generic solution.
For instance, in case the software is not installed, Opera triggers an error message, Chrome does not do anything.
Do you have a solution?
Thanks for your help,
If you were running from the desktop on Windows there are some registry keys you could check for but running from within a browser is much more difficult because you don't have access to the registry or the file system. I did some searching and apparently there isn't a good way to check for the existence of a protocol handler. I found several possible solutions posted but it seemed like people experienced mixed results when using them. Here are some of the links I found.
http://stackoverflow.com/questions/2872090/how-to-check-if-a-custom-protocol-supported
http://stackoverflow.com/questions/836777/how-to-detect-browsers-protocol-handlers