Sign in to follow this  
Followers 0
clevername47

AutoIt Help + SciTE Enhancement

2 posts in this topic

I wanted to make AutoIt's help file integrate more seamlessly with editing scripts in SciTE. I figured out that the program KeyHH.exe is called with some arguments telling it which link to jump to in the help file.

So I made a script named KeyHH.au3, compiled it, renamed the original KeyHH.exe to _KeyHH.exe and placed my version of KeyHH.exe in the AutoIt directory. Here's the contents of KeyHH.au3:

Func escpressed()
    WinClose("AutoIt Help")
EndFunc

Run("_KeyHH.exe "&$CmdLineRaw)
WinWaitActive("AutoIt Help")
HotKeySet("{ESC}","escpressed")
WinSetState("F:\auto\","",@SW_RESTORE)
WinMove("F:\auto\","",0,333,1280,638)
WinSetState("AutoIt Help","",@SW_RESTORE)
WinMove("AutoIt Help","",0,0,1280,333)
$p=MouseGetPos()
If $p[1]>332 Then
    WinActivate("F:\auto\")
Else
    WinActivate("AutoIt Help")
    $p=MouseGetPos()
    If $p[0]>261 And $p[1]>66 And $p[0]<1255 And $p[1]<325 Then MouseClick("left")
EndIf
WinWaitClose("AutoIt Help")
WinSetState("F:\auto\","",@SW_MAXIMIZE)
WinActivate("F:\auto\")
I used "F:\auto\" as the window title for SciTE because all my script files are in that directory. You may want to set the WindowTitleMatchMode option to 2 and use something like " - SciTE" to match your SciTE window title.

I wrote this script for 1280x1024 resolution and a taskbar with 2 rows. You can easily change the coordinates yourself - I used the AutoIt Window Info tool to get them.

This script does a number of things:

-Once the help file is open, it resizes the help file to take up approximately the top third of the screen and puts SciTE in the rest.

-Then it activates whichever of the two windows your mouse cursor is over, and if your mouse cursor is in the viewing area of the help window, it clicks the mouse so that the wheel will make the viewing area scroll.

-It also makes Esc close the help window - it doesn't matter which window is active, it still works.

-It waits for the help window to close, and maximizes SciTE when it is gone.

Share this post


Link to post
Share on other sites



Oops, I meant to post this in the script snippets section.

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