Sign in to follow this  
Followers 0
BobHansen

\autoit3\extra\editors\textpad Issues

10 posts in this topic

#1 ·  Posted (edited)

I just installed AutoIt3, no problems.

=================

Configuring TextPad (4.7.2) for use with AutoIt3:

Created Class and File Filters in TextPad

Installed TextPad Syntax file for AutoIt version 1.

Created Tool in TextPad to run current script.

Discovered Extra\Editors\TextPad tools under AutoIt. B)

Installed newer syntax file and Clip Library using "_install_syntax_files.au3"

Discovered inconvenience #1:

My default paths for Syntax and Class Libraries had previously been modified.

The au3 script appears to write to the registry directly vs. checking for User Defined path. I was able to move the files to the folders where I wanted them, but think it would be better if a check was done to use User Define Paths for these two files. Classify this as an inconvenience vs. a bug. Suggestion for future enhancement.

===================

Installed KeyHH and tried to create Tool for Selected Sensitive Help.

Ran into problem #1: No KeyHH.exe file

Downloaded KeyHH from their site, and installed.

Instructions call to use KeyHH.exe, but no such file exists. What I do get is KeyHH.its which I copied to the C:\Program Files\AutoIt3 folder. I entered KeyHH.its vs. KeyHH.exe as the Command.

I entered -#klink $SelWord "C:\Program Files\Autoit3\AutoIt.chm" for the parameter.

I cleared out Initial Folder setting of $FileDir

I selected a command in the au3 file, activated the tool, and my browser opened but came back with message "This Page Cannot Be Displayed". The URL only shows http://./ :whistle:

Is there a step missing to convert KeyHH.its to KeyHH.exe? Have they changed their file content? What do I need to do to use this? This one is not an inconvenience, it is an instructional bug at this point.

(I thought I saw a reference to a Help file for KeyHH, but cannot find it.....it maybe was an MSDN file at time of HHKey installation....may have to reinstall to find it again).

Thanks for your help.....

PS - Am crossposting this on TextPad Forum also.

Edited by BobHansen

Hope this was helpful.............good luck, Bob

Share this post


Link to post
Share on other sites



Thanks JdeB.

CyberSlug already got me to that point on the TextPad Forum. This was my response to him:

=============================

Thanks CyberSlug

I should have done a Find for KeyHH.exe. Like yours, I found it in the Windows folder. Changed the command line in Tools, and it works fine. B):angry:

Did not have to move it to the AutoIt folder since it is already in the Path.

:whistle: Perhaps the install instructions should be modified slightly to help others in the future?

Thanks again for your help, looking forward to this new tool......


Hope this was helpful.............good luck, Bob

Share this post


Link to post
Share on other sites

My default paths for Syntax and Class Libraries had previously been modified. 

The au3 script appears to write to the registry directly vs. checking for User Defined path.  I was able to move the files to the folders where I wanted them, but think it would be better if a check was done to use User Define Paths for these two files.  Classify this as an inconvenience vs. a bug.  Suggestion for future enhancement.

Hmm, anyone know how to get the location of the syntax directories in a more reliable way. I didn't see any obvious keys.

Share this post


Link to post
Share on other sites

Hmm, anyone know how to get the location of the syntax directories in a more reliable way.  I didn't see any obvious keys.

Jon, it looks like they are stored in HKCU\Software\Helios\TextPad4\Folders, but the will only be listed IF the user has changed them from the default. I hadn't changed them and no values were in that key. I then changed one and it then created values for all the various ones. Some have no data, though, which I assume means use the default.

Share this post


Link to post
Share on other sites

Since I brought this up as a new user, I haven't trried any scripts yet.

But I thought I should also do some research. I intend to be a contributor here, not just take info away.

I checked my settings and found the same as Valik pointed out:

HKEY_CURRENT_USER\Software\Helios\TextPad 4\Folders has the paths. They are all blank except those that have been changed in Preferences. I confirmed this on three different systems, WIN95, WIN98SE, WIN98ME.

So I surmise that the solution will turn out to be a combination of RegRead and If statements. Will need a loop to check all seven Folder options that are not blank. Would this be a good use of an array to set up the names of the seven option key names? Hmmmm, not this time. Only need to look at Syntax and Clip Library values, much easier. (Sorry, kind of thinking out loud right now, trying to address this with tools that I need to learn).

Will let one of you long time users address this right now, but look over your shoulder, I will be with you soon..... :whistle:


