Also, one must specify that this belongs in the Aliases section. otherwise, you should put something along the lines of "alias fkeys { code }". also, to make the script shorter, instead of writing out the whole window twice, do something along the lines of "alias F7 fkeys". This just tells mIRC to use the command "fkeys" when F7 is pressed.
Happy Scripting :)