Jump to content

(Resolved) Random failure of Help to open examples


vmguy
 Share

Recommended Posts

This has been bugging me for awhile and I finally resolved it.

I use other applications  to search for *.au3 files ( voidtools Search Everything, Scooter Beyond Compare )
R-Click a file and choose "Edit", and SciTE opens the file correctly.

Now press F1 ( Help ), search for some api documentation, and press "Open this script"
and sometimes the script opens in SciTE, and often it fails silently.  What's going on?

I used sysinternals procmon to track it down. The problem is the Examples directory placement in the AutoIt3 directory:

  •  AutoIt3
    AutoIt3.exe
    AutoIt3Help.exe
    AutoIt.chm
    \Examples
  • AutoIt3\SciTE
    SciTE.exe

There is no Examples directory under SciTE, so when SciTE.exe is launched from \SciTE directory it can't find Examples
I even had situations where Help was looking in Windows directory.
I don't know the algorithm for search, but I finally resolved this with an SciTE.bat file
placed in the AutoIt3 directory.  It's tailored to my local install location.

@echo off
start " " /d "C:\Tools\AutoIt3" /b "C:\Tools\AutoIt3\SciTE\SciTE.exe" %*
exit

 

Then I modified this Registry entry so the Edit dialog invokes SciTE.bat,  not SciTE.exe
This sets the current working directory so that directory Examples is directly visible.

Computer\HKEY_CLASSES_ROOT\AutoIt3Script\Shell\Edit\Command
Command: "C:\Tools\AutoIt3\SciTE.bat" "%1"

And now everything (pun intended)  works correctly.
This should probably resolved internally, but I didn't want to wait for a fix.
 

Edited by vmguy
improved SciTE.bat
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...