New games every week!
JSE - Help!!
3rd June 2021  
Over on SoCoder, AndyH asked..

Don't know if this is possible, are you able to capture the F1 key in the text editor and jump to the help with a bookmark for the word the cursor is on eg: #symbol, to bring up that command?


-=-=-

Hmm..
I pondered on that for a while, realising that in order to add such functionality, I'd have to dig through the entire command list help file, ensuring that all commands have an id link, and also including links for all the Alternative Spellings and such.

I thought about how much of a slow and repetitive task that would be.
But also considered that, once done, it would have a few little advantages.
One such major advantage, is I can write a script to scan through both the engine's internal command list, and the help file's command list, and pop out a list of commands I haven't yet included.
DEFINITELY something that's useful.

And it can't really be automated. This is something to sit and work through, progressively, and it's going to take time.

I checked the clock and figured.. What the hey.

It took about 4 hours, in total, to dig through the help file and add little id links to every command.
From there, I went on to tweak the actual site a little bit, and after a long day's work, you can now hit Ctrl+? (hopefully!) to pop up the command list at the right point.

(I couldn't quite get F1 to work successfully in all browsers, and Command+H is the browser's "Hide" button, so that's out of the question, too.)

Have the text cursor be inside a word, or double-click to highlight the word, and then the help file "should" pop up with the correct thing.
It "mostly" works if you click the little Question-icon on the menu, but not always. It currently depends on whether the javascript intercepts before the cursor's position is lost, and as with all things is browser dependent.
But..
Yeah, that was yesterday's secondary task.
Long, repetitive, and dull.
But definitely necessary.

Views 45, Upvotes 1
Jse
New games every week!
Site credits : Jayenkai put all his heart and soul into everything you can see on this site.
(c) Jayenkai 2017 and onwards, site design Rychan. RSS feed
Blog - JSE - Help!! - AGameAWeek