%cd player version 0.2! lol
%made By Isaac Emesowum
import GUI
var Stop, Play, Pause, FForward, Rewind, load, Quit : int
View.Set ("graphics:200;50, title:CD PLAYER, position:center, center,buttonbar")
process music (track : string)
var track2 : string := "cd:" + track
Music.PlayFile (track2)
end music
proc track_get
var track := Window.Open ("buttonbar,graphics:100;100, title:Pick Track Number, position:center, center")
var track_string : string
loop
put "Enter Track Number"
get track_string
if strintok (track_string) = true
then
exit
end if
cls
end loop
Window.Close (track)
fork music (track_string)
end track_get
proc play_p
GUI.Hide (Play)
GUI.Show (Stop)
track_get
end play_p
proc stop_p
GUI.Hide (Stop)
Music.PlayFileStop
GUI.Show (Play)
end stop_p
proc main
Play := GUI.CreateButton (0, 0, 0, "Play", play_p)
Stop := GUI.CreateButton (61, 0, 0, "Stop", stop_p)
Quit := GUI.CreateButton (122, 0, 0, "Quit", GUI.Quit)
end main
main
loop
exit when GUI.ProcessEvent
end loop
assert false
|