Jump to content
  • Sky
  • Blueberry
  • Slate
  • Blackcurrant
  • Watermelon
  • Strawberry
  • Orange
  • Banana
  • Apple
  • Emerald
  • Chocolate
  • Charcoal
Sign in to follow this  
shadowrecon

Halt_ifmissing_display_incluemanager

Recommended Posts

Finally a solution for missing includes for newbies who do not know how to install them. Simply place this right before you include a file in a script and type the name of the include like so 'OSI/' and it will HALT the script and show the includes manager if the include does not exist and show a message to install the script in the debug box!

 

[sCAR]

Procedure HALT_IFMISSING_DISPLAY_INCLUEMANAGER(INCLUDE: STRING);

begin

if (NOT DirectoryExists(IncludesPath + INCLUDE)) then

begin

VKeyDown(18);

VKeyDown(CharToVKey('F'));

VKeyDown(CharToVKey('I'));

VKeyDown(13);

VKeyUp(13);

VKeyUp(CharToVKey('I'));

VKeyUp(CharToVKey('F'));

VKeyUp(18);

ClearDebug;

Writeln('');

Writeln('PLEASE SELECT '+INCLUDE+' AND INSTALL THE INCLUDE');

Writeln('TO USE THIS SCRIPT!');

end;

end;

[/sCAR]

 

Example of USE in GMRL:

[sCAR]

{$IFDEF OSI}

HALT_DISPLAY_IFMISSING_INCLUEMANAGER('OSI/');

{$I OSI\OSI.scar}

{$ENDIF}

[/sCAR]

 

Credit to SLACKY for giving me this idea using hot keys!

Edited by shadowrecon

Share this post


Link to post
Share on other sites

Thanks, Ive been looking for a method for a while and slacky suggested hot-keys and i made this and it worked. So what i did in GMRL is put all the defines in the setup procedure and then call this function before defining OSI. :) I was surprised the solution was so simple!

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×