Category : Files from Magazines
Archive   : PCTV1N4.ZIP
Filename : HWMAIN.PAS

 
Output of file : HWMAIN.PAS contained in archive : PCTV1N4.ZIP
{$S-,I-,R-}
unit HWmain;

interface

uses
OpSwap1;

procedure HelloWorldMain;

implementation

const
HotKey = $080F; {code for Alt-Tab}
Swap1 = 'HELLO1.SWP';
Swap2 = 'HELLO2.SWP';

{$F+}
procedure PopupEntryPoint;
{-Routine called when our hotkey is pressed}
begin
WriteLn('Hello world!');
end;
{$F-}

procedure HelloWorldMain;
{-Define a popup and go resident}
begin
{disable swapping message if swapping to EMS}
SetSwapMsgOn( not WillSwapUseEms(ParagraphsToKeep) );

{define the popup}
if DefinePop(HotKey, PopupEntryPoint, Ptr(SSeg,SPtr)) then begin
WriteLn('TSR loaded, press to activate.');

{Make popup routines active.}
PopupsOn;

{try to go resident}
StayResSwap(ParagraphsToKeep, 0, Swap1, Swap2, True);
end;

{if we get here we failed to go resident}
WriteLn('Unable to go resident.');
end;

end.



  3 Responses to “Category : Files from Magazines
Archive   : PCTV1N4.ZIP
Filename : HWMAIN.PAS

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/