Indigo Rose Software

Professional Software Development Tools

 
Page 1 of 2 1 2 LastLast
Results 1 to 15 of 26
  1. #1
    Join Date
    Mar 2007
    Location
    South Australia
    Posts
    12

    Opening a HTML Workshop File

    Hi,

    I've created a .chm file (HTML Workshop File) and I'm having problems with it when I have built my program. I've searched these forums and found some help which was great as I wasn't putting the hh.exe bit in front of the sourcefolder.

    When I "Preview" the page within AMS and click on my help button it loads fine. But when I build the program and click on my help button it doesn't come up. This is the error message I am receiving:

    Cannot open the file:
    c:\DOCUME~1\Tara\LOCALS~1\Temp\ir_ext_temp_2\Autop lay\Docs\filename.chm


    This is the code I have entered in my program:

    File.Run("hh.exe ".._SourceFolder.."\\Autoplay\\Docs\\filename.chm" , "", "", SW_SHOWNORMAL, false);


    After sourcing some other help on the forum I also tried putting the working folder with c:\\temp and tempfolder - with value changed to true. None of these worked either.

    I also wondered if the space after .exe and before " shouldn't be there (i.e. "hh.exe ") so I took it out and tried that too. When I took out the space after .exe nothing happened at all when I clicked on the Help button. I didn't get an error message and nothing happend.

    I really feel like I'm running around in circles and have no idea what I am doing wrong. I'm most probably missing the obvious!!

    Would really appreciate your help. Thank you!

    Tara.

  2. #2
    Join Date
    Nov 2003
    Location
    Myrtle Beach, SC
    Posts
    155
    It looks like this is the issue that occurs when you compile your app to a single file. See if the 2nd post on this page helps: _SourceFolder Enhancement

    Also, the help file path (*.chm) needs to be the second argument in your File.Run command.

  3. #3
    Join Date
    Apr 2004
    Location
    Vancouver, Canada
    Posts
    1,790
    I always use this if I want to open the help file at the begining.
    Code:
    File.Open(_SourceFolder.."\\Autoplay\\Docs\\filename.chm", _SourceFolder.."\\Autoplay\\Docs", SW_SHOWNORMAL)
    and this if I want to open it and jump to a topic.

    Code:
    TopicID = 100
    File.Run("HH.EXE  -mapid "..TopicID.." ms-its:".._SourceFolder.."\\Autoplay\\Docs\\filename.chm", "", _SourceFolder.."\\Autoplay\\Docs", , SW_MAXIMIZE, false);
    I haven't had a single problem with 100's of installations.
    Dermot

    I am so out of here

  4. #4
    Join Date
    Nov 2003
    Location
    Myrtle Beach, SC
    Posts
    155
    That TopicID tip is GREAT.

    Thanks.

    I think he still needs to get the source folder with the mentioned function, though.

  5. #5
    Join Date
    Apr 2004
    Location
    Vancouver, Canada
    Posts
    1,790
    That function would return the path where the exe was run from. If his help file is compiled in the exe then _SourceFolder is all he needs.

    Just realized that he did not specify how is was building it, as an exe or to a folder. If it is a to a folder, the problem could be renaming resources.
    Last edited by Dermot; 04-24-2007 at 11:14 PM.
    Dermot

    I am so out of here

  6. #6
    Join Date
    Mar 2007
    Location
    South Australia
    Posts
    12
    Thank you very much for your speedy replies!!!

    I'm still experiencing the same problem :(

    I did what you suggested and put in a File.Open command only. This is what I originally had but changed it because it wasn't working. Same prob as last time. When I preview from ams it's opening the help file fine. But when I build and try and open the help file nothing happens at all - almost as if there isn't a link. I no longer get the error message as explained previously when I use the File.Open command. Given that I only want to open to the beginning of the help file this command is okay for me

    What I am doing is building as a web exe file - single file.

    Any other theories? Thank you so much!

  7. #7
    Join Date
    Mar 2007
    Location
    South Australia
    Posts
    12
    Thank you for your reply CyberRBT.

    I had a look at that post you suggested:

    It looks like this is the issue that occurs when you compile your app to a single file. See if the 2nd post on this page helps: _SourceFolder Enhancement

    But it refers to a CD which is what I'm not doing.... should I still be putting this code into my program?

    If yes, where do I insert the code? All the rest is under "On Menu" - so should I add it to the top of all the code that I have already placed or below it?

    Sorry for my ignorance - I'm new to all of this Thankyou!

  8. #8
    Join Date
    Nov 2003
    Location
    Myrtle Beach, SC
    Posts
    155
    When you compile to a single EXE, it doesn't matter whether you run your app from CD or from elsewhere on your computer. The project is actually expanded and stored in the Temp folder.

    Doing this causes the usual _SourceFolder constant to fail. So ... using the function in that post, do this.

    Code:
    _MySourceFolder = appPathOriginal();


    Now, use _MySourceFolder where you were using _SourceFolder. Note, however, that this function ADDS the trailing backslash for you (omit the \\ from the start of your next string concatenation).

    Also, once you get past this hurdle, i think you'll find that Dermot's tip will enhance your results even more.

  9. #9
    Join Date
    Apr 2004
    Location
    Vancouver, Canada
    Posts
    1,790
    Code:
    File.Open(_SourceFolder.."\\Autoplay\\Docs\\filename.chm", _SourceFolder.."\\Autoplay\\Docs", SW_SHOWNORMAL)
    This works fine for me when I build to an exe. Can you post your app or an example showing the problem?

    If the help file is compiled into the exe, which it will if you have it in the Docs folder, you do not need the function CyberRBT mentioned. You would only need that function if the help file is outside the exe and located in the same folder as the exe.

    Doing this causes the usual _SourceFolder constant to fail. So ... using the function in that post, do this.
    I don't think so. _SourceFolder returns the path to where the autorun.exe file is running from after it is expanded to the Temp folder.
    Last edited by Dermot; 04-25-2007 at 12:04 AM.
    Dermot

    I am so out of here

  10. #10
    Join Date
    Apr 2004
    Location
    Vancouver, Canada
    Posts
    1,790
    Here is an example that uses the code I posted above. Build it to an exe and you will see it works using _SourceFolder.
    Last edited by Dermot; 11-14-2009 at 09:33 PM.
    Dermot

    I am so out of here

  11. #11
    Join Date
    Mar 2007
    Location
    South Australia
    Posts
    12
    Thank you once again

    Well, I'm quite perplexed!!!

    Dermot, I decided to quickly create a new little project doing exactly the same thing - my other project is way too large, plus I wanted to see what would happen if I did it again in a new project from scratch.

    Amazingly it worked!!!! Thought there was no point in uploading that little project

    So it must be the file / project I am currently working with. :(

  12. #12
    Join Date
    Mar 2007
    Location
    South Australia
    Posts
    12
    PS: Forgot to say that I did exactly the same thing. Created a menu - same File.Open command... and I built it the same way too. Funny hey?! :(

    I opened your file Dermot and I know what you mean because the new project that I created I followed the same principles and it worked fine.

    I exported my menu script but didn't know if I could post .lua files? And not sure where I post files?

    Actually, just found where I post attachments, but not I cannot post .lua
    Last edited by sossy; 04-25-2007 at 12:44 AM.

  13. #13
    Join Date
    Mar 2007
    Location
    South Australia
    Posts
    12
    Apologies for all the posts!!

    I did a little test. Replaced the Help file (.chm) with an HTML file, then a Word file, then a PDF file. All of the other files worked fine when I did a build and opened them. It's only the .chm Help file which isn't opening upon build. I left the same exact code, just replaced the file to open.

    Does this help a little more?

  14. #14
    Join Date
    Apr 2004
    Location
    Vancouver, Canada
    Posts
    1,790
    There must be something different about your project.

    To upload a project, use the Export option on the File menu to save it as an apz file. Then upload that file.

    If you want to just post some code, just copy and paste into the post.
    Dermot

    I am so out of here

  15. #15
    Join Date
    Apr 2004
    Location
    Vancouver, Canada
    Posts
    1,790
    I did a little test. Replaced the Help file (.chm) with an HTML file, then a Word file, then a PDF file. All of the other files worked fine when I did a build and opened them. It's only the .chm Help file which isn't opening upon build. I left the same exact code, just replaced the file to open.

    Does this help a little more?
    Well that is strange. Could it be that the chm file is not being compiled into the exe? How large is the file? If you look in the temp folder (Something like this C:\Documents and Settings\Username\Local Settings\Temp\ir_ext_temp_0) and see if the chm file is in the Docs folder.
    Dermot

    I am so out of here

Page 1 of 2 1 2 LastLast

Similar Threads

  1. Best way to share custom buttons with the group?
    By mwreyf1 in forum AutoPlay Media Studio 6.0
    Replies: 10
    Last Post: 04-28-2010, 01:29 PM
  2. How to insert bullet in a paragraph object
    By jrak in forum AutoPlay Media Studio 6.0
    Replies: 13
    Last Post: 12-29-2005, 10:53 AM
  3. HOWTO: Open an HTML Help File to a Specific Topic
    By Support in forum AutoPlay Media Studio 4.0 Examples
    Replies: 0
    Last Post: 10-01-2002, 02:24 PM
  4. Replies: 0
    Last Post: 08-17-2000, 02:29 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts