7 Macro to force reload program into a fresh editor & Version 0.20 (C) Jon Ripley 2007  *ESC OFF P%=0:P%=!408: P%=0 X  P%>= P%<=P Name$="Reload Program" GAction$="forcefully reload the current program into a fresh editor" ; 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 . . .";     /GW_HWNDNEXT = 2:hBBCWin%=@hwnd%:hBBCEdit%=0  hBBCWin% hBBCEdit%=0 3 "GetWindow", hBBCWin%, GW_HWNDNEXT hBBCWin% ; "FindWindowEx", hBBCWin%, 0, "BBCEdit", 0 hBBCEdit%  + hBBCWin%=0 100,"Cannot find editor" 2 B% 1023: "GetWindowText", hBBCWin%, B%, 256  C%= % $$B%,11)="(untitled) " $$B%=""  $$B%," - ") > 0 "F$=@dir$+$$B%,$$B%," - ")-1) I%=F$:P%=:C%= I% % C% #I%:C%=?P%=#I%:P%+=1:  H 0,"Cannot find program - aborting reload - this should not happen"    C% 6 : "ShellExecute", @hwnd%, "edit", F$, 0, "", 1 I : "ShellExecute", @hwnd%, "open", @lib$+"../bbcwin.exe", 0, "", 1   "ExitProcess"