Comments (19)
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.
Another approach: a "context-sensitive help" script written in AHK: Script Showcase | AutoHotkey
from ahkpp.
@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.
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.
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.
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.
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.
-
offline help
-
online help, just need to open https://github.com/AutoHotkey/AutoHotkeyDocs/tree/v1
Remark: after this pr AutoHotkey/AutoHotkeyDocs#596
The latest offline help file has a very different path from the online help
from ahkpp.
from ahkpp.
Thanks @fade2gray. I have come finally to use your approach. See details here for a bit more optimized implementation.
from ahkpp.
how did you find this ?
I came up with it after discovering...
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.
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.
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
from ahkpp.
See also docs for HTML help executable (hh.exe)
from ahkpp.
@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.
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.
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.
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.
Working on this issue in the https://github.com/vscode-autohotkey/ahkpp/tree/help-page branch
from ahkpp.
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)
- "Go to definition" using Ctrl + Click jumps to another file opened in editor / or doesn't jump to definition at all within the same file if the file is very long ~10k lines HOT 1
- Wrong indentation when moving line of code out of if-statement HOT 1
- Wrong indentation: press Enter after condition-block in If-statement
- AHK++ is not activating. HOT 11
- "Run" command thinks a V1 script is V2. HOT 4
- Formatter replaces multiple spaces with a single space inside a string HOT 1
- Wrong indentation on copy-paste HOT 6
- How to format code There is no formatter for 'ahk2' files installed. HOT 2
- No format intelicence or formating or colors HOT 4
- Language Switch problems HOT 2
- format code feature changes the number of spaces in a constant string HOT 1
- Debugger takes keyboard focus from active window HOT 1
- The Open AutoHotkey Help command is failing HOT 2
- allow rename variables HOT 1
- Availability as standalone LSP HOT 2
- Shortcut to comment/decomment selected line HOT 3
- Single-line `Hotkey` in fall-through scenario
- Debug won't start HOT 2
- [v2] Can't the v2 version outline be used? Only v1 has an outline? HOT 1
- `Label` inside code block in `Hotkey` code flow breaks `Return` indentation
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ahkpp.