1. You can call cmd.exe and pass text for output
Code: Select all
Title$ = "Title"
Message$ = "Message"
tmp$ = "Title " + Title$ + " & @Echo off & @Echo. & Color 1e & @Echo. " + Message$ + "& "
tmp$ = EscapeString(tmp$)
RunProgram("cmd.exe", "/c (" + tmp$ + " set /p Ok=^>^>)", "")
2. You can compile a small file using a MessageRequester in it, where the text is transmitted via the command line.
Code: Select all
Define Title$
Define Message$
Define flag
Define Count = CountProgramParameters()
If Count > 0
Message$ = ProgramParameter(0)
If Count > 1
Title$ = ProgramParameter(1)
If Count > 2
flag = Val(ProgramParameter(2))
EndIf
EndIf
MessageRequester(Title$, Message$, flag)
EndIf
3. You can make your own window, but do not make it modal, that is, not blocking the parent window.
Code: Select all
If OpenWindow(0, 0, 0, 520, 300, "", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
ButtonGadget(0, 10, 10, 120, 30, "Window")
TextGadget(3, 10, 50, 210, 20, "0")
If OpenWindow(1, 0, 0, 220, 100, "", #PB_Window_SystemMenu | #PB_Window_ScreenCentered | #PB_Window_Invisible)
TextGadget(2, 10, 10, 210, 20, "Hello")
ButtonGadget(1, 10, 40, 120, 30, "Close")
StickyWindow(1, #True)
EndIf
AddWindowTimer(0, 0, 1000)
Repeat
Select WaitWindowEvent()
Case #PB_Event_Timer
i+1
SetGadgetText(3, Str(i))
Case #PB_Event_Gadget
Select EventGadget()
Case 0
HideWindow(1, #False)
Case 1
HideWindow(1, #True)
EndSelect
Case #PB_Event_CloseWindow
wn = EventWindow()
If wn
HideWindow(1, #True)
Else
CloseWindow(0)
CloseWindow(1)
End
EndIf
EndSelect
ForEver
EndIf