I am assuming you are talking about web click and script. When the ID attribute has dynamic data, it may be better to use the ordinal attribute instead of the ID attribute to identify the objects. See KM199099 in the HP kb.
Example:
web_image_link(''IMG_52549_2'',
''Snapshot=t2.inf'',
DESCRIPTION,
''Alt='',
''ID=IMG_52549'',
ACTION,
''ClickCoordinates=33,28'',
LAST);
In the above example, the ID=IMG_52549 changes each time.
Solution:
web_image_link(''IMG_52549_2'',
''Snapshot=t2.inf'',
DESCRIPTION,
''Alt='',
//''ID=IMG_52549'', Commented out as it is dynamic
''Ordinal = 12'' //This is the ordinal of the image on the page.
ACTION,
''ClickCoordinates=33,28'',
LAST);