Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

Smart F1 Sensitive Command Help for any prog language in any editor (updated: 19/09)


  • Please log in to reply
39 replies to this topic
A v i
  • Members
  • 1323 posts
  • Last active: Nov 14 2015 06:56 PM
  • Joined: 30 Jan 2013

Inspired by Rajat's Context Sensitive Help which provides instant help for Ahk in any editor, this is my version.
 
What's more is that there are now 2 more scripts in this series, --

  • Universal Coding Assistant - Provides F1 Help for any programming language in any editor
  • Html+Css Coding Assistant - Provides F1 Help for HTML+CSS in any editor
  • Ahk Coding Assistant - Provides F1 Help for our AHK in any editor and too almost accurately

As the script is presented in a function-oriented form, you can easily swap between prog languages and disable the help when needed
Also note that these scripts don't provide the stereotype word-based help but do smart searching for real keywords and provide help according to them.


  • Put your cursor on the "PID" in the code. You will get the help for Run, not for PID
Run, x, y, z, PID
  • Put your cursor near HTML in the following code. You get help for <strong> not for HTML.
<strong>What if CSS gives more style to HTML hh </strong>

Same is for all languages which you can very easily describe in the Universal Coding Assistant . 

 

P.S.

  • Please note that this is a universal edition and works on all languages and editors. It is definitely possible to make a better/faster script but that will be limited to a single editor and language.
  • For the Universal Edition, please follow the comments inside the script and see the language examples for HTML, CSS and Ahk (If I would have known more languages, I would have added them sad.png )

 

Using Ahk Helper

  • Download the script and run it.
  • Then open your favorite editor and open an autohotkey script in it.
  • Keep the caret (text-insertion cursor) on the keyword and press F1.
  • Autohotkey.chm should show up with the matched keyword active.
  • To change F1 shortcut, edit the configure section in script.

 

Download Universal Helper
Download Ahk Helper
Download Html+Css helper (Also see the following link)

 

 

Download Help chm file for (HTML+CSS)

Please note that the universal helper script requires the help file (chm) of a language to show help through . Search Google to get the file.

The Ahk Helper script will automatically find Autohotkey.chm file from AutoHotkey path.


Now a CS Undergrad. | My WebsiteAutohotkey Scripts | Softwares

Telegram me : @aviaryan


faqbot
  • Members
  • 997 posts
  • Last active:
  • Joined: 10 Apr 2012
Two tips:
1 - You can open a specific page directly - say the Run documenation like so run hh.exe AutoHotkey.chm::/docs/commands/Run.htm - you'll have to build in something to keep track of commands and (other) functions so you can open them correctly.

2 - you can try to read the path of AutoHotkey.chm from the registry HKEY_LOCAL_MACHINE\SOFTWARE\AutoHotkey\InstallDir if that fails you can prompt the user for the location of the CHM file and store it for future use.

A v i
  • Members
  • 1323 posts
  • Last active: Nov 14 2015 06:56 PM
  • Joined: 30 Jan 2013

Two tips:
1 - You can open a specific page directly - say the Run documenation like so run hh.exe AutoHotkey.chm::/docs/commands/Run.htm - you'll have to build in something to keep track of commands and (other) functions so you can open them correctly.

2 - you can try to read the path of AutoHotkey.chm from the registry HKEY_LOCAL_MACHINE\SOFTWARE\AutoHotkey\InstallDir if that fails you can prompt the user for the location of the CHM file and store it for future use.

1. That will be more professional but then it will be harder to implement and I will prefer sticking with the current as there is no + in that idea.

 

2. Good idea. I saw it in Rajat's piece but let it go.


Now a CS Undergrad. | My WebsiteAutohotkey Scripts | Softwares

Telegram me : @aviaryan


A v i
  • Members
  • 1323 posts
  • Last active: Nov 14 2015 06:56 PM
  • Joined: 30 Jan 2013

Updated the script!

  • Added auto-detection of Help file.

Now a CS Undergrad. | My WebsiteAutohotkey Scripts | Softwares

Telegram me : @aviaryan


gunner
  • Members
  • 79 posts
  • Last active: Aug 11 2013 11:18 AM
  • Joined: 05 Jun 2013

thank you for this.

I most often use Notepad , so this is a great life saver for me.



A v i
  • Members
  • 1323 posts
  • Last active: Nov 14 2015 06:56 PM
  • Joined: 30 Jan 2013

thank you for this.

I most often use Notepad , so this is a great life saver for me.

Thanks ! Great you find it useful


Now a CS Undergrad. | My WebsiteAutohotkey Scripts | Softwares

Telegram me : @aviaryan


A v i
  • Members
  • 1323 posts
  • Last active: Nov 14 2015 06:56 PM
  • Joined: 30 Jan 2013

Version updated to 0.4

  • Made even more smarter . Is now better (more correct) than Scite's Help provider.

Edit:

Updated it again after 5 minutes from this post


Now a CS Undergrad. | My WebsiteAutohotkey Scripts | Softwares

Telegram me : @aviaryan


gunner
  • Members
  • 79 posts
  • Last active: Aug 11 2013 11:18 AM
  • Joined: 05 Jun 2013

thank you again. this helps me a lot!



ozzii
  • Members
  • 167 posts
  • Last active: Oct 30 2015 04:54 PM
  • Joined: 23 Mar 2011

I can't understand what this is doing.

I select a word I hit F1 and it just open the help, nothing else.

 

 

EDIT:

 

I also made these changes:

 

 

 

SplitPath, A_AhkPath,, REP

IfNotExist, %REP%\Autohotkey.chm
{
    RegRead, ovar, HKLM, SOFTWARE\AutoHotkey, InstallDir
    if !FileExist(ovar "\Autohotkey.chm")
    {
        FileSelectFile, selfile,,,Select Autohotkey Help file,Autohotkey Help(Autohotkey.chm)
        Helpfile := selfile
    }
    else
        Helpfile := ovar "\Autohotkey.chm"
}
else
    Helpfile = "%REP%\Autohotkey.chm"

 

I think this will be better to add the search of the help like me, from inside the folder where is the autohotkey.exe file.

Normally the file is always here.



A v i
  • Members
  • 1323 posts
  • Last active: Nov 14 2015 06:56 PM
  • Joined: 30 Jan 2013

I can't understand what this is doing.

I select a word I hit F1 and it just open the help, nothing else.

Editor Please ? Also dont select the word, put the cursor anywhere between the word or sentence (like in Scite)

 

 

I think this will be better to add the search of the help like me, from inside the folder where is the autohotkey.exe file.

Normally the file is always here.

Why didnt I thought of that. Thanks... I will add that.


Now a CS Undergrad. | My WebsiteAutohotkey Scripts | Softwares

Telegram me : @aviaryan


ozzii
  • Members
  • 167 posts
  • Last active: Oct 30 2015 04:54 PM
  • Joined: 23 Mar 2011

The Editor is Notepad++

 

I didn't use Scite, this is why I didn't know that.

 

But still, the help is just open with nothing else



A v i
  • Members
  • 1323 posts
  • Last active: Nov 14 2015 06:56 PM
  • Joined: 30 Jan 2013

The Editor is Notepad++

 

I didn't use Scite, this is why I didn't know that.

 

But still, the help is just open with nothing else

I have N++ and as said above, it works fine here. confused.png


Now a CS Undergrad. | My WebsiteAutohotkey Scripts | Softwares

Telegram me : @aviaryan


A v i
  • Members
  • 1323 posts
  • Last active: Nov 14 2015 06:56 PM
  • Joined: 30 Jan 2013

Version updated to 0.6

  • Better Help file searching now. Thanks to ozzi
  • Better detection of commands v/s non-commands

 

@ozzi

Please try the latest version. This is the one I have tested with N++ .


Now a CS Undergrad. | My WebsiteAutohotkey Scripts | Softwares

Telegram me : @aviaryan


ozzii
  • Members
  • 167 posts
  • Last active: Oct 30 2015 04:54 PM
  • Joined: 23 Mar 2011

For me still not working under N++.

Can you do a "debug" version for me for seeing what is wrong.

I'm under a French XP.



A v i
  • Members
  • 1323 posts
  • Last active: Nov 14 2015 06:56 PM
  • Joined: 30 Jan 2013
Send, {Home}+{End}^c{Right}
copiedcode2 := Clipboard
leftofcaret := Substr(copiedcode2, 1, Instr(copiedcode2, copiedcode1, false, 0)-1) 	;leftside

Try the above code in N++

 

line1. Put cursor between H and o of Home and press f1

line2. Put cursor between l and i of Clipboard

line3  Put cursor between n and s of Instr(...)

 

But before this tell me what is the title of Autohotkey Help file that you see in Title Bar.

Is it Autohotkey Help . or something in French


Now a CS Undergrad. | My WebsiteAutohotkey Scripts | Softwares

Telegram me : @aviaryan