How to detect if some specific file type can be opened (riscoscloverleaf)
Sergey Lentsov (8268) 63 posts |
Hello, I try to implement video play in the !ChatCube. I would like to download video from net and then run it with “*Filer_Run Question, how to check is specific file type can be opened? |
Stuart Swales (1481) 351 posts |
I’d just check for the existence of the variable Alias$@RunType_XXX where XXX is the hex file type. This will tell you that at least some program is registered as willing to run that file. It might not be the actual program that does run it when you invoke *Filer_Run as it may be claimed by a different running application. |
Sergey Lentsov (8268) 63 posts |
@Stuart Swales Thank you for this trick! |
Raik (463) 2061 posts |
I think *Filer_Run is not a good way to play the downloaded video. SYS “Wimp_StartTask”,"FFplay:!AutoPlay “+ filetoplay$ +” TO playerTask% or SYS “Wimp_StartTask”,"<Mplayer$Dir>.!Run “+ filetoplay$ +” 1>NULL: 2>&1" TO playerTask% from your own app. |