wilbert wrote:Kamarro wrote:1 - Where to find, or what are PB limitations for MacOS?
2 - How long/big a source program can be?
3 - Where is old Basic "Locate and Print" instructions?
4 - How to make PB execution change from one name.pb to another. I tried RunProgram but without success. Where is CHAIN or SHELL commands?
1. When a command is not supported on OSX it's mentioned in the help file but the majority of the PureBasic commands is cross platform.
It's a difficult question to answer what the limitations are. It's easier if you ask if something you need is possible or not.
2. As big as you want unless your system runs out of memory.
3. They don't exist. If you create a console program you can output a line of text with
PrintN but for a GUI program you need to use something like
EditorGadget to output your text to or use an image and draw text using
DrawText. If you want to simulate it you could use a monospaced font like "Menlo" or "Courier New" combined with an EditorGadget. You can change a specific line of text and use space characters to align.
4. PB is a compiled language, not an interpreted one so you can't switch to another .pb source. You can use
IncludeFile to include multiple sources in one application. If you need to start a compiled application form another one you can use
RunProgram.
Thanks again for your answer. I think I understood everything.
1 - About issue 1, as you say, I will work until any limits appear! (Close issue 1)
2 - About this issue, I usually create a program made with a lot of small programs (as they were Subroutines) and I chain from one to another (what leaves a lot of memory free for each module). As I told before, that's what i've done with QBasic. (Close issue 2)
3 - My problem is this: I have a screen, a regular PNG screen (it works. I loaded PNG LIB before), where I want to show system time working, but it only works and update when I move mouse; without a forced Event Repaint it remains as it is. My problem (I think) is with repeat cycle. If I don't use it and move mouse or so, window gets blank, so I need a Repaint, right? I give you my Routine as a better example of what I'm saying.
Ecran3:
SoundVolume(#PB_All, 30)
If OpenWindow(0, 0, 0, 1920, 1080, "Alien - The Last Queen", #PB_Window_Maximize)
CreateMenu(0, WindowID(0))
MenuTitle("Your Command")
MenuItem(1, "Back")
MenuItem(2, "Continue")
CreateImage(0, 1920, 1080,32)
StartDrawing(ImageOutput(0))
LoadImage(0, #Paths$+"Images/Second.png",0)
ResizeImage(0,1920,1080)
StopDrawing()
Repeat
Event = WaitWindowEvent()
Select Event
Case #PB_Event_Repaint
StartDrawing(WindowOutput(0))
DrawImage(ImageID(0), 0,0)
StopDrawing()
Hora$ = FormatDate("%hh:%ii:%ss", Date())
StartDrawing(WindowOutput(0))
DrawingMode(#PB_2DDrawing_Default)
Box(1700, 900, 150, 55 , RGB(0,0,0))
DrawingFont(FontID(3))
DrawText(1800, 910, Hora$, RGB(0,255,255))
StopDrawing()
Case #PB_Event_Menu
Select EventMenu()
Case 1 : CloseWindow( #PB_All):Goto Ecran2
Case 2 : End
EndSelect
EndSelect
Until Event = #PB_Event_CloseWindow
EndIf
I also tried to copy DrawText block to other positions inside routine, but it's the same or worst. Is there any way of keeping screen active and showing PNG without Repeat or Repaint?
What's wrong with this? Or with me?
4 - About issue 4, I've done a few tests until now and I really can't figure how it works. With a friend's machine using full version, I compiled my Alien.pb program to Alien.app and another simple program from Main.pb to Main.app
When my Main.app calls RunProgram("Alien.app") it doesn't work at all. I tried with Path, full path, no path at all... No error, but Alien.app don't start.
5 - A new question: What about the fullscreen option without System Bar or even Dock? Is there a way to get a really Fullscreen instead of a Maximized one?
Sorry my english, because I live in UK, but I'm Portuguese and never learned english at school, only French.
I apology too for so many questions, but that's what for forums are, ya?
Big thanks for you
Cheers
Paulo (a.k.a. Kamarro)