Purebasic 3.94 for Mac os x work bad, not properly..........
Dear Comptois......you're right!!!
excluding "file binary include" the application goes, the image called "faccia.jpg" , appear on the window....but my application is like stopped; so loadimage is ok!!!! without path. If i push a gadgetimage, nothing happend....The about menu function but the ok button appear only when i push on it...but you don't see that first...
So also cathimage don't function!!!
Here my simply code:
;
; ------------------------------------------------------------
;
; PureBasic - Window-Mac os x - Tic Tac Toe
;
; (c) 2005/6 - Fasa Software - Versione 5.0
;
; ------------------------------------------------------------
;- carico i decoder
InitMovie()
UseJPEGImageDecoder()
UseOGGSoundDecoder()
InitSound()
OpenWindow(0,0,0,275,400,#PB_Window_SystemMenu|#PB_Window_ScreenCentered,"Tris-Game") And CreateGadgetList(WindowID(0))
If CreateGadgetList(WindowID())
If CreateMenu(0, WindowID())
MenuTitle("File")
MenuItem( 60, "About who made the program...")
MenuBar()
MenuItem(70, "Quit")
EndIf
;-carico le risorse
;first here was CATHIMAGE(19,?faccia)
LoadImage(19,"faccia.JPG")
LoadImage(20,"x.JPG")
LoadImage(30,"0.JPG")
LoadMovie(14,"./DATASOUND/campane.mp3")
LoadMovie(15,"./DATASOUND/boink.mp3")
LoadMovie(16,"./DATASOUND/pop.mp3")
LoadMovie(17,"./DATASOUND/risata.mp3")
LoadMovie(18,"./DATASOUND/appl.mp3")
LoadImage(31,"about.JPG")
LoadMovie(32,"./DATASOUND/about.mp3")
;-costruisco la finestra con i gadget
TextGadget(10,12,280,250,20," Select level and then Push start button!!",#PB_Text_Border)
OptionGadget(11, 85, 317, 60, 20, "Easy")
OptionGadget(12, 150, 317, 60, 20, "Hard")
ButtonGadget(13, 35, 350, 200, 20, "Let's start!!")
EndIf
;- seleziono il livello
Start:
livello=0
vittoria=0
SceltaFatta=0
click=0
numero=0
statocella1=0
statocella2=0
statocella3=0
statocella4=0
statocella5=0
statocella6=0
statocella7=0
statocella8=0
statocella9=0
ContaMosse=0
DisableGadget(11,0)
DisableGadget(12,0)
DisableGadget(13,0)
SetGadgetState(11,1)
ActivateGadget(13)
livello=1
Repeat
ActivateWindow()
EventID = WaitWindowEvent()
If EventID = #PB_EventMenu
Select EventMenuID()
Case 70
Quit=2
Case 60
OpenWindow(32,230,95,335,357,#PB_Window_TitleBar,"ABOUT")
CreateGadgetList(WindowID(32))
UseWindow(32)
ButtonGadget(33, 35, 285, 265, 30, "Ok, Go back to the game")
ImageGadget(31,0,0,100,83,UseImage(31))
PlayMovie(32,0)
EndSelect
EndIf
If EventID = #PB_EventGadget
Select EventGadgetID()
Case 12
ActivateGadget(13)
livello=2
Case 13
PlayMovie(14,0)
If livello<>0
Goto game
EndIf
Case 33
StopMovie()
CloseWindow(32)
UseWindow(0)
UseGadgetList(WindowID(0))
EndSelect
EndIf
Until Quit=2 Or EventID = #PB_Event_CloseWindow
End
game:
ImageGadget(1, 10,10,100,83,UseImage(19))
ImageGadget(2, 95,10,100,83,UseImage(19))
ImageGadget(3,180,10,100,83,UseImage(19))
ImageGadget(4,10,95,100,83,UseImage(19))
ImageGadget(5,95,95,100,83,UseImage(19))
ImageGadget(6,180,95,100,83,UseImage(19))
ImageGadget(7,10,180,100,83,UseImage(19))
ImageGadget(8,95,180,100,83,UseImage(19))
ImageGadget(9,180,180,100,83,UseImage(19))
DisableGadget(11,1)
DisableGadget(12,1)
DisableGadget(13,1)
If livello=1:Goto easy:EndIf
If livello=2:Goto hard:EndIf
;-livello easy + inizio
easy:
livello=1
Repeat
EventID = WaitWindowEvent()
If EventID = #PB_EventMenu
Select EventMenuID()
Case 70
Quit=2
Case 60
OpenWindow(32,230,95,335,357,#PB_Window_TitleBar,"ABOUT")
CreateGadgetList(WindowID(32))
UseWindow(32)
ButtonGadget(33, 35, 285, 265, 30, "Ok, Go back to the game")
ImageGadget(31,0,0,100,83,UseImage(31))
PlayMovie(32,0)
EndSelect
EndIf
Gosub Verifica
If vittoria<>0
Goto Fine
EndIf
SceltaFatta=0
If EventID = #PB_EventGadget And click=0
Select EventGadgetID()
Case 13
PlayMovie(14,0)
Case 1
If statocella1=0
SetGadgetState(1,UseImage(20))
PlayMovie(16,0)
statocella1=1
click=1
EndIf
Case 2
If statocella2=0
SetGadgetState(2,UseImage(20))
PlayMovie(16,0)
statocella2=1
click=1
EndIf
Case 3
If statocella3=0
SetGadgetState(3,UseImage(20))
PlayMovie(16,0)
statocella3=1
click=1
EndIf
Case 4
If statocella4=0
SetGadgetState(4,UseImage(20))
PlayMovie(16,0)
statocella4=1
click=1
EndIf
Case 5
If statocella5=0
SetGadgetState(5,UseImage(20))
PlayMovie(16,0)
statocella5=1
click=1
EndIf
Case 6
If statocella6=0
SetGadgetState(6,UseImage(20))
PlayMovie(16,0)
statocella6=1
click=1
EndIf
Case 7
If statocella7=0
SetGadgetState(7,UseImage(20))
PlayMovie(16,0)
statocella7=1
click=1
EndIf
Case 8
If statocella8=0
SetGadgetState(8,UseImage(20))
PlayMovie(16,0)
statocella8=1
click=1
EndIf
Case 9
If statocella9=0
SetGadgetState(9,UseImage(20))
PlayMovie(16,0)
statocella9=1
click=1
EndIf
Case 33
StopMovie()
CloseWindow(32)
UseWindow(0)
UseGadgetList(WindowID(0))
EndSelect
EndIf
If click=1:ContaMosse+1:EndIf
Gosub Verifica
If vittoria<>0
Goto Fine
EndIf
While click=1
If SceltaFatta=0
numero=Random(8)+1
Select numero
Case 1
If statocella1=0
Delay(1000)
SetGadgetState(1,UseImage(30))
PlayMovie(15,0)
statocella1=2
SceltaFatta=1
click=0
EndIf
Case 2
If statocella2=0
Delay(1000)
SetGadgetState(2,UseImage(30))
PlayMovie(15,0)
statocella2=2
SceltaFatta=1
click=0
EndIf
Case 3
If statocella3=0
Delay(1000)
SetGadgetState(3,UseImage(30))
PlayMovie(15,0)
statocella3=2
SceltaFatta=1
click=0
EndIf
Case 4
If statocella4=0
Delay(1000)
SetGadgetState(4,UseImage(30))
PlayMovie(15,0)
statocella4=2
SceltaFatta=1
click=0
EndIf
Case 5
If statocella5=0
Delay(1000)
SetGadgetState(5,UseImage(30))
PlayMovie(15,0)
statocella5=2
SceltaFatta=1
click=0
EndIf
Case 6
If statocella6=0
Delay(1000)
SetGadgetState(6,UseImage(30))
PlayMovie(15,0)
statocella6=2
SceltaFatta=1
click=0
EndIf
Case 7
If statocella7=0
Delay(1000)
SetGadgetState(7,UseImage(30))
PlayMovie(15,0)
statocella7=2
SceltaFatta=1
click=0
EndIf
Case 8
If statocella8=0
Delay(1000)
SetGadgetState(8,UseImage(30))
PlayMovie(15,0)
statocella8=2
SceltaFatta=1
click=0
EndIf
Case 9
If statocella9=0
Delay(1000)
SetGadgetState(9,UseImage(30))
PlayMovie(15,0)
statocella9=2
SceltaFatta=1
click=0
EndIf
EndSelect
EndIf
Wend
livello=1
If SceltaFatta=1:ContaMosse+1:EndIf
Until Quit=2 Or EventID = #PB_Event_CloseWindow
End
;-livello hard + inizio
HARD:
Repeat
EventID = WaitWindowEvent()
If EventID = #PB_EventMenu
Select EventMenuID()
;Select EventMenuID()
Case 70
Quit=2
Case 60
OpenWindow(32,230,95,335,357,#PB_Window_TitleBar,"ABOUT")
CreateGadgetList(WindowID(32))
UseWindow(32)
ButtonGadget(33, 35, 285, 265, 30, "Ok, Go back to the game")
ImageGadget(31,0,0,100,83,UseImage(31))
PlayMovie(32,0)
EndSelect
EndIf
livello=2
SceltaFatta=0
If EventID = #PB_EventGadget And click=0
Select EventGadgetID()
Case 13
PlayMovie(14,0)
Case 1
If statocella1=0
SetGadgetState(1,UseImage(20))
PlayMovie(16,0)
statocella1=1
click=1
sceltafatta=0
EndIf
Case 2
If statocella2=0
SetGadgetState(2,UseImage(20))
PlayMovie(16,0)
statocella2=1
click=1
sceltafatta=0
EndIf
Case 3
If statocella3=0
SetGadgetState(3,UseImage(20))
PlayMovie(16,0)
statocella3=1
click=1
sceltafatta=0
EndIf
Case 4
If statocella4=0
SetGadgetState(4,UseImage(20))
PlayMovie(16,0)
statocella4=1
click=1
sceltafatta=0
EndIf
Case 5
If statocella5=0
SetGadgetState(5,UseImage(20))
PlayMovie(16,0)
statocella5=1
click=1
sceltafatta=0
EndIf
Case 6
If statocella6=0
SetGadgetState(6,UseImage(20))
PlayMovie(16,0)
statocella6=1
click=1
sceltafatta=0
EndIf
Case 7
If statocella7=0
SetGadgetState(7,UseImage(20))
PlayMovie(16,0)
statocella7=1
click=1
sceltafatta=0
EndIf
Case 8
If statocella8=0
SetGadgetState(8,UseImage(20))
PlayMovie(16,0)
statocella8=1
click=1
sceltafatta=0
EndIf
Case 9
If statocella9=0
SetGadgetState(9,UseImage(20))
PlayMovie(16,0)
statocella9=1
click=1
sceltafatta=0
EndIf
Case 33
StopMovie()
CloseWindow(32)
UseWindow(0)
UseGadgetList(WindowID(0))
EndSelect
EndIf
If click=1:ContaMosse+1:EndIf
If SceltaFatta=0
Gosub Verifica
If vittoria<>0
Goto Fine
EndIf
EndIf
While click=1
scelta=1
If scelta=1: numero=Random(8)+1:EndIf
scelta=scelta+1
Select numero
Case 1
If statocella1=0
Delay(1000)
SetGadgetState(1,UseImage(30))
PlayMovie(15,0)
statocella1=2
SceltaFatta=1
click=0
If SceltaFatta=0
Gosub Verifica
If vittoria<>0
Goto Fine
EndIf
EndIf
EndIf
Case 2
If statocella2=0
Delay(1000)
SetGadgetState(2,UseImage(30))
PlayMovie(15,0)
statocella2=2
SceltaFatta=1
click=0
If SceltaFatta=0
Gosub Verifica
If vittoria<>0
Goto Fine
EndIf
EndIf
EndIf
Case 3
If statocella3=0
Delay(1000)
SetGadgetState(3,UseImage(30))
PlayMovie(15,0)
statocella3=2
SceltaFatta=1
click=0
If SceltaFatta=0
Gosub Verifica
If vittoria<>0
Goto Fine
EndIf
EndIf
EndIf
Case 4
If statocella4=0
Delay(1000)
SetGadgetState(4,UseImage(30))
PlayMovie(15,0)
statocella4=2
SceltaFatta=1
click=0
If SceltaFatta=0
Gosub Verifica
If vittoria<>0
Goto Fine
EndIf
EndIf
EndIf
Case 5
If statocella5=0
Delay(1000)
SetGadgetState(5,UseImage(30))
PlayMovie(15,0)
statocella5=2
SceltaFatta=1
click=0
If SceltaFatta=0
Gosub Verifica
If vittoria<>0
Goto Fine
EndIf
EndIf
EndIf
Case 6
If statocella6=0
Delay(1000)
SetGadgetState(6,UseImage(30))
PlayMovie(15,0)
statocella6=2
SceltaFatta=1
click=0
If SceltaFatta=0
Gosub Verifica
If vittoria<>0
Goto Fine
EndIf
EndIf
EndIf
Case 7
If statocella7=0
Delay(1000)
SetGadgetState(7,UseImage(30))
PlayMovie(15,0)
statocella7=2
SceltaFatta=1
click=0
If SceltaFatta=0
Gosub Verifica
If vittoria<>0
Goto Fine
EndIf
EndIf
EndIf
Case 8
If statocella8=0
Delay(1000)
SetGadgetState(8,UseImage(30))
PlayMovie(15,0)
statocella8=2
SceltaFatta=1
click=0
If SceltaFatta=0
Gosub Verifica
If vittoria<>0
Goto Fine
EndIf
EndIf
EndIf
Case 9
If statocella9=0
Delay(1000)
SetGadgetState(9,UseImage(30))
PlayMovie(15,0)
statocella9=2
SceltaFatta=1
click=0
If SceltaFatta=0
Gosub Verifica
If vittoria<>0
Goto Fine
EndIf
EndIf
EndIf
EndSelect
Wend
livello=2
If SceltaFatta=1:ContaMosse+1:EndIf
If SceltaFatta=0
Gosub Verifica
If vittoria<>0
Goto Fine
EndIf
EndIf
Until Quit=2 Or EventID = #PB_Event_CloseWindow
End
; messaggio$="Under Construction"
;MessageRequester("!!!ALERT!!!",messaggio$,#PB_MessageRequester_Ok)
;Goto Start
;-carico i file binary
;faccia:IncludeBinary "faccia.jpg"
;x:IncludeBinary "x.jpg"
;0:IncludeBinary "0.jpg"
;about:IncludeBinary "about.jpg"
;-Verifica
Verifica:
;Ha vinto il giocatore?
If statocella3=1 And statocella5=1 And statocella7=1:vittoria=1:EndIf
If statocella1=1 And statocella2=1 And statocella3=1:vittoria=1:EndIf
If statocella4=1 And statocella5=1 And statocella6=1:vittoria=1:EndIf
If statocella7=1 And statocella8=1 And statocella9=1:vittoria=1:EndIf
If statocella1=1 And statocella4=1 And statocella7=1:vittoria=1:EndIf
If statocella2=1 And statocella5=1 And statocella8=1:vittoria=1:EndIf
If statocella3=1 And statocella6=1 And statocella9=1:vittoria=1:EndIf
If statocella1=1 And statocella5=1 And statocella9=1:vittoria=1:EndIf
If statocella3=1 And statocella5=1 And statocella7=1:vittoria=1:EndIf
If statocella1=1 And statocella5=1 And statocella9=1:vittoria=1:EndIf
;Ha vinto il computer?
If statocella1=2 And statocella2=2 And statocella3=2:vittoria=2:EndIf
If statocella4=2 And statocella5=2 And statocella6=2:vittoria=2:EndIf
If statocella7=2 And statocella8=2 And statocella9=2:vittoria=2:EndIf
If statocella1=2 And statocella5=2 And statocella9=2:vittoria=2:EndIf
If statocella1=2 And statocella4=2 And statocella7=2:vittoria=2:EndIf
If statocella2=2 And statocella5=2 And statocella8=2:vittoria=2:EndIf
If statocella3=2 And statocella6=2 And statocella9=2:vittoria=2:EndIf
If statocella1=2 And statocella5=2 And statocella9=2:vittoria=2:EndIf
If statocella3=2 And statocella5=2 And statocella7=2:vittoria=2:EndIf
;casi per il livello hard----quelli che seguono
If livello=2 And statocella1=1 And statocella2=1 And click=1
If statocella3=0
Delay(1000)
SetGadgetState(3,UseImage(30))
PlayMovie(15,0)
statocella3=2
SceltaFatta=1
click=0
EndIf
EndIf
If livello=2 And statocella1=1 And statocella4=1 And click=1
If statocella7=0
Delay(1000)
SetGadgetState(7,UseImage(30))
PlayMovie(15,0)
statocella7=2
SceltaFatta=1
click=0
EndIf
EndIf
If livello=2 And statocella5=1 And statocella3=1 And click=1
If statocella7=0
Delay(1000)
SetGadgetState(7,UseImage(30))
PlayMovie(15,0)
statocella7=2
SceltaFatta=1
click=0
EndIf
EndIf
If livello=2 And statocella7=1 And statocella8=1 And click=1
If statocella9=0
Delay(1000)
SetGadgetState(9,UseImage(30))
PlayMovie(15,0)
statocella9=2
SceltaFatta=1
click=0
EndIf
EndIf
If livello=2 And statocella3=1 And statocella6=1 And click=1
If statocella9=0
Delay(1000)
SetGadgetState(9,UseImage(30))
PlayMovie(15,0)
statocella9=2
SceltaFatta=1
click=0
EndIf
EndIf
If livello=2 And statocella4=1 And statocella5=1 And click=1
If statocella6=0
Delay(1000)
SetGadgetState(6,UseImage(30))
PlayMovie(15,0)
statocella6=2
SceltaFatta=1
click=0
EndIf
EndIf
If livello=2 And statocella8=1 And statocella5=1 And click=1
If statocella2=0
Delay(1000)
SetGadgetState(2,UseImage(30))
PlayMovie(15,0)
statocella2=2
SceltaFatta=1
click=0
EndIf
EndIf
If livello=2 And statocella5=1 And statocella9=1 And click=1
If statocella1=0
Delay(1000)
SetGadgetState(1,UseImage(30))
PlayMovie(15,0)
statocella1=2
SceltaFatta=1
click=0
EndIf
EndIf
If livello=2 And statocella2=1 And statocella5=1 And click=1
If statocella8=0
Delay(1000)
SetGadgetState(8,UseImage(30))
PlayMovie(15,0)
statocella8=2
SceltaFatta=1
click=0
EndIf
EndIf
If livello=2 And statocella1=1 And statocella5=1 And click=1
If statocella9=0
Delay(1000)
SetGadgetState(9,UseImage(30))
PlayMovie(15,0)
statocella9=2
SceltaFatta=1
click=0
EndIf
EndIf
If livello=2 And statocella7=1 And statocella5=1 And click=1
If statocella3=0
Delay(1000)
SetGadgetState(3,UseImage(30))
PlayMovie(15,0)
statocella3=2
SceltaFatta=1
click=0
EndIf
EndIf
If livello=2 And statocella6=1 And statocella5=1 And click=1
If statocella4=0
Delay(1000)
SetGadgetState(4,UseImage(30))
PlayMovie(15,0)
statocella4=2
SceltaFatta=1
click=0
EndIf
EndIf
If livello=2 And statocella6=1 And statocella9=1 And click=1
If statocella3=0
Delay(1000)
SetGadgetState(3,UseImage(30))
PlayMovie(15,0)
statocella3=2
SceltaFatta=1
click=0
EndIf
EndIf
If livello=2 And statocella3=1 And statocella9=1 And click=1
If statocella6=0
Delay(1000)
SetGadgetState(6,UseImage(30))
PlayMovie(15,0)
statocella6=2
SceltaFatta=1
click=0
EndIf
EndIf
If livello=2 And statocella7=1 And statocella9=1 And click=1
If statocella8=0
Delay(1000)
SetGadgetState(8,UseImage(30))
PlayMovie(15,0)
statocella8=2
SceltaFatta=1
click=0
EndIf
EndIf
If livello=2 And statocella8=1 And statocella9=1 And click=1
If statocella7=0
Delay(1000)
SetGadgetState(7,UseImage(30))
PlayMovie(15,0)
statocella7=2
SceltaFatta=1
click=0
EndIf
EndIf
If livello=2 And statocella2=1 And statocella3=1 And click=1
If statocella1=0
Delay(1000)
SetGadgetState(1,UseImage(30))
PlayMovie(15,0)
statocella1=2
SceltaFatta=1
click=0
EndIf
EndIf
If livello=2 And statocella4=1 And statocella7=1 And click=1
If statocella1=0
Delay(1000)
SetGadgetState(1,UseImage(30))
PlayMovie(15,0)
statocella1=2
SceltaFatta=1
click=0
EndIf
EndIf
If livello=2 And statocella1=1 And statocella3=1 And click=1
If statocella2=0
Delay(1000)
SetGadgetState(2,UseImage(30))
PlayMovie(15,0)
statocella2=2
SceltaFatta=1
click=0
EndIf
EndIf
If livello=2 And statocella1=1 And statocella7=1 And click=1
If statocella4=0
Delay(1000)
SetGadgetState(4,UseImage(30))
PlayMovie(15,0)
statocella4=2
SceltaFatta=1
click=0
EndIf
EndIf
If livello=2 And statocella3=1 And statocella7=1 And click=1
If statocella5=0
Delay(1000)
SetGadgetState(5,UseImage(30))
PlayMovie(15,0)
statocella5=2
SceltaFatta=1
click=0
EndIf
EndIf
If livello=2 And statocella1=1 And statocella9=1 And click=1
If statocella5=0
Delay(1000)
SetGadgetState(5,UseImage(30))
PlayMovie(15,0)
statocella5=2
SceltaFatta=1
click=0
EndIf
EndIf
;partita patta????
If ContaMosse=9 And vittoria=0:vittoria=3:EndIf
Return
Fine:
If vittoria=1
messaggio$="YOU"
bell=18
EndIf
If vittoria=2
messaggio$="Computer"
bell=17
EndIf
If vittoria=3
messaggio$="Nothing happend!!!Pair!!!"
bell=17
EndIf
PlayMovie(bell,0)
MessageRequester("The winner is:",messaggio$,#PB_MessageRequester_Ok)
SetGadgetState(1,UseImage(19))
SetGadgetState(2,UseImage(19))
SetGadgetState(3,UseImage(19))
SetGadgetState(4,UseImage(19))
SetGadgetState(5,UseImage(19))
SetGadgetState(6,UseImage(19))
SetGadgetState(7,UseImage(19))
SetGadgetState(8,UseImage(19))
SetGadgetState(9,UseImage(19))
Goto start
End

So also cathimage don't function!!!
Here my simply code:
;
; ------------------------------------------------------------
;
; PureBasic - Window-Mac os x - Tic Tac Toe
;
; (c) 2005/6 - Fasa Software - Versione 5.0
;
; ------------------------------------------------------------
;- carico i decoder
InitMovie()
UseJPEGImageDecoder()
UseOGGSoundDecoder()
InitSound()
OpenWindow(0,0,0,275,400,#PB_Window_SystemMenu|#PB_Window_ScreenCentered,"Tris-Game") And CreateGadgetList(WindowID(0))
If CreateGadgetList(WindowID())
If CreateMenu(0, WindowID())
MenuTitle("File")
MenuItem( 60, "About who made the program...")
MenuBar()
MenuItem(70, "Quit")
EndIf
;-carico le risorse
;first here was CATHIMAGE(19,?faccia)
LoadImage(19,"faccia.JPG")
LoadImage(20,"x.JPG")
LoadImage(30,"0.JPG")
LoadMovie(14,"./DATASOUND/campane.mp3")
LoadMovie(15,"./DATASOUND/boink.mp3")
LoadMovie(16,"./DATASOUND/pop.mp3")
LoadMovie(17,"./DATASOUND/risata.mp3")
LoadMovie(18,"./DATASOUND/appl.mp3")
LoadImage(31,"about.JPG")
LoadMovie(32,"./DATASOUND/about.mp3")
;-costruisco la finestra con i gadget
TextGadget(10,12,280,250,20," Select level and then Push start button!!",#PB_Text_Border)
OptionGadget(11, 85, 317, 60, 20, "Easy")
OptionGadget(12, 150, 317, 60, 20, "Hard")
ButtonGadget(13, 35, 350, 200, 20, "Let's start!!")
EndIf
;- seleziono il livello
Start:
livello=0
vittoria=0
SceltaFatta=0
click=0
numero=0
statocella1=0
statocella2=0
statocella3=0
statocella4=0
statocella5=0
statocella6=0
statocella7=0
statocella8=0
statocella9=0
ContaMosse=0
DisableGadget(11,0)
DisableGadget(12,0)
DisableGadget(13,0)
SetGadgetState(11,1)
ActivateGadget(13)
livello=1
Repeat
ActivateWindow()
EventID = WaitWindowEvent()
If EventID = #PB_EventMenu
Select EventMenuID()
Case 70
Quit=2
Case 60
OpenWindow(32,230,95,335,357,#PB_Window_TitleBar,"ABOUT")
CreateGadgetList(WindowID(32))
UseWindow(32)
ButtonGadget(33, 35, 285, 265, 30, "Ok, Go back to the game")
ImageGadget(31,0,0,100,83,UseImage(31))
PlayMovie(32,0)
EndSelect
EndIf
If EventID = #PB_EventGadget
Select EventGadgetID()
Case 12
ActivateGadget(13)
livello=2
Case 13
PlayMovie(14,0)
If livello<>0
Goto game
EndIf
Case 33
StopMovie()
CloseWindow(32)
UseWindow(0)
UseGadgetList(WindowID(0))
EndSelect
EndIf
Until Quit=2 Or EventID = #PB_Event_CloseWindow
End
game:
ImageGadget(1, 10,10,100,83,UseImage(19))
ImageGadget(2, 95,10,100,83,UseImage(19))
ImageGadget(3,180,10,100,83,UseImage(19))
ImageGadget(4,10,95,100,83,UseImage(19))
ImageGadget(5,95,95,100,83,UseImage(19))
ImageGadget(6,180,95,100,83,UseImage(19))
ImageGadget(7,10,180,100,83,UseImage(19))
ImageGadget(8,95,180,100,83,UseImage(19))
ImageGadget(9,180,180,100,83,UseImage(19))
DisableGadget(11,1)
DisableGadget(12,1)
DisableGadget(13,1)
If livello=1:Goto easy:EndIf
If livello=2:Goto hard:EndIf
;-livello easy + inizio
easy:
livello=1
Repeat
EventID = WaitWindowEvent()
If EventID = #PB_EventMenu
Select EventMenuID()
Case 70
Quit=2
Case 60
OpenWindow(32,230,95,335,357,#PB_Window_TitleBar,"ABOUT")
CreateGadgetList(WindowID(32))
UseWindow(32)
ButtonGadget(33, 35, 285, 265, 30, "Ok, Go back to the game")
ImageGadget(31,0,0,100,83,UseImage(31))
PlayMovie(32,0)
EndSelect
EndIf
Gosub Verifica
If vittoria<>0
Goto Fine
EndIf
SceltaFatta=0
If EventID = #PB_EventGadget And click=0
Select EventGadgetID()
Case 13
PlayMovie(14,0)
Case 1
If statocella1=0
SetGadgetState(1,UseImage(20))
PlayMovie(16,0)
statocella1=1
click=1
EndIf
Case 2
If statocella2=0
SetGadgetState(2,UseImage(20))
PlayMovie(16,0)
statocella2=1
click=1
EndIf
Case 3
If statocella3=0
SetGadgetState(3,UseImage(20))
PlayMovie(16,0)
statocella3=1
click=1
EndIf
Case 4
If statocella4=0
SetGadgetState(4,UseImage(20))
PlayMovie(16,0)
statocella4=1
click=1
EndIf
Case 5
If statocella5=0
SetGadgetState(5,UseImage(20))
PlayMovie(16,0)
statocella5=1
click=1
EndIf
Case 6
If statocella6=0
SetGadgetState(6,UseImage(20))
PlayMovie(16,0)
statocella6=1
click=1
EndIf
Case 7
If statocella7=0
SetGadgetState(7,UseImage(20))
PlayMovie(16,0)
statocella7=1
click=1
EndIf
Case 8
If statocella8=0
SetGadgetState(8,UseImage(20))
PlayMovie(16,0)
statocella8=1
click=1
EndIf
Case 9
If statocella9=0
SetGadgetState(9,UseImage(20))
PlayMovie(16,0)
statocella9=1
click=1
EndIf
Case 33
StopMovie()
CloseWindow(32)
UseWindow(0)
UseGadgetList(WindowID(0))
EndSelect
EndIf
If click=1:ContaMosse+1:EndIf
Gosub Verifica
If vittoria<>0
Goto Fine
EndIf
While click=1
If SceltaFatta=0
numero=Random(8)+1
Select numero
Case 1
If statocella1=0
Delay(1000)
SetGadgetState(1,UseImage(30))
PlayMovie(15,0)
statocella1=2
SceltaFatta=1
click=0
EndIf
Case 2
If statocella2=0
Delay(1000)
SetGadgetState(2,UseImage(30))
PlayMovie(15,0)
statocella2=2
SceltaFatta=1
click=0
EndIf
Case 3
If statocella3=0
Delay(1000)
SetGadgetState(3,UseImage(30))
PlayMovie(15,0)
statocella3=2
SceltaFatta=1
click=0
EndIf
Case 4
If statocella4=0
Delay(1000)
SetGadgetState(4,UseImage(30))
PlayMovie(15,0)
statocella4=2
SceltaFatta=1
click=0
EndIf
Case 5
If statocella5=0
Delay(1000)
SetGadgetState(5,UseImage(30))
PlayMovie(15,0)
statocella5=2
SceltaFatta=1
click=0
EndIf
Case 6
If statocella6=0
Delay(1000)
SetGadgetState(6,UseImage(30))
PlayMovie(15,0)
statocella6=2
SceltaFatta=1
click=0
EndIf
Case 7
If statocella7=0
Delay(1000)
SetGadgetState(7,UseImage(30))
PlayMovie(15,0)
statocella7=2
SceltaFatta=1
click=0
EndIf
Case 8
If statocella8=0
Delay(1000)
SetGadgetState(8,UseImage(30))
PlayMovie(15,0)
statocella8=2
SceltaFatta=1
click=0
EndIf
Case 9
If statocella9=0
Delay(1000)
SetGadgetState(9,UseImage(30))
PlayMovie(15,0)
statocella9=2
SceltaFatta=1
click=0
EndIf
EndSelect
EndIf
Wend
livello=1
If SceltaFatta=1:ContaMosse+1:EndIf
Until Quit=2 Or EventID = #PB_Event_CloseWindow
End
;-livello hard + inizio
HARD:
Repeat
EventID = WaitWindowEvent()
If EventID = #PB_EventMenu
Select EventMenuID()
;Select EventMenuID()
Case 70
Quit=2
Case 60
OpenWindow(32,230,95,335,357,#PB_Window_TitleBar,"ABOUT")
CreateGadgetList(WindowID(32))
UseWindow(32)
ButtonGadget(33, 35, 285, 265, 30, "Ok, Go back to the game")
ImageGadget(31,0,0,100,83,UseImage(31))
PlayMovie(32,0)
EndSelect
EndIf
livello=2
SceltaFatta=0
If EventID = #PB_EventGadget And click=0
Select EventGadgetID()
Case 13
PlayMovie(14,0)
Case 1
If statocella1=0
SetGadgetState(1,UseImage(20))
PlayMovie(16,0)
statocella1=1
click=1
sceltafatta=0
EndIf
Case 2
If statocella2=0
SetGadgetState(2,UseImage(20))
PlayMovie(16,0)
statocella2=1
click=1
sceltafatta=0
EndIf
Case 3
If statocella3=0
SetGadgetState(3,UseImage(20))
PlayMovie(16,0)
statocella3=1
click=1
sceltafatta=0
EndIf
Case 4
If statocella4=0
SetGadgetState(4,UseImage(20))
PlayMovie(16,0)
statocella4=1
click=1
sceltafatta=0
EndIf
Case 5
If statocella5=0
SetGadgetState(5,UseImage(20))
PlayMovie(16,0)
statocella5=1
click=1
sceltafatta=0
EndIf
Case 6
If statocella6=0
SetGadgetState(6,UseImage(20))
PlayMovie(16,0)
statocella6=1
click=1
sceltafatta=0
EndIf
Case 7
If statocella7=0
SetGadgetState(7,UseImage(20))
PlayMovie(16,0)
statocella7=1
click=1
sceltafatta=0
EndIf
Case 8
If statocella8=0
SetGadgetState(8,UseImage(20))
PlayMovie(16,0)
statocella8=1
click=1
sceltafatta=0
EndIf
Case 9
If statocella9=0
SetGadgetState(9,UseImage(20))
PlayMovie(16,0)
statocella9=1
click=1
sceltafatta=0
EndIf
Case 33
StopMovie()
CloseWindow(32)
UseWindow(0)
UseGadgetList(WindowID(0))
EndSelect
EndIf
If click=1:ContaMosse+1:EndIf
If SceltaFatta=0
Gosub Verifica
If vittoria<>0
Goto Fine
EndIf
EndIf
While click=1
scelta=1
If scelta=1: numero=Random(8)+1:EndIf
scelta=scelta+1
Select numero
Case 1
If statocella1=0
Delay(1000)
SetGadgetState(1,UseImage(30))
PlayMovie(15,0)
statocella1=2
SceltaFatta=1
click=0
If SceltaFatta=0
Gosub Verifica
If vittoria<>0
Goto Fine
EndIf
EndIf
EndIf
Case 2
If statocella2=0
Delay(1000)
SetGadgetState(2,UseImage(30))
PlayMovie(15,0)
statocella2=2
SceltaFatta=1
click=0
If SceltaFatta=0
Gosub Verifica
If vittoria<>0
Goto Fine
EndIf
EndIf
EndIf
Case 3
If statocella3=0
Delay(1000)
SetGadgetState(3,UseImage(30))
PlayMovie(15,0)
statocella3=2
SceltaFatta=1
click=0
If SceltaFatta=0
Gosub Verifica
If vittoria<>0
Goto Fine
EndIf
EndIf
EndIf
Case 4
If statocella4=0
Delay(1000)
SetGadgetState(4,UseImage(30))
PlayMovie(15,0)
statocella4=2
SceltaFatta=1
click=0
If SceltaFatta=0
Gosub Verifica
If vittoria<>0
Goto Fine
EndIf
EndIf
EndIf
Case 5
If statocella5=0
Delay(1000)
SetGadgetState(5,UseImage(30))
PlayMovie(15,0)
statocella5=2
SceltaFatta=1
click=0
If SceltaFatta=0
Gosub Verifica
If vittoria<>0
Goto Fine
EndIf
EndIf
EndIf
Case 6
If statocella6=0
Delay(1000)
SetGadgetState(6,UseImage(30))
PlayMovie(15,0)
statocella6=2
SceltaFatta=1
click=0
If SceltaFatta=0
Gosub Verifica
If vittoria<>0
Goto Fine
EndIf
EndIf
EndIf
Case 7
If statocella7=0
Delay(1000)
SetGadgetState(7,UseImage(30))
PlayMovie(15,0)
statocella7=2
SceltaFatta=1
click=0
If SceltaFatta=0
Gosub Verifica
If vittoria<>0
Goto Fine
EndIf
EndIf
EndIf
Case 8
If statocella8=0
Delay(1000)
SetGadgetState(8,UseImage(30))
PlayMovie(15,0)
statocella8=2
SceltaFatta=1
click=0
If SceltaFatta=0
Gosub Verifica
If vittoria<>0
Goto Fine
EndIf
EndIf
EndIf
Case 9
If statocella9=0
Delay(1000)
SetGadgetState(9,UseImage(30))
PlayMovie(15,0)
statocella9=2
SceltaFatta=1
click=0
If SceltaFatta=0
Gosub Verifica
If vittoria<>0
Goto Fine
EndIf
EndIf
EndIf
EndSelect
Wend
livello=2
If SceltaFatta=1:ContaMosse+1:EndIf
If SceltaFatta=0
Gosub Verifica
If vittoria<>0
Goto Fine
EndIf
EndIf
Until Quit=2 Or EventID = #PB_Event_CloseWindow
End
; messaggio$="Under Construction"
;MessageRequester("!!!ALERT!!!",messaggio$,#PB_MessageRequester_Ok)
;Goto Start
;-carico i file binary
;faccia:IncludeBinary "faccia.jpg"
;x:IncludeBinary "x.jpg"
;0:IncludeBinary "0.jpg"
;about:IncludeBinary "about.jpg"
;-Verifica
Verifica:
;Ha vinto il giocatore?
If statocella3=1 And statocella5=1 And statocella7=1:vittoria=1:EndIf
If statocella1=1 And statocella2=1 And statocella3=1:vittoria=1:EndIf
If statocella4=1 And statocella5=1 And statocella6=1:vittoria=1:EndIf
If statocella7=1 And statocella8=1 And statocella9=1:vittoria=1:EndIf
If statocella1=1 And statocella4=1 And statocella7=1:vittoria=1:EndIf
If statocella2=1 And statocella5=1 And statocella8=1:vittoria=1:EndIf
If statocella3=1 And statocella6=1 And statocella9=1:vittoria=1:EndIf
If statocella1=1 And statocella5=1 And statocella9=1:vittoria=1:EndIf
If statocella3=1 And statocella5=1 And statocella7=1:vittoria=1:EndIf
If statocella1=1 And statocella5=1 And statocella9=1:vittoria=1:EndIf
;Ha vinto il computer?
If statocella1=2 And statocella2=2 And statocella3=2:vittoria=2:EndIf
If statocella4=2 And statocella5=2 And statocella6=2:vittoria=2:EndIf
If statocella7=2 And statocella8=2 And statocella9=2:vittoria=2:EndIf
If statocella1=2 And statocella5=2 And statocella9=2:vittoria=2:EndIf
If statocella1=2 And statocella4=2 And statocella7=2:vittoria=2:EndIf
If statocella2=2 And statocella5=2 And statocella8=2:vittoria=2:EndIf
If statocella3=2 And statocella6=2 And statocella9=2:vittoria=2:EndIf
If statocella1=2 And statocella5=2 And statocella9=2:vittoria=2:EndIf
If statocella3=2 And statocella5=2 And statocella7=2:vittoria=2:EndIf
;casi per il livello hard----quelli che seguono
If livello=2 And statocella1=1 And statocella2=1 And click=1
If statocella3=0
Delay(1000)
SetGadgetState(3,UseImage(30))
PlayMovie(15,0)
statocella3=2
SceltaFatta=1
click=0
EndIf
EndIf
If livello=2 And statocella1=1 And statocella4=1 And click=1
If statocella7=0
Delay(1000)
SetGadgetState(7,UseImage(30))
PlayMovie(15,0)
statocella7=2
SceltaFatta=1
click=0
EndIf
EndIf
If livello=2 And statocella5=1 And statocella3=1 And click=1
If statocella7=0
Delay(1000)
SetGadgetState(7,UseImage(30))
PlayMovie(15,0)
statocella7=2
SceltaFatta=1
click=0
EndIf
EndIf
If livello=2 And statocella7=1 And statocella8=1 And click=1
If statocella9=0
Delay(1000)
SetGadgetState(9,UseImage(30))
PlayMovie(15,0)
statocella9=2
SceltaFatta=1
click=0
EndIf
EndIf
If livello=2 And statocella3=1 And statocella6=1 And click=1
If statocella9=0
Delay(1000)
SetGadgetState(9,UseImage(30))
PlayMovie(15,0)
statocella9=2
SceltaFatta=1
click=0
EndIf
EndIf
If livello=2 And statocella4=1 And statocella5=1 And click=1
If statocella6=0
Delay(1000)
SetGadgetState(6,UseImage(30))
PlayMovie(15,0)
statocella6=2
SceltaFatta=1
click=0
EndIf
EndIf
If livello=2 And statocella8=1 And statocella5=1 And click=1
If statocella2=0
Delay(1000)
SetGadgetState(2,UseImage(30))
PlayMovie(15,0)
statocella2=2
SceltaFatta=1
click=0
EndIf
EndIf
If livello=2 And statocella5=1 And statocella9=1 And click=1
If statocella1=0
Delay(1000)
SetGadgetState(1,UseImage(30))
PlayMovie(15,0)
statocella1=2
SceltaFatta=1
click=0
EndIf
EndIf
If livello=2 And statocella2=1 And statocella5=1 And click=1
If statocella8=0
Delay(1000)
SetGadgetState(8,UseImage(30))
PlayMovie(15,0)
statocella8=2
SceltaFatta=1
click=0
EndIf
EndIf
If livello=2 And statocella1=1 And statocella5=1 And click=1
If statocella9=0
Delay(1000)
SetGadgetState(9,UseImage(30))
PlayMovie(15,0)
statocella9=2
SceltaFatta=1
click=0
EndIf
EndIf
If livello=2 And statocella7=1 And statocella5=1 And click=1
If statocella3=0
Delay(1000)
SetGadgetState(3,UseImage(30))
PlayMovie(15,0)
statocella3=2
SceltaFatta=1
click=0
EndIf
EndIf
If livello=2 And statocella6=1 And statocella5=1 And click=1
If statocella4=0
Delay(1000)
SetGadgetState(4,UseImage(30))
PlayMovie(15,0)
statocella4=2
SceltaFatta=1
click=0
EndIf
EndIf
If livello=2 And statocella6=1 And statocella9=1 And click=1
If statocella3=0
Delay(1000)
SetGadgetState(3,UseImage(30))
PlayMovie(15,0)
statocella3=2
SceltaFatta=1
click=0
EndIf
EndIf
If livello=2 And statocella3=1 And statocella9=1 And click=1
If statocella6=0
Delay(1000)
SetGadgetState(6,UseImage(30))
PlayMovie(15,0)
statocella6=2
SceltaFatta=1
click=0
EndIf
EndIf
If livello=2 And statocella7=1 And statocella9=1 And click=1
If statocella8=0
Delay(1000)
SetGadgetState(8,UseImage(30))
PlayMovie(15,0)
statocella8=2
SceltaFatta=1
click=0
EndIf
EndIf
If livello=2 And statocella8=1 And statocella9=1 And click=1
If statocella7=0
Delay(1000)
SetGadgetState(7,UseImage(30))
PlayMovie(15,0)
statocella7=2
SceltaFatta=1
click=0
EndIf
EndIf
If livello=2 And statocella2=1 And statocella3=1 And click=1
If statocella1=0
Delay(1000)
SetGadgetState(1,UseImage(30))
PlayMovie(15,0)
statocella1=2
SceltaFatta=1
click=0
EndIf
EndIf
If livello=2 And statocella4=1 And statocella7=1 And click=1
If statocella1=0
Delay(1000)
SetGadgetState(1,UseImage(30))
PlayMovie(15,0)
statocella1=2
SceltaFatta=1
click=0
EndIf
EndIf
If livello=2 And statocella1=1 And statocella3=1 And click=1
If statocella2=0
Delay(1000)
SetGadgetState(2,UseImage(30))
PlayMovie(15,0)
statocella2=2
SceltaFatta=1
click=0
EndIf
EndIf
If livello=2 And statocella1=1 And statocella7=1 And click=1
If statocella4=0
Delay(1000)
SetGadgetState(4,UseImage(30))
PlayMovie(15,0)
statocella4=2
SceltaFatta=1
click=0
EndIf
EndIf
If livello=2 And statocella3=1 And statocella7=1 And click=1
If statocella5=0
Delay(1000)
SetGadgetState(5,UseImage(30))
PlayMovie(15,0)
statocella5=2
SceltaFatta=1
click=0
EndIf
EndIf
If livello=2 And statocella1=1 And statocella9=1 And click=1
If statocella5=0
Delay(1000)
SetGadgetState(5,UseImage(30))
PlayMovie(15,0)
statocella5=2
SceltaFatta=1
click=0
EndIf
EndIf
;partita patta????
If ContaMosse=9 And vittoria=0:vittoria=3:EndIf
Return
Fine:
If vittoria=1
messaggio$="YOU"
bell=18
EndIf
If vittoria=2
messaggio$="Computer"
bell=17
EndIf
If vittoria=3
messaggio$="Nothing happend!!!Pair!!!"
bell=17
EndIf
PlayMovie(bell,0)
MessageRequester("The winner is:",messaggio$,#PB_MessageRequester_Ok)
SetGadgetState(1,UseImage(19))
SetGadgetState(2,UseImage(19))
SetGadgetState(3,UseImage(19))
SetGadgetState(4,UseImage(19))
SetGadgetState(5,UseImage(19))
SetGadgetState(6,UseImage(19))
SetGadgetState(7,UseImage(19))
SetGadgetState(8,UseImage(19))
SetGadgetState(9,UseImage(19))
Goto start
End
Hi,
I don't know what to do... The Mac version is not tested, thats my opinion. And should be handled as an beta test version. But I don't know how to do.. If there is an meaning to report bugs... Then we have to build small examples (only small code snippets) that shows missing fetaures one by one...
I in this time I stopped my using of the 3.94 Mac version... Waiting and see if we get some directives from the developing team how to do...
//SEO
I don't know what to do... The Mac version is not tested, thats my opinion. And should be handled as an beta test version. But I don't know how to do.. If there is an meaning to report bugs... Then we have to build small examples (only small code snippets) that shows missing fetaures one by one...
I in this time I stopped my using of the 3.94 Mac version... Waiting and see if we get some directives from the developing team how to do...
//SEO

I want to talk about these problems , because i need as soon as possible of an update for mac os x , beacause i think "Pure Basic is the best...BEST...language that i ever know,...simple,easy,powerfull,and i want to work on it seriosly, and all my questions are for an costructive critic, to improve, to contribute to make a version for mac x stable like windows version.....Fred...you're the best!!!
Now,....in my program i found these conditions that don't work....i saw that with debugger(also the debugger close all the application, the step function don't work or work one step.....)
If livello=1:Goto easy:EndIf
If livello=2:Goto hard:EndIf
these commands are of my piece of game tic tac toe
So Fred if you test my game, try it first with win purbasic and then mac x....and...
Thanks Fred!!!
Bug or missing features Mac version 3.94
1 - Not possible to create an menu that also works on Windows (Example PB IDE is not working on Mac)
2 - Load Fonts not work...
3 - Not possible to set an 'Composite' flag to windows
4 - File handle, The app bundle not work in 3.94 (FIXED in later version)
5 - File handle, Not possible to create Preference files to the users Preference folder
6 - The button flag #PB_Button_Default not working (No Pulsate button is generated)
7 - The Application icon is not showing in Message requester
8 - Missing Widow types: Floating Window, Drawer Window, Sheet Window ...
9 - Text Encoding, No Text Encoding handle at all, and an bug in the Debuger that not handle swedish caracter...
/////
IDE
1 - Menu not working, can't open more than one window, example open the Ascii window, then the menu is dead..
2 - Not possible to change the Font size in the Editor or Font names..
/////
As I see, this missing features/Bug there is written or it is not posssible to write some code that explain it better...
/SEO
1 - Not possible to create an menu that also works on Windows (Example PB IDE is not working on Mac)
2 - Load Fonts not work...
3 - Not possible to set an 'Composite' flag to windows
4 - File handle, The app bundle not work in 3.94 (FIXED in later version)
5 - File handle, Not possible to create Preference files to the users Preference folder
6 - The button flag #PB_Button_Default not working (No Pulsate button is generated)
7 - The Application icon is not showing in Message requester
8 - Missing Widow types: Floating Window, Drawer Window, Sheet Window ...
9 - Text Encoding, No Text Encoding handle at all, and an bug in the Debuger that not handle swedish caracter...
/////
IDE
1 - Menu not working, can't open more than one window, example open the Ascii window, then the menu is dead..
2 - Not possible to change the Font size in the Editor or Font names..
/////
As I see, this missing features/Bug there is written or it is not posssible to write some code that explain it better...
/SEO
Explorer TreeGadget
Desscription of bugs is in the header of the Example code...
Desscription of bugs is in the header of the Example code...
Code: Select all
;==========================================================================================================
;
; DATE : 2006-01-04
; COMPILER/IDE ; PB 3.34 MAC
; OS : OS X 10.4.3
;
; DESCRIPTION 1 : ExplorerTreeGadget()
; : In the Help File:: A Directory of "" will display the root and set "." as pattern
; : In this case the ExplorerTreegadget is empty.
; WORKAROUND : Set the Directory to "/"
; : In this case It is also showing 'hidden system folders'
;
;
;
; DESCRIPTION 2 : ExplorerTreeGadget()
; : Not show any harddisks or other drives
;
;
; DESCRIPTION 3 : ToolTip not working
;
; OTHERS : THERE IS NO SETTINGS TO HIDE/SHOW SCROLL BARS ??
; : Not possible to set 'Show Hidden system folders' ON/OFF
;
;
; TIP : Hidden folders on OS X start with '.' (stop) in the folder name
;
;
;===========================================================================================================
Enumeration
#Main_Window
EndEnumeration
#Directory = "/" ; "/Users/sveneolsson/Documents/"
Procedure Open_Main_Window()
Protected wHeight, wWidth
wHeight = 500
wWidth = 500
If OpenWindow(#Main_Window, 60,60,wWidth, wHeight, #PB_Window_SystemMenu | #PB_Window_MinimizeGadget |#PB_Window_ScreenCentered, "Explorer Tree Gadget")
CreateGadgetList(WindowID(#Main_Window))
ExplorerTreeGadget(0,20, 14,wWidth-40, wHeight-34,#Directory)
GadgetToolTip(0,"ToolTip For Gadget")
EndIf ; OpenWindow
EndProcedure
Open_Main_Window()
Repeat
EventID = WaitWindowEvent()
Select EventID
EndSelect ;EventID
Until EventID = #PB_Event_CloseWindow
End ; Terminate application
to test with win , it's better with mediasLESTROSO wrote:Thank you Fred and Seo!!!!
I want to talk about these problems , because i need as soon as possible of an update for mac os x , beacause i think "Pure Basic is the best...BEST...language that i ever know,...simple,easy,powerfull,and i want to work on it seriosly, and all my questions are for an costructive critic, to improve, to contribute to make a version for mac x stable like windows version.....Fred...you're the best!!!
Now,....in my program i found these conditions that don't work....i saw that with debugger(also the debugger close all the application, the step function don't work or work one step.....)
If livello=1:Goto easy:EndIf
If livello=2:Goto hard:EndIf
these commands are of my piece of game tic tac toe
So Fred if you test my game, try it first with win purbasic and then mac x....and...
Thanks Fred!!!

Please correct my english
http://purebasic.developpez.com/
http://purebasic.developpez.com/
SpinGadget Example in the Help Files
When using this Example it is impossible to close the app (window) using the close widget, only way to close is using 'Force Quit' ...
When using this Example it is impossible to close the app (window) using the close widget, only way to close is using 'Force Quit' ...
Code: Select all
If OpenWindow(0,0,0,140,70,#PB_Window_SystemMenu|#PB_Window_ScreenCentered,"SpinGadget") And CreateGadgetList(WindowID(0))
SpinGadget (0,20,20,100,25,0,1000)
SetGadgetState (0,5) : SetGadgetText(0,"5") ; set initial value
Repeat
Event = WaitWindowEvent()
If EventGadgetID() = 0
SetGadgetText(0,Str(GetGadgetState(0)))
WindowEvent() ; absolutely needed to avoid endless event-loops
EndIf
Until Event = #PB_Event_CloseWindow
EndIf
Sorry, I don't under stand .. 'Put data here' wich data? where ... No I don't put Resources inside an app, I use external fileas and images...Dear comptois, i cannot put datas here....it.is impossible....
Seo, have you tryed to compile an application and you cannot see your resources??like cathimage,include binary wan't funtion....
//SEO
Run Program
Returns values higher than zero ..
But NOT Launch the application
Tested on both Unix exectuable files and .app files...
Returns values higher than zero ..
But NOT Launch the application
Tested on both Unix exectuable files and .app files...
Code: Select all
FileName$ = "/Users/sveneolsson/Desktop/SE-FileCreator300fc7/SE-FileCreator 3.0.0 fc7.app"
Parameters$ =""
WorkingDirectory$ = "/Users/sveneolsson/Desktop/SE-FileCreator300fc7/"
Result = RunProgram(FileName$ , Parameter$, WorkingDirectory$,#PB_RunProgram_Wait)
Debug result