Home   Archive   Permalink



Issues with running tutorials

Hi, I've just discovered REBOL within this past week. It seems pretty great, but I'm still trying to get it. I've programmed in BASIC, C, C++, eC, and I've tried without success to comprehend Java, though I will confess to being an amateur. REBOL is very different...
    
So, I'm picking up from the tutorials at http://www.rebol.com and in tutorial 5 Carl has us running Windows Media Player. I've tried a variety of ways of writing the path to wmplayer.exe, and the interpreter seems to run it, but Media Player never opens... the Windows path is C:\Program Files (x86)\Windows Media Player\wmplayer.exe
    
I've tried:
call "C:\Program Files (x86)\Windows Media Player\wmplayer.exe"
call "/C/Program Files (x86)/Windows Media Player/wmplayer.exe"
call %"C:\Program Files (x86)\Windows Media Player\wmplayer.exe"
call %"/C/Program Files (x86)/Windows Media Player/wmplayer.exe"
call %C:\Program%20Files%20(x86)\Windows%20Media%20Player\wmplayer.exe
call %"C:\Program%20Files%20(x86)\Windows%20Media%20Player\wmplayer.exe"
    
... and as near as I can tell every possible combination of any of the above, however it's still not launching Media Player. I've tried this both from the Console and from the Rebol-View Desktop ide. What am I doing wrong?

posted by:   Charlie       18-Jun-2013/0:03:44-7:00



Hi, the first line *should* normally work, but, as it happens, it doesn't work for me either (in this special case of wmplayer)!
But I have a workaround, which also supports spaces in the filename to play:
========> Rebol script:
R E B O L []
file_to_play: "G:\multimedia\Muziek\Orgel\Hans Houtman Examen\01 - Track 1.wav"
myfile: to-file rejoin ["/" first file_to_play skip file_to_play 2]
call/console reduce ["mycall.cmd" myfile]
========> Windows cmd script:
"C:\Program Files\Windows Media Player\wmplayer.exe" %1 %2 %3 %4 %5 %6 %7 %8 %9
    


posted by:   Arie van Wingerden       19-Jun-2013/6:33:40-7:00



So, to be clear, I would be running a script which would in turn run media player. Instead of running it directly? Why can't we run it directly?

posted by:   Charlie       20-Jun-2013/1:53:27-7:00



As I said: it does work with other Windows programs directly. Somehow wmplayer.exe behaves different from most programs. Why? I don't know! It is a pity however; I agree...

posted by:   Arie van Wingerden       20-Jun-2013/13:20:33-7:00



Try /show refinement with CALL:
    
     call/show to-rebol-file "C:\Program Files (x86)\Windows Media Player\wmplayer.exe"
    
and try to find the error if it doesn't work:
     err: make string! 255
     call/show to-rebol-file "C:\Program Files (x86)\Windows Media Player\wmplayer.exe"
     print err
    
And try with Rebol 2.7.6 instead of 2.7.8 (call works better on 2.7.6)


posted by:   Endo       5-Aug-2013/17:32:51-7:00



submit response

posted by:   h t d i w       4-Nov-2013/6:55:13-8:00



What I do when working with "call" (because I too have trouble with it) is to put the command I want to run in a DOS batch file:
    
"C:\Program Files\Windows Media Player\wmplayer.exe"
    
and then call the batch file:
    
R E B O L [
]
    
; -- This does not work:
;call "C:\Program Files\Windows Media Player\wmplayer.exe"
    
; -- This does work:
call %wmplayer.bat
    
    


posted by:   Steven White       12-Nov-2013/11:43:31-8:00



Steve, this does work properly (the show option is required):
    
call/show "C:\Program Files\Windows Media Player\wmplayer.exe"
    
The show option changed - it used to be the default, and you needed to hide the window if it wasn't wanted. In the last few releases, show is required if you want to see the application. It is running, BTW, using call "C:\Program Files\Windows Media Player\wmplayer.exe" . Check your task manager, and you'll see wmplayer.exe running (it's just not visible).

posted by:   Nick       12-Nov-2013/18:39:38-8:00