Hi everyone..
I'm new to Darkbasic and I've been trying to make a simple program to play audio cd's in. It works fine when run through Darkbasic, but when I try to make an executable it doesn't work.
If anyone has any suggestions or knows that what I want to do isn't possible, your help would be appreciated.
Here's My Code If It Helps...
`````AUDIO CD PLAYER`````
```MANUAL SYNC```````````````````````````
sync on
sync rate 0
cls
ink rgb(240,240,240),rgb(255,255,255)
`````````````````````````````````````````
`````````````````````````````````````````
```Turn On Window Mode```````````````````
SET WINDOW ON
SET WINDOW TITLE "MR MCK'S CD PLAYER"
`````````````````````````````````````````
`````````````````````````````````````````
```The Main Menu`````````````````````````
Menu:
DO
If Button(20,30,"Play The CD")=1 then Goto Playback
If Button(20,60,"Play A Track")=1 then Goto TrackSelect
SYNC
LOOP
`````````````````````````````````````````
`````````````````````````````````````````
```CD PLAYBACK```````````````````````````
Playback:
LOAD CDMUSIC 1,1
Play Music 1
DO
CLS
If Button(20,30,"Play")=1 THEN Play Music 1
If Button(20,60,"Pause")=1 and Music Playing(1)=1 THEN Pause Music 1
If Button(20,120,"QUIT")=1 THEN END
If Button(20,90,"Stop")=1 and Music Playing(1)=1 THEN Stop Music 1
IF keystate(2)=1
LOAD CDMUSIC 1,1
Play Music 1
ENDIF
IF keystate(3)=1
LOAD CDMUSIC 2,1
Play Music 1
ENDIF
IF keystate(4)=1
LOAD CDMUSIC 3,1
Play Music 1
ENDIF
IF keystate(5)=1
LOAD CDMUSIC 4,1
Play Music 1
ENDIF
IF keystate(6)=1
LOAD CDMUSIC 5,1
Play Music 1
ENDIF
IF keystate(7)=1
LOAD CDMUSIC 6,1
Play Music 1
ENDIF
IF keystate(8)=1
LOAD CDMUSIC 7,1
Play Music 1
ENDIF
IF keystate(9)=1
LOAD CDMUSIC 8,1
Play Music 1
ENDIF
IF keystate(10)=1
LOAD CDMUSIC 9,1
Play Music 1
ENDIF
SYNC
LOOP
`````````````````````````````````````````
`````````````````````````````````````````
```Track Selection Menu``````````````````
TrackSelect:
DO
CLS
input "Enter Track # : ",track#
CLS
LOAD CDMUSIC track#,1
Play MUSIC 1
SYNC
LOOP
`````````````````````````````````````````
`````````````````````````````````````````
```Button Function```````````````````````
function Button(x1,y1,WORDS$)
Pressed=0
x2=Text Width(WORDS$)
y2=Text Height(WORDS$)
if mousex()>x1 and mousex()<x1+x2
if mousey()>y1-y2 and mousey()<y1+y2
Pressed=1
endif
endif
if pressed=1 then ink rgb(255,0,0),0 else ink rgb(255,255,255),0
if pressed=1
Pressed=Mouseclick()
else
pressed = 0
endif
text x1,y1,WORDS$
endfunction pressed
Uisce Beatha tagann tapa dhuitt!