I call it useless, but I would really like to know.
Code: Select all
Macro CreateConstant(ConstantName, Value)
#ConstantName = Value
EndMacro
CreateConstant(MyConstant, 1)
CreateConstant(MyButton, 2)
OpenWindow(#MyConstant, 0, 0, 200, 200, "Useless code in action!", #PB_Window_ScreenCentered | #PB_Window_SystemMenu)
ButtonGadget(#MyButton, 5, 5, 100, 50, "Some Button")
Repeat
Delay(10)
If WaitWindowEvent(1) = #PB_Event_Gadget
Select EventGadget()
Case #MyButton
MessageRequester("Message","Useless, I know")
EndSelect
EndIf
Until WaitWindowEvent(1) = #PB_Event_CloseWindow