Hope this was helpful.............good luck, Bob

Share this post


Link to post
Share on other sites

OK, I have just finished my first venture with AutoIt3.

I have made some modifications to the file "_install_syntax_files.au3" to check for User Defined paths for Syntax and Clip Library folders. My new lines are shown below in Bold Red. Existing lines that I modified are shown below in Bold Blue

$answer = MsgBox(4, "TextPad v4", "This script will attempt to automatically install syntax highlighting and clip library files for TextPad v4.  Run?")

If $answer = 7 Then Exit

 

;Get User Defined folders for Syntax and Clip Libraries

$SyntaxFolder = RegRead("HKEY_CURRENT_USER\Software\Helios\TextPad 4\Folders","Syntax")

$ClipLibraryFolder = RegRead("HKEY_CURRENT_USER\Software\Helios\TextPad 4\Folders","ClipLibrary")

; Find and verify the installation directory

$installdirTP = @ProgramFilesDir & "\TextPad 4\"

$installdir = $installdirTP & "system"

; Check that the directory exists

If Not FileExists($installdir) Then Error()

If $SyntaxFolder <>"" then $installdir = $SyntaxFolder

If Not FileCopy("autoit_v3.syn", $installdir, 1) Then Error()

If $ClipLibraryFolder <>"" then $installdir = $ClipLibraryFolder

If Not FileCopy("autoit_v3.tcl", $installdir, 1) Then Error()

...

...

...

;====modification on next line corrects error in original code=========

; value of $answer was carried over from earlier question to Run.

$answer = MsgBox(4096+4, "TextPad v4", "Installation complete!" & @LF & @LF & "Do you want to make it the default editor for AutoItV3 scripts ?")

If $answer = 7 Then Exit

RegWrite("HKEY_CLASSES_ROOT\AutoIt3Script\Shell\Edit\Command", "", "REG_SZ", '"' & $installdirTP & 'TextPad.exe" %1')

; End of script

I did find that if the User Defined Folder is changed back to the initial default value, that the Registry setting does not return to "", it now has the string for the default value: C:\PROGRAM FILES\TEXTPAD 4\User. But I think that the changes that I made above handle that also, should not be a problem.

Again, this is my first attempt with AutoIt3, so I will appreciate all feedback, hopefully with explanation of my errors. Thanks for the opportunity to learn and to contribute.


Hope this was helpful.............good luck, Bob

Share this post


Link to post
Share on other sites

Update regarding context sensitive help in TextPad ... :whistle:

You don't have to do the KeyHH anymore. I recently upgraded to TP 4.7.2 and discovered an easier way:

Textpad Menu: Configure \ Preferences \ Tools \ Add \ Online Help File \ <Select your AutoIt.chm file>

Then assign a hotkey to this tool .. I use Alt+F2.

Now just click on an Autoit function in a script that you have open in Textpad, press your hotkey .. and .. Bob's your uncle!

B)

Share this post


Link to post
Share on other sites

Thanks trids, but something is missing. Not totally working for me.

Almost there......Help opens, selected word is in the Index field to look for, but does not open to that page. Still need to scrill through the list to the function needing help.

Question about KeyHH, I was under the understanding that it provides more resources and/or overcomes some issues with the normal HTML Help program. It seems that those extra features will be lost if I call the chm file directly? What exactly will that loss be, how will I be affected?


Hope this was helpful.............good luck, Bob

Share this post


Link to post
Share on other sites

As far as I understand it, you're not calling the CHM directly .. you're using your system's association with CHM (hh.exe, until you use keyHH.exe). And keyHH.exe helps to fill in gaps which once were left by TextPad in its support of CHM files.

But since TP added the "Online Help File"option for a new tool, you don't need keyHH.exe anymore - for these purposes. If you're seriously into Windows Help, then I think Jos will be able to tell you more about when keyHH.exe is a better option. Bottom line for TP is: 4.7.2 (and possibly earlier versions which I might have missed :whistle: ) has full support for CHM, using the bog-standard hh.exe

As for the CHM opening in the wrong place .. this is a Microsoft feature B) .. No, seriously, all you have to do is select the Contents tab in the displayed help, then close the help and try your TP hotkey again.

Looks like it remembers what tab you were on when it last closed (and probably defaults to Index for new CHMs?)

HTH

Share this post


Link to post
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
Sign in to follow this  
Followers 0