Jump to content

F1 in Scite when script unsaved ?


Recommended Posts

@Jos Hello :)
While typing a new AutoIt script in Scite-Lite, when I need explanations about a keyword, F1 never opens the AutoIt help file when the script is unsaved.

I just read your answer concerning this matter in this thread from 2019, where you explained this behavior.
I also found a post from 2009 where user eltorro indicated a possible way to have F1 working on unsaved scripts. In his own words :

If you want it to open [i.e. AutoIt help file] you can open SciTE user property file and add the following lines :

command.help.*=$(autoit3dir)\Autoit3Help.exe $(CurrentWord)
command.help.subsystem.*=2

I just tested this and added these 2 lines in my SciTEUser.properties file, it works fine now.
That's all, I just wanted to let you know this, in case you have comments to share about this way of solving it.
Thanks !

PS: If it may help, I use Scite only for .au3 files

Link to post
Share on other sites
  • Developers

True, but that means that the AutoIt3 helpfile will be opened for ALL languages, which is not something I would want.
EG: test.lua really should open the lua help. ;) 

 

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to post
Share on other sites
16 hours ago, Jos said:

EG: test.lua really should open the lua help. ;) 

I like it when you often end your posts with that friendly emoji

As I'm always curious, I tried something else after reading some documentation. The following lines seem to do it better as it opens AutoIt help file for .au3 files (already saved) OR unsaved files (named Untitled* in Scite Tab) ...

#Commands for F1 Help (.au3 or unsaved)
command.help.$(file.patterns.au3)=$(CurrentWord)!$(autoit3dir)\AutoIt.chm
command.help.subsystem.$(file.patterns.au3)=4

...but if we were modifying a file named "test.txt" or "test.lua", then F1 won't open anything (on my computer where lua isn't present as I use the basic SciteLite found in AutoIt package)

I remember having read yesterday a discussion between argumentum and you, concerning AutoIt3Help.exe, which was used in my preceding (now obsolete) post. As I didn't keep the url of this discussion (grr...) then I just googled on this :

autoit jos argumentum AutoIt3Help.exe

Bingo, your discussion is found in this thread, where you (Jos) wrote :

AutoIt3Help is used to open the helpfile on the correct topic but nothing more than that.

It seems that the syntax indicated in the current post (which bypass AutoIt3Help.exe) does exactly the same as it opens the helpfile on the correct topic.

This is because the "Command subsystem 4" for windows does the job, as it's a "Two part command separated by ! with the first part being the topic to search for and the second the name of the help file" as read in SciTE Documentation

Thanks for reading ;)

Link to post
Share on other sites
  • Developers

I know you could directly open the helpfile, but the exe does more than that.....   It will also open the SciTE4AutoIt3 helpfile when you press f1 on one of the directives for autoit3wrapper, tidy or au3stripper.

So we have made it to be more flexible than the standard index search open option.

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

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
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...