While not trying to plug my own plugin here but... this could be accomplished via the Global timer feature in my RRExtended PI. Found Here
new btn code:
then add the cmd its gonna call every 1/2 sec to the exectbl.ini file
and on the end of your wedgeadvanced cmd add: GblTmr_Delete;gpsspdcheck. eg.. "wedgeadvanced","xxxxxxx||GblTmr_Delete;gpsspdchec k"
What this does, is that when you click your btn, it creates the timer "gpsspdcheck" and sets it to run every 1/2 second, which will execute the checkspd cmd. Then the CheckSpd cmd checks your speed and when it is over 5, executes your wedgeadvanced cmd. At the end it deletes the gpsspdcheck timer as you only need it when you click your btn.