ExecFile in BlitzMax?
BlitzMax Forums/BlitzMax Beginners Area/ExecFile in BlitzMax?
| ||
Have to say the documentation for BlitzMax reads like a tax return. Whats the easiest way to call something like mplayer from within BlitzMax? eg. a similar command to ExecFile in Blitz+. Secondly, on B+ when drawing text over an image, i used to use Color(255,0,255) DrawText(etc) This also affects the colour of the background image.. Am I missing somthing simple here? All help appreciated. Regards |
| ||
eg. a similar command to ExecFile in Blitz+. OpenURL() Secondly, on B+ when drawing text over an image, i used to use Color(255,0,255) DrawText(etc) This also affects the colour of the background image.. Presently, it would be something like: SetBlend ALPHABLEND SetColor 255,0,255 DrawText("Whatever",10,10) SetBlend SOLIDBLEND 'or ALPHABLEND or LIGHTBLEND or whatever SetColor 255,255,255 DrawImage(img,0,0) |
| ||
Cheers, still getting to grips with BMax. So OpenURL will execute mplayer on Linux with arguements? |
| ||
Yep, it should. I remember OpenURL being "rewritten" in the past to fully execute files, instead of just webpages. |
| ||
I'd use System_ "mplayer "+args |
| ||
To execute processes and have control of them take a look at PUB.FreeProcess. Sadly it isn't documented but just take a look at the source on how to use it. I think CreateProcess(cmd:String) will do the trick. |
| ||
I'd use System_ "mplayer "+args Which is what the linux system driver uses behind OpenURL. :) |
| ||
Many thanks for your advice, will give it a whirl. Best Regards, |
| ||
If memory serves, you should probably use driver.OpenURL(). This is called from the regular OpenURL() function after some processing to check for http and such. |
| ||
Ok, I've created a few scripts to set system volume, mainly: amixer -q -c 0 set Master 64 These are all located in the game directory. When opening a temrinal and in the directory, running the scripts with: ./volume10.sh works fine. In my BMax application, using: System_ ("./volume10.sh") does nothing if not lock my app up. What am I missing here? Best Regards, |
| ||
I dont know about whats causing your app to lock up but personally I cant stand games or apps that set the system volume, its really kind of intrusive unless they have a volume control that you can change that will change the system value if you wish to change it but not on startup... |
| ||
This is an embedded project, whereby the operator can set the volume of the game terminal in an arcade - however this needs to be done from withing the game code via a menu system. Anyway, all sorted - BMax V1.36 sorted the problem. system_("./volume10.sh") does exactly what it should. ;) |
| ||
wow I didnt know about the system command... |