Hok's Macromedia Flash Blog

macromedia flash actionscript scripting, php, remoting, webservices, c#, javascript

Ads

Search

Integrating context sensitiv help in scite editor

With this article i am trying to explain how we can integrate an context sensitive help within the scite-editor. The help should then appear on the F1-key and should show the help-topic corrosponding to the word, on which the cursor is pointing.



To customize scite you need a basic understanding of the scite-properties-files. There is an extra section in the help-topics that is targeting this topic:
http://scintilla.sourceforge.net/SciTEDoc.html

The easiest way to integrate an context help could be done by using windows-chm files. The command in your properties-file could look like:

command.help.$(file.patterns.php)=$(CurrentWord)!$(SciteDefaultHome)\php_manual_en.chm
command.help.subsystem.$(file.patterns.php)=4

(Attention this are only two lines and the lines starting with command)

This command integrates an php-context-help. In this case the chm-file stays direct in the scite-direcory, which absolute path is stored in the variable: "SciteDefaultHome". The subsystem defines which type of application should used:

- 0 the default is for command line programs,
- 1 for programs which create their own windows,
- 2 for running by using ShellExecute,
- 3 for running in an internal extension or director extension,
- 4 for running HtmlHelp on Windows, and
- 5 for running WinHelp on Windows.

(When using subsystem 4 or 5, the command has two parts separated by ! with the first part being the topic to search for and the second the name of the help file).

If want to integrate flash-context-help we could search the web for an window-helpfile like chm or we could build a chm-file by our self from the html-help-files. This would be easy but didn't worked for me, because i did not found an ready to use helpfile and have no experiences by building chm-files by my self. So i had to spent some time to find a solution. I have found an vbs solution:

see
download

This vbs-file contains an dictonary-object which holds the flash-html-help-file-names by the command which they are describing. You could copy this vbs-file to your scite-editor-directory and then custimize your properties-file like i show you in the following:

command.help.$(file.patterns.flash)="$(SciteDefaultHome)\as-dictonary.vbs" "C:\Programme\Macromedia\Flash MX 2004\de\First Run\HelpPanel\Help" $(CurrentWord)
command.help.subsystem.$(file.patterns.flash)=2

(Attention this are only two lines and the lines starting with command)

Then you could use the F1-key to open a context-help for the current word. The vbscript will try to open the help-file with the default application. In my case is this the mozilla-browser and it works like a charm. But i did not know if this works with other browsers.

Posted by hOk at July 10, 2004 01:04 PM

Comments (1)

Magic! Thanks, that's going to save me a lot of time!!

Posted by alex at July 10, 2004 08:36 PM


Name:


Email Address:


URL:


Comments:



You can use <code>code that should be highlightned</code> to highlight code!
Optionally you can use the attribut language="php|perl|java" within the code tag, otherwise
actionscript-highlightning will be used.

New Place