Let me try to explain the problem again.

Basically I want a sequential group of buttons to each successively show an 
image and then play a wav file with no intervention. I also want the active 
button show that it has the focus. This behaves as I want in j406.

This code works in j406:

pos=:0 0 24 40

each=: &.>

STUDY=: 0 : 0
pc study closeok nomax nosize;
)

study_P0_button=: 3 : 0
wd STUDY
x=: 'xywh  0 0 32 30;cc P1 button;cn 1;' 
y=: 'xywh 32 0 32 30;cc P2 button;cn 2;'
AAA=:x,:y
wd AAA
wd 'pshow;ptop'

wd Q=:'xywh ',(":40 40 120 100),' ;cc board isipicture'
wd 'pas 0 0' 
wd 'psel study;'
wd 'set board c:\j406\system\examples\data\j.bmp;'

wd 'winexec "c:\j406\lla\mplayer2.exe c:\j406\lla\00will.wav";'
6!:3 (2)
wd 'setfocus P1;'

)

study_P1_button=: 3 :0
wd 'set board c:\j406\system\examples\data\jbw.bmp;'
wd 'winexec "c:\j406\lla\mplayer2.exe c:\j406\lla\01will.wav";'
wd 'setfocus P2;'
)

study_close=: 3 : 0
wd 'pclose'
)

study_exit_button=: ps_cancel=: ps_close

study_P0_button ''
6!:3 (4)

study_P1_button ''


Next I have made changes necessary for j602,  but I can't duplicate the 
behavior I want. I must close the mplayer and click on the button 1 :

require 'bmp gl2'

study_g_paint=: 3 : 0
glpixels_jgl2_ (0 0,|.$DAT),,DAT
)

STUDY=: 0 : 0
pc study closeok;
)

study_P0_button=: 3 : 0
wd STUDY
u=: 'xywh  0 0 32 30;cc P1 button;cn 1;' 
v=: 'xywh 32 0 32 30;cc P2 button;cn 2;'
AA=:u,:v
wd AA
wd 'pshow;ptop'
DAT=: readbmp 'c:\jsoftware\j602\system\examples\data\toucan.bmp'
DAT=:256 #.  [256 256 256 #: DAT
wd Q=:'xywh ',(":40 40 120 100),' ;cc g isigraph'
wd 'pas 0 0'
NB.wd 'winexec "c:\jsoftware\j602\lla\mplayer2.exe 
c:\jsoftware\j602\lla\00will.wav";'
wd 'setfocus P1;'
)

study_P1_button=: 3 :0
DAT=: readbmp 'c:\jsoftware\j602\system\examples\data\jbox.bmp'
DAT=:256 #.  [256 256 256 #: DAT
wd Q
NB.wd 'winexec "c:\jsoftware\j602\lla\mplayer2.exe 
c:\jsoftware\j602\lla\01will.wav";'
wd 'setfocus P2;'
)

study_P0_button ''






**************
Start the year off right.  Easy ways to stay in shape.
     
http://body.aol.com/fitness/winter-exercise?NCID=aolcmp00300000002489
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to