Selection problem

I wonder if you clever programming types could help me with a small issue?

I want to fill the keyword field of images with a series of tages e.g. Occupation of person pictured, country off residence etc.

Filling the fields through a series of buttons is no problem.

However, every time I had a a button to add a keyword tag, the picture(s) are deselected - I guess because the action of setting a tag causes the picture to be re-saved and RESLECT will not function.

Is there a way to re-select the pictures(s) every time I set a new tag?

Add @nodeselect (on a separate line) to the function to stop the files being deselected.

Many thanks