First, thanks for all your help so far. Here is the essence of the problem.
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 ''
You will need two *.wav files and a copy of some shareware code for playing
the files.
Back then mplayer2 was a simple choice.
I put the two sound files and mplayer.exe in a folder with my initials -
lla
The problem is to get one button to execute the next and show the focus
appropriately.
Here is my progress so far with j602;
Any improvements to the code would be most appreciated.
Thanks, Linda
**************************************
See AOL's top rated recipes
(http://food.aol.com/top-rated-recipes?NCID=aoltop00030000000004)
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm