shadowrecon Posted June 11, 2013 Share Posted June 11, 2013 (edited) 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 June 11, 2013 by shadowrecon Quote Link to comment Share on other sites More sharing options...
FHannes Posted June 11, 2013 Share Posted June 11, 2013 I see what you did there That's pretty creative actually. Quote Link to comment Share on other sites More sharing options...
shadowrecon Posted June 12, 2013 Author Share Posted June 12, 2013 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! Quote Link to comment Share on other sites More sharing options...