# Macro to run compiled program & Version 0.10 (C) Jon Ripley 2007 0 Note: Assumes default executable file name  *ESC OFF P%=0:P%=!408: P%=0 X  P%>= P%<=P Name$="Compile and Run" 1Action$="runs the program after compiling it" ; 0: "SetWindowPos", @hwnd%, 0, 0, 0, 640, 320, 6: 26 / B% 255: "GetWindowText", @hwnd%, B%, 256 @file$=@dir$+$$B%:tmp$=file$: "CharLowerBuff", !^tmp$, tmp$ op$="CALL """+file$+"""" 4 "SetWindowText", @hwnd%, Name$+" Installation"  "ShowWindow", @hwnd%, 9   0 "Bind to which function key (1-15) ? "F%  F%>0 F%<16 $F$= 0+18+"RI"+255+18+op$+13 <K$ = "Software\R T Russell\BBC BASIC for Windows\Macros" D "RegCreateKeyEx", &80000001, K$, 0, "", 0, &F003F, 0, ^K%, ^D% 3 "RegSetValueEx", K%, "F"+F%, 0, 3, F$, (F$)  "RegCloseKey", K% G'"Press "-(F%<10),"Shift+")"F";F%" from the editor to "Action$"." ('"Press any key to continue . . .";     / B% 255: "GetWindowText", @hwnd%, B%, 256  $$B%,".") P%=$$B%-1  B%?P%<>".":P%-=1: B%?P%=0  "file$=@dir$+"exe\"+$$B%+".exe" I%=file$ I% #I% 5 "ShellExecute", @hwnd%, "open", file$, 0, "", 1  @ "MessageBox", @hwnd%, "File '"+file$+"' not found.", 0, 48