question about mci
question about mci
hello pb family, i am a new user of pb just one month and i often face this term mci so : 1/ what is mci? 2/ can i use it as pb demo user? 3/ if yes, how can i use it?
best regards
best regards
Re: question about mci
You cannot use them without buying the license.
Re: question about mci
thank you for your replyOlliv wrote:You cannot use them without buying the license.
-
- Addict
- Posts: 1443
- Joined: Wed Nov 12, 2008 5:01 pm
- Location: Russia
Re: question about mci
You about this? https://en.wikipedia.org/wiki/Media_Control_Interface
In the demo version you can use API functions. Example.
In the demo version you can use API functions. Example.
Code: Select all
If OpenLibrary(0, "User32.dll")
CallFunction(0, "MessageBoxW", 0, @"Hello", @"World", 0)
CloseLibrary(0)
EndIf
Re: question about mci
Ups... I looped a step : API are available on demo version via library functions.
On complete license, I suppose equivalent code is?
On complete license, I suppose equivalent code is
Code: Select all
MessageBox_(0, "Hello", "World", 0)
Re: question about mci
hello friends, thank you. so can you help with this uncomplete code
please debug this code to work on demo.
regards
Code: Select all
openlibrary(0, "winmm.dll")
callfunction(0, "mcisendstring")
mci("play")
mci("stop")
closelibrary(0)
regards
Re: question about mci
Take the code of UserRussian, and ask several questions in the "coding questions" section to be sure to have good answers.
-
- Addict
- Posts: 1443
- Joined: Wed Nov 12, 2008 5:01 pm
- Location: Russia
Re: question about mci
Code: Select all
Prototype mciSendString(lpszCommand.p-unicode, *lpszReturnString=0, *cchReturn=0, *hwndCallback=0)
If OpenLibrary(0, "winmm.dll")
mci.mciSendString = GetFunction(0, "mciSendStringW")
If mci
File.s = OpenFileRequester("", "", "Music|*.wav;*.mp3", 0)
If File
mci(~"open \""+File+~"\" type MpegVideo ALIAS Music")
mci("play Music")
MessageRequester("", "")
mci("stop Music")
mci("close Music")
EndIf
EndIf
CloseLibrary(0)
EndIf
Re: question about mci
I did not think prototypes was available on demo. Thank you User Russian, for having managed the Khalidels question very cleverly.
Re: question about mci
thank you but have you tested it because it is still not accepted in demo. errors like : structure not found mcisendstring. mci() is not recognized.User_Russian wrote:Code: Select all
Prototype mciSendString(lpszCommand.p-unicode, *lpszReturnString=0, *cchReturn=0, *hwndCallback=0) If OpenLibrary(0, "winmm.dll") mci.mciSendString = GetFunction(0, "mciSendStringW") If mci File.s = OpenFileRequester("", "", "Music|*.wav;*.mp3", 0) If File mci(~"open \""+File+~"\" type MpegVideo ALIAS Music") mci("play Music") MessageRequester("", "") mci("stop Music") mci("close Music") EndIf EndIf CloseLibrary(0) EndIf
sincerely
Re: question about mci
Life is much easier with the full version and having direct access to API commands.
Best to buy full version
Best to buy full version
Code: Select all
#Lib=0
Procedure.i Mci(command.s)
buffer.s=Space(256)
ProcedureReturn CallFunction(#Lib,"mciSendStringW",@command,@buffer,256,0)
EndProcedure
If OpenLibrary(#Lib, "winmm.dll")
File.s = OpenFileRequester("", "", "Music|*.wav;*.mp3|Video|*.mp4", 0)
If File
mci("open "+Chr(34)+file+Chr(34)+" type MpegVideo ALIAS Music")
mci("play Music")
MessageRequester("", "")
mci("stop Music")
mci("close Music")
EndIf
CloseLibrary(#Lib)
EndIf
Re: question about mci
+1Paul wrote:Life is much easier with the full version and having direct access to API commands.
Best to buy full version
Hygge
-
- Addict
- Posts: 1443
- Joined: Wed Nov 12, 2008 5:01 pm
- Location: Russia
Re: question about mci
Yes. I tested in demo 5.50 Win x86 and 5.70 Win x86. The code compiled without errors and worked fine.khalidel wrote:but have you tested it because it is still not accepted in demo.
Re: question about mci
sorry you are right. it works well with demo. best regardsUser_Russian wrote:Yes. I tested in demo 5.50 Win x86 and 5.70 Win x86. The code compiled without errors and worked fine.khalidel wrote:but have you tested it because it is still not accepted in demo.
Re: question about mci
thank you too, your code is also working well.Paul wrote:Life is much easier with the full version and having direct access to API commands.
Best to buy full version
Code: Select all
#Lib=0 Procedure.i Mci(command.s) buffer.s=Space(256) ProcedureReturn CallFunction(#Lib,"mciSendStringW",@command,@buffer,256,0) EndProcedure If OpenLibrary(#Lib, "winmm.dll") File.s = OpenFileRequester("", "", "Music|*.wav;*.mp3|Video|*.mp4", 0) If File mci("open "+Chr(34)+file+Chr(34)+" type MpegVideo ALIAS Music") mci("play Music") MessageRequester("", "") mci("stop Music") mci("close Music") EndIf CloseLibrary(#Lib) EndIf