GithubHelp home page GithubHelp logo

Comments (19)

fade2gray avatar fade2gray commented on June 14, 2024 3

I use this script when necessary...

; Make sure command has been copied to the clipboard and run this script
Loop, Files,% "C:\Users\" A_UserName "\.vscode\extensions\*", D
    if InStr(A_LoopFilePath, "mark-wiemer.vscode-autohotkey-plus-plus"){
        file := A_LoopFilePath "\snippets\ahk.json"
        Break
    }
FileRead, snippets, %file%
If !InStr(snippets, Clipboard){
    MsgBox, Invalid command.
    ExitApp
}
Run,% "https://www.autohotkey.com/docs/commands/" Clipboard ".htm"

from ahkpp.

mark-wiemer avatar mark-wiemer commented on June 14, 2024 2

Another approach: a "context-sensitive help" script written in AHK: Script Showcase | AutoHotkey

from ahkpp.

FuPeiJiang avatar FuPeiJiang commented on June 14, 2024 2

@fade2gray thank you, I have been using your script until now, I really like how it redirects you to the correct page: "https://www.autohotkey.com/docs/commands/" Clipboard ".htm"
for example: https://www.autohotkey.com/docs/commands/==.htm redirecting you to https://www.autohotkey.com/docs/Variables.htm#equal

how did you find this ? that www.autohotkey.com/docs/commands/ will redirect you
@mark-wiemer thank you, imo this offline version is best, it's also the version of ahk you are using

(I've had issues with using a newer documentation than the AutoHotkey.exe I have installed)

from ahkpp.

mark-wiemer avatar mark-wiemer commented on June 14, 2024 2

Closing this as there is a suitable alternative and no easy way to implement within the extension itself. As always, happy to consider any insights, but I do need to keep the backlog clean :)

from ahkpp.

kyklish avatar kyklish commented on June 14, 2024 2

AHK-Studio implementation. Many edge cases to workaround.

Real magic here: OpenHelpFile("mk:@MSITStore:C:\Program%20Files\AutoHotkey\AutoHotkey.chm::/docs/commands/_" found.1 ".htm"), somehow chm file can be opened on desired page. mk:@MSITStore: info. More info.

For tokens, that have own page in chm file (commands, functions) it is possible make own implementation in AHK++.

@mark-wiemer, please, reopen this issue, I will look at this later.

from ahkpp.

kyklish avatar kyklish commented on June 14, 2024 1

Unfortunately it looks like we'd need to know all the URLs in advance and map them to certain selections (e.g. map "Gui" to "/docs/commands/Gui.htm"). However, there's no easy way to get all the URLs.

I found such list of URLs in other AHK related project. I will post link to it later.

from ahkpp.

CoffeeChaton avatar CoffeeChaton commented on June 14, 2024 1

Unfortunately it looks like we'd need to know all the
URLs in advance and map them to certain selections (e.g. map "Gui" to "/docs/commands/Gui.htm"). However, there's no easy way to get all the URLs.

I found such list of URLs in other AHK related project. I will post link to it later.

Remark: after this pr AutoHotkey/AutoHotkeyDocs#596
The latest offline help file has a very different path from the online help

from ahkpp.

kyklish avatar kyklish commented on June 14, 2024 1

URLs to documentation

from ahkpp.

tdalon avatar tdalon commented on June 14, 2024

Thanks @fade2gray. I have come finally to use your approach. See details here for a bit more optimized implementation.

from ahkpp.

fade2gray avatar fade2gray commented on June 14, 2024

@FuPeiJiang

how did you find this ?

I came up with it after discovering...

ahk_helpdoc_url
.

To be honest, I didn't realize a redirect would be performed which actually makes the rest of the code redundant, just needing

Run,% "https://www.autohotkey.com/docs/commands/" Clipboard ".htm"

But I find it a pity that the search feature, in the included and online documentation, only allows to search for alphanumeric characters.

from ahkpp.

FuPeiJiang avatar FuPeiJiang commented on June 14, 2024

But I find it a pity that the search feature, in the included and online documentation, only allows to search for alphanumeric characters.

wow, it is true, but I never use the search, I use the Index, it seems that Search includes the Index, so Search is better. I should use the Search (it actually works: it searches through everything)
the Search is implemented here(I think) : https://github.com/Lexikos/AutoHotkey_L-Docs/blob/e48d342ae57412d9e35bf43a1dc6ec70fa9f248d/docs/static/content.js#L559

it is weird that search by symbols isn't supported, they must have a reason
why doesn't google support search by symbols ?

from ahkpp.

kyklish avatar kyklish commented on June 14, 2024

Just test it. Internet Explorer opens chm file, but without side panel with index.

Run... -> iexplore.exe mk:@MSITStore:R:\AutoHotkey.chm::/docs/commands/Drive.htm

iexplore_20-45-37-953_P17F

from ahkpp.

mark-wiemer avatar mark-wiemer commented on June 14, 2024

See also docs for HTML help executable (hh.exe)

from ahkpp.

mark-wiemer avatar mark-wiemer commented on June 14, 2024

@kyklish and anyone else looking into this: I'm seeing a lot of Internet Explorer in the code that does work. But I won't accept an Internet Explorer-based solution simply because IE is extremely deprecated. Please try to find a workaround that uses the native hh.exe or even opens the corresponding search page in the user's default browser.

from ahkpp.

mark-wiemer avatar mark-wiemer commented on June 14, 2024

Win+R with hh.exe "C:\Program Files\AutoHotkey\AutoHotkey.chm::/docs/Tutorial.htm" may be what we've been looking for, found via some experimentation and referencing official docs

from ahkpp.

mark-wiemer avatar mark-wiemer commented on June 14, 2024

Unfortunately it looks like we'd need to know all the URLs in advance and map them to certain selections (e.g. map "Gui" to "/docs/commands/Gui.htm"). However, there's no easy way to get all the URLs as they don't follow a perfect naming scheme. Currently AHK-Studio is using some fancy regular expressions to deduce the URLs, so if we could copy this logic into TypeScript we'd be golden.

If there were an easy way to interact with the .chm file in JavaScript to paste a search and choose the first result, that'd be neat.

from ahkpp.

mark-wiemer avatar mark-wiemer commented on June 14, 2024

I did try to decompile the help file, but nothing seemed to happen. We could find the source docs from the repo itself, probably.

from ahkpp.

mark-wiemer avatar mark-wiemer commented on June 14, 2024

Working on this issue in the https://github.com/vscode-autohotkey/ahkpp/tree/help-page branch

from ahkpp.

mark-wiemer avatar mark-wiemer commented on June 14, 2024

Should be possible to copy thqby's quick help code, the only concern is writing tests for it and ensuring that it's fit for purpose. Not a priority currently as I continue work towards v2 support.

from ahkpp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.