You need to use the OSCLI command to pass variables to any star command, which is documented in the supplied help file, or on line here:
http://bbcbasic.co.uk/bbcwin/manual/bbcwin8.html#accessing
You also need to convert A% to a string, as BB4W will not do this for you and will throw a "Type mismatch" error. So, for your example, you need something like:
Code:
OSCLI "DISPLAY """+STR$(A%)+".bmp"+""" 240,350"
However, usless there is a pressing for it elsewhere in your program, you can get rid of A% entirely and use the original array in the OSCLI command:
Code:
OSCLI "DISPLAY """+STR$(G(25,1))+".bmp"+""" 240,350"
Note the use of multiple quote marks to "escape" the quotes needed for the name supplied to the DISPLAY command.
Simon