There is a small routine which should set the caption of the button according to the variable FavIndex
Code: Select all
setFavTitle:
s:=FavIndex?"remove from favorites":"add to favorites"
GuiControl,,saffFav,%s%
debug("GUIControl s=" . s, A_Linenumber) ; writes debug output to a file to verify if s is correct
return
Code: Select all
gui add,button,gsaffzeigen w100,xxx
gosub SetFavTitle
But every second, I call a timer routine whicks checks if something has changed:
Code: Select all
safftimer:
...
FavIndex:=0
for ind, s in FavURLs
if (saffUrl=s) ; saffurl always contains the url of the currently displayed page
{
FavIndex:=ind
break
}
gosub SetFavTitle
exit ; exit the timer routine
Is it necessary to make another command to display the button again?