let me give you 2 answers that I can see for what I think you are trying to do...
1st is that there is the other form of declaring sprites that will give you control of what the number of the sprite actually is, so instead of
img_button_end_turn = LoadImage ( "endturn.jpg" )
spr_button_end_turn = CreateSprite ( img_button_end_turn )
SetSpritePosition ( spr_button_end_turn, 700, 95 )
you could define it as
img_button_end_turn = LoadImage ( "endturn.jpg" )
spr_button_end_turn = 1
CreateSprite ( spr_button_end_turn, img_button_end_turn )
SetSpritePosition ( spr_button_end_turn, 700, 95 )
so that if the GetSpritHit command returns 1 you know that this is actually "spr_button_end_turn".
Although true, I don't think this is what you are after.
The 2nd answer is to just manage your own sprites in an array
e.g. spritearray[500]
where the index would represent your actual sprite numbers and the content of the array at that index would be the sprite text. so you'd have
spritenum = 1
CreateSprite ( spritenum, img_button_end_turn ))
spritearray[ spritenum ] = "spr_button_end_turn"
...
if ( GetPointerPressed ( ) = 1 )
spritehit = GetSpriteHit ( GetPointerX ( ), GetPointerY ( ) )
endif
print ( spritearray[ spritehit ])
this may get a bit messy if you have hundreds or thousands of sprites, but in principle it should work...
hope I make some sort of sense here