I plan to add scripts to Photoshop File->Scripts menu items. Or some other convenient mothed to invoke my script. How could I do it?
Just put the jsx-files into the Presets > Scripts-folder.
After restarting Photoshop the Script should be available under File > Scripts and can be assigned a Keyboard Shortcut directly, recorded into an Action or (in CS4 and CS5) be used in a Configurator-Panel.
Configurator buttons can either refer to a Script or contain its code.
If your on windows you can add a link(Windows Shortcut) to Adobe Photoshop Presets\script\ folder to your Phtoshop Scripts tree to link Photoshops script path with your script tree to keep your scripts sepreate from Adobe scripts. Photoshop will includ your Scripts, Plug-ins Scripts and Help in it File>Scripts> List, File>Automate>List and Help>About Plug-ins>List is like adding an additional Plug-in path to Photoshop Preferences.
If you're on Windows 7, you can drag the script file over your Photoshop icon on the taskbar to "pin" the script to the right-click menu for Photoshop. Any time you would need to run it, just right-click the icon on the taskbar and select the script from the "Pin list".