Author Topic: Help does not work from inside Photo Mechanic  (Read 5270 times)

Offline jwvaughn

  • Full Member
  • ***
  • Posts: 143
  • Retired programmer
    • View Profile
Help does not work from inside Photo Mechanic
« on: March 06, 2009, 09:29:27 PM »
I thought I had better start this in a thread of it's own rather than continuing as an add-on in another thread.

I'm using FireFox v2 with XP Pro SP3 and PM 4.6 on both my laptop and desktop. Both have the problem of clicking on help, no errors, just busy for bit an then nothing.

The Forums work fine from within Photo Mechanic.

Help opens fine from Start\Programs\Photo Mechanic 4.6\Photo Mechanic Help or using the URL file:///C:/Program%20Files/Camera%20Bits/Photo%20Mechanic%204.6/Help/index.html

I believe this has existed at least version 4.5 of Photo Mechanic and perhaps earlier.

Jerry

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 24817
    • View Profile
    • Camera Bits, Inc.
Re: Help does not work from inside Photo Mechanic
« Reply #1 on: March 06, 2009, 10:16:07 PM »
Jerry,

I thought I had better start this in a thread of it's own rather than continuing as an add-on in another thread.

I'm using FireFox v2 with XP Pro SP3 and PM 4.6 on both my laptop and desktop. Both have the problem of clicking on help, no errors, just busy for bit an then nothing.

The Forums work fine from within Photo Mechanic.

Help opens fine from Start\Programs\Photo Mechanic 4.6\Photo Mechanic Help or using the URL file:///C:/Program%20Files/Camera%20Bits/Photo%20Mechanic%204.6/Help/index.html

I believe this has existed at least version 4.5 of Photo Mechanic and perhaps earlier.

The test version I gave you launches the help with same URL (the file:/// one) and for some unknown reason fails to open.  We don't have a single system at our disposal that exhibits the problem.  I don't know how I can improve the code any better.  It's pretty simple code:

::ShellExecute(NULL, _T("open"), filePath, NULL, NULL, SW_SHOWNORMAL);

Where filePath evaluates to "file:///C:/Program%20Files/Camera%20Bits/Photo%20Mechanic%204.6/Help/index.html"

The only thing I can think of that might be causing this problem is that FireFox is refusing to browse local content when run from something other than the OS itself.  That would explain why you hear some activity and then it stops (FireFox is likely loading a new instance of the browser and then deciding not to load it and then quitting.)  There is something called the Mark Of The Web (MOTW) that can be added to local HTML files to cause them to be loaded with the same restrictions as internet accessed content.  All documentation that I have found indicates that this is an Internet Explorer feature, but I suppose that the FireFox/Mozilla team may have adopted it for their Windows versions of FireFox.

So if you could add the following line of text to your index.html file (located at the location specified by the URL above) and then give it a try, it may work:
<!-- saved from url=(0014)about:internet -->

You would add it so the first few lines would end up looking like this:

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<!-- saved from url=(0014)about:internet -->
<html>
...

Let me know if that works.

-Kirk


Offline jwvaughn

  • Full Member
  • ***
  • Posts: 143
  • Retired programmer
    • View Profile
Re: Help does not work from inside Photo Mechanic
« Reply #2 on: March 10, 2009, 01:37:08 PM »
Hi Kirk,

I inserted the code on the laptop and no change.  I do need to try it on the desktop since firefox is running in a vanilla state on it while the laptop has some add-ons to lock it down since it get used on unsecure networks.

Since you have provided the mechanism for the call, I will futz around with my own testing to see if I can figure out if it is a firefox problem.

More later...
Jerry

Offline jwvaughn

  • Full Member
  • ***
  • Posts: 143
  • Retired programmer
    • View Profile
Re: Help does not work from inside Photo Mechanic
« Reply #3 on: March 10, 2009, 10:13:59 PM »
Well, no luck on the desk top either with FireFox.  I then changed the default browser to IE and still nothing. 

So, I then wrote a short C program using your code as a guide and that also did not work with either browser.  Just be sure the code was good, I tried the same program but supplied a path to a .txt file and it open the text file in the default application.

A final stumper is that the when passing the file to a browser, the ShellExecute returned a code of 42 which I think means it was successful.

It would appear that the problem does not lie with Photo Mechanic but something screwy with Windows and html.  I will play some more to see if I can come up with anything useful.

Thanks for the help Kirk,

Jerry

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 24817
    • View Profile
    • Camera Bits, Inc.
Re: Help does not work from inside Photo Mechanic
« Reply #4 on: March 10, 2009, 11:05:45 PM »
Jerry,

Well, no luck on the desk top either with FireFox.  I then changed the default browser to IE and still nothing. 

So, I then wrote a short C program using your code as a guide and that also did not work with either browser.  Just be sure the code was good, I tried the same program but supplied a path to a .txt file and it open the text file in the default application.

A final stumper is that the when passing the file to a browser, the ShellExecute returned a code of 42 which I think means it was successful.

It would appear that the problem does not lie with Photo Mechanic but something screwy with Windows and html.  I will play some more to see if I can come up with anything useful.

That's what I expected since the internal help files come up fine for most folks.  If you ever find a workaround please let me know.  I'll give you a free upgrade if you can solve it!

Thanks,

-Kirk

Offline jwvaughn

  • Full Member
  • ***
  • Posts: 143
  • Retired programmer
    • View Profile
Re: Help does not work from inside Photo Mechanic
« Reply #5 on: March 11, 2009, 09:08:42 AM »

I'll give you a free upgrade if you can solve it!

Thanks,

-Kirk


I can't resist a challenge  :D

Jerry

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 24817
    • View Profile
    • Camera Bits, Inc.
Re: Help does not work from inside Photo Mechanic
« Reply #6 on: March 14, 2009, 05:34:31 PM »

I'll give you a free upgrade if you can solve it!

I can't resist a challenge  :D

Thanks to Jerry, this problem is now fixed.  The latest 4.6.1 beta available in the Announcements section fixes this problem.

-Kirk