How do I Add or remove a GUI Button based on a variable setting ? My thought is if in the ini file I read if it has the 1 it will show Gui, Add, Button, h30 w140 gAEFiles vButton13, Actual hours if is set to 0 it will not show. I have tried several variation without success. Any help I would appreciate it.
if(%AEButton%=1)
{
gui Tab,Daily
Gui, Add, Button, h30 w140 gNewfolder vButton14, Make daily folder
Gui, Add, Button, h30 w140 gdailyfile vButton8, Daily file
Gui, Add, Button, h30 w140 gLaborfile vButton9, Labor
Gui, Add, Button, h30 w140 gCyclefile vButton10, Cycle Count
Gui, Add, Button, h30 w140 gGLQueryfile vButton11, gQuery
Gui, Add, Button, h30 w140 gEarnhoursfile vButton12, Earn Hours
Gui, Add, Button, h30 w140 gAEFiles vButton13, Actual hours
}
else
{
gui Tab,Daily
Gui, Add, Button, h30 w140 gNewfolder vButton14, Make daily folder
Gui, Add, Button, h30 w140 gdailyfile vButton8, Daily file
Gui, Add, Button, h30 w140 gLaborfile vButton9, Labor
Gui, Add, Button, h30 w140 gCyclefile vButton10, Cycle Count
Gui, Add, Button, h30 w140 gGLQueryfile vButton11, gQuery
Gui, Add, Button, h30 w140 gEarnhoursfile vButton12, Earn Hours
}