I can get the list of tabs and show in a gui. Great !
The trick is to how to handle a tab being closed. If I destroy and then recreate periodically the gui winks in and out, which is visually annoying. I'd rather HIDE a button and let the window resize.
I cannot get the code correct to hide a button with text "xyz" on a GUI named "mygui"
Code: Select all
guicontrol, Hide, mygui%A_loopfield%
Code: Select all
Gui, mygui:+LastFound ;<------------------- GUI is named "mygui"
myguiID := WinExist() ;store the ID of "mygui" window
wingettext, buttonlist, %myTitle% ;get the text off the buttons
loop, parse, buttonlist, `n, `r
{
if (instr(tablist , A_Loopfield)>0) ;tablist is from Acc, pulls the list of tabs correctly
{
;tab still exists, do nothing to this button
}
else
{
msgbox Need to delete/hide %A_loopfield%
guicontrol, Hide, mygui%A_loopfield% ;<----------HOW TO HIDE THE BUTTON ARRRRGGHHHH !!!!
tablist:=strreplace(tablist,A_loopfield) ;tidy up the list
}
}
} ;loop