From: Sammy Mitchell
FRED HOLMES[SMTP:fred.holmes@mix.cpcug.org] wrote:
> I've just discovered that in TSE32, there is an additional "Empty
> Command Line Action" option = "Menu" in addition to the others
> (Prompt, File Manager, Recent, UnNamed, Picklist, Restore State)
>
> I cant' believe that the Menu option couldn't be put into TSE 2.5,
> i.e., that it incorporates some explicit 32-bit feature of the
> operating system. This is just the option I've always wanted.
>
> Is there a keystroke in TSE 2.5 that will bring up that menu,
> even if it isn't the default action?
It is fairly easy to make the "startup menu" the default action in version
2.5. In fact, the startup menu was originally developed in my personal .ui,
long before there was a win32 version. I started using it during the
development of the 2.5 version, but 2.5 took so long getting released, that
lots of my personal macros did not make it into the shipping version.
Anyway, I liked it so much, I made sure it made it to the win32 version. I
use it as the "empty command line" action in 2.5 (at home) and 2.9 (console
and gui) at work.
Here are the changes to make:
Make sure that the following menu is in your .ui file. In the standard
ones, I place it just before the "proc WhenLoaded()".
If it is already there, it is probably wrapped in "#ifdef WIN32....#endif"
statements. If so, remove them.
---------------------------------------------------------------------------
menu StartupMenu()
history
nokeys
"&Open...", EditFile()
"&New File", NewFile()
"&File Manager...", ExecMacro("f -r")
"List &Recent...", mListRecentFiles()
"&Pick File...", EditFile("-a- *.*")
"Restore &State", ExecMacro("state -r -q")
"&Where", ExecMacro("where")
"E&xit", AbandonEditor()
end
---------------------------------------------------------------------------
Now, what we are going to do, is to change the empty-command line *Prompt*
action to the menu, rather than the "File(s) to Edit:" prompt. To do this,
locate the "case Query(StartupFlags)" line in the WhenLoaded() proc.
Now, add a "otherwise" case to the case, and it should read like the
following:
---------------------------------------------------------------------------
otherwise
loop
SignOn()
Set(X1, (Query(ScreenCols) / 2) - 9)
Set(Y1, (Query(ScreenRows) / 2) - 5)
StartupMenu()
if MenuOption() == 0
return ()
elseif NumFiles()
if NumWindows() < 2 and not isZoomed()
OneWindow()
endif
Process(1)
endif
OneWindow()
lShowEntryScreen()
endloop
return ()
---------------------------------------------------------------------------
Just make sure you have 2.5 configured to use "Prompt" as the "empty command
line" action, and it should work just fine - at least it does for me!
To run the menu from a keystroke, do something like:
StartupMenu()
--
Sammy Mitchell, SemWare Corp., www.semware.com
---
---------------
* Origin: apana>>>>>fidonet [sawasdi.apana.org.au] (3:800/846.13)
|