ArianeSoft - Programming and development for Windows and Windows Mobile :: Forums :: PPL - Pocket Programming Language :: Code sharing |
|
<< Previous thread | Next thread >> |
Something for you all to share |
Moderators: kornalius, bmanske, PointOfLight
|
Author | Post | ||
Mike Halliday |
| ||
Registered Member #671 Joined: Tue Sep 25 2007, 12:22pmPosts: 400 | Been working on this for an hour or so, just because its not been done before in PPL. Don't get too excited, its very simple and quite poor in the fact that PPL locks up until the app is finished. But it proves it can be done. As ever, souce code included for you to hack and improve on (and boy does it need improving on) Enjoy. 1213395110_671_FT0_showavi.zip Editor of \'Voice of the PPL\' the newsletter for the PPL by the PPL! Still trying to get people to contribute to the newsletter! | ||
Back to top | | ||
PointOfLight |
| ||
Registered Member #49 Joined: Sun Sep 17 2006, 03:02pmPosts: 1129 | First of all, this is pretty cool. I was going to play with the code a bit, however, and as it turns out I can't run an AVI file when launching the program through the PIDE I think the problem is that you didn't include the frm file with the upload. It appears instead that you just included the composite file PPL creates before making the executable. Any chance you could re-upload with the original sources? Eric Pankoke Founder Point Of Light Software http://www.polsoftware.com/ | ||
Back to top | | ||
Mike Halliday |
| ||
Registered Member #671 Joined: Tue Sep 25 2007, 12:22pmPosts: 400 | I have loaded the .ppl file from a folder without the .frm file and it works fine for me. I always use the .ppl source for the form, and never the form itself. I just use the form creator to make the initial form, then develop with the .ppl code. I do not have a showavi.frm file anywhere on my system so I dont know how I am able to run this without it!!!! I have even copied the .ppl file to the HD (Away from the memory stick) and it still runs under the IDE. Very strange. I suppose you could always create your own form and use my code Editor of \'Voice of the PPL\' the newsletter for the PPL by the PPL! Still trying to get people to contribute to the newsletter! | ||
Back to top | | ||
kornalius |
| ||
Registered Member #1 Joined: Wed Apr 19 2006, 08:25pmPosts: 2783 | Does this work on PocketPC ? I would love to get a library for this to include in PPL 2.0. I will rewrite in object-oriented tro make it very easy to use. Regards, Alain Deschenes President and programmer ArianeSoft Inc. (http://www.arianesoft.ca) | ||
Back to top | | ||
zehlein |
| ||
Registered Member #30 Joined: Tue Sep 12 2006, 03:00pmPosts: 449 | Doesn't work at all for me here. Even the precompiled exe Mike provided. There is a crack, a crack in everything. That's how the light gets in. (L. Cohen) | ||
Back to top | | ||
Mike Halliday |
| ||
Registered Member #671 Joined: Tue Sep 25 2007, 12:22pmPosts: 400 | I dont get this! I have run the .EXE on my main Vista machine and it works fine. I load it in PPL under vista and it does not work. It does run, but does not play the movie. (Wonder if this is what Eric was talking about? - I will re-jig the code and do it properly and at the same time check on the PPC for a compatible DLL library) See if we can get AVI playing as a standard part of PPL! Editor of \'Voice of the PPL\' the newsletter for the PPL by the PPL! Still trying to get people to contribute to the newsletter! | ||
Back to top | | ||
Mike Halliday |
| ||
Registered Member #671 Joined: Tue Sep 25 2007, 12:22pmPosts: 400 | I have compiled it for WM5 and the app loads, but like under Vista does not play the avi file. I wonder if the MCI routines from W98/XP are no longer present in newer/mobile OSs?? More investigation is needed here I think Editor of \'Voice of the PPL\' the newsletter for the PPL by the PPL! Still trying to get people to contribute to the newsletter! | ||
Back to top | | ||
PointOfLight |
| ||
Registered Member #49 Joined: Sun Sep 17 2006, 03:02pmPosts: 1129 | I was able to get the program to run through the PIDE once I uncommented the line defining mmdll. Also, if you take the word "wait" out of the command to play the AVI, it won't freeze your program while the AVI is playing. Eric Pankoke Founder Point Of Light Software http://www.polsoftware.com/ | ||
Back to top | | ||
jdixon |
| ||
Registered Member #1001 Joined: Tue May 20 2008, 01:45pmPosts: 5 | Hello all, I am not a programer but I like to poke around a little. I get the form to open and load the file but nothing happens. It amazies my how you can though a program together... One good thing about ppl and this forum I am learning a lot and I can try it out code right then. Thank You juan | ||
Back to top | | ||
Mike Halliday |
| ||
Registered Member #671 Joined: Tue Sep 25 2007, 12:22pmPosts: 400 | ooo, thanks Eric, I have the MCI command set document from MSDN, but have not looked through it. I can see a PPL media player coming soon, but sadly I think, only for XP. It does appear that winmm.dll is not usable in vista or Windows Mobile. The #defines for mmdll were commented because I have changed my defs.ppl file to include it. - Doh, should have mentioned that you needed those in there. Now all I need is a Pocket PC version of winmm.dll and we are laughing. @jDixon: - PPL makes it easy to throw programs together. especially games. The physics engine and the map editors tae a while to get used to, but they help greatly. (I am not a programmer [i], but I like to poke around and fiddle with code, so I am learning all the time) Editor of \'Voice of the PPL\' the newsletter for the PPL by the PPL! Still trying to get people to contribute to the newsletter! | ||
Back to top | | ||
Mike Halliday |
| ||
Registered Member #671 Joined: Tue Sep 25 2007, 12:22pmPosts: 400 | Ok Guys, here is the modified version. 1. It now works in VISTA too (For those of you who have not changed defs.ppl to include the mmdll.dll then uncomment the first few lines of code) 2. If does not freeze the PC when running a video and choosing OPEN will close the previous MCI session I still cannot get this to work on PPC though. CoreDLL.dll must not have MCI functions in it. Not surprising as PPCs came out long after Video for windows was superceeded. (Thanks for the Pointers Eric!) 1213640136_671_FT9665_showavi.zip Editor of \'Voice of the PPL\' the newsletter for the PPL by the PPL! Still trying to get people to contribute to the newsletter! | ||
Back to top | | ||
zehlein |
| ||
Registered Member #30 Joined: Tue Sep 12 2006, 03:00pmPosts: 449 | Mike, it's still not working on my XP-machine. Opening the avi and exiting the program works. Playing the video doesn't. I searched for the winmm.dll - it's located in one of the windows subdirectories. No idea why there is no playback on my machine. There is a crack, a crack in everything. That's how the light gets in. (L. Cohen) | ||
Back to top | | ||
Mike Halliday |
| ||
Registered Member #671 Joined: Tue Sep 25 2007, 12:22pmPosts: 400 | did you uncomment the #define at the start of the code? Editor of \'Voice of the PPL\' the newsletter for the PPL by the PPL! Still trying to get people to contribute to the newsletter! | ||
Back to top | | ||
zehlein |
| ||
Registered Member #30 Joined: Tue Sep 12 2006, 03:00pmPosts: 449 | Yes I did. There is a crack, a crack in everything. That's how the light gets in. (L. Cohen) | ||
Back to top | | ||
Mike Halliday |
| ||
Registered Member #671 Joined: Tue Sep 25 2007, 12:22pmPosts: 400 | Hmmm. Is winmm.dll registered properly? other than that, I dont know what the problem could be. It does depend on what AVI you are trying to view. Only Video for Windows 1.1 format AVI;s seem to work. I tried a DIVX avi file and it would not play. Editor of \'Voice of the PPL\' the newsletter for the PPL by the PPL! Still trying to get people to contribute to the newsletter! | ||
Back to top | | ||
PointOfLight |
| ||
Registered Member #49 Joined: Sun Sep 17 2006, 03:02pmPosts: 1129 | Here's a slightly updated version of the program. It most likely won't fix anything, but hopefully it will tell us what's not working for you, zehlein. I changed all of the mciSendString commands to mciExecute, which will pop up an error dialog if you try to do something the MCI functions don't like. I also added a flag to indicate that a device is open so that the program will only try to close an open device (otherwise mciExecute throws an error the first time you try to open a file). 1213722776_49_FT9665_showavi.zip Eric Pankoke Founder Point Of Light Software http://www.polsoftware.com/ | ||
Back to top | | ||
zehlein |
| ||
Registered Member #30 Joined: Tue Sep 12 2006, 03:00pmPosts: 449 | Eric, whatever you have changed to the code, it is working now! There is a crack, a crack in everything. That's how the light gets in. (L. Cohen) | ||
Back to top | | ||
PointOfLight |
| ||
Registered Member #49 Joined: Sun Sep 17 2006, 03:02pmPosts: 1129 | I didn't do it Actually, did the directory of the AVI file have spaces in it anywhere? It seems there is a "feature" with the MCI calls that requres you to either use standard 8.3 file names / directories, or to quote the entire file name in strings. I changed the code to put the file name in quotes, and I wonder if that's what fixed it for you. Eric Pankoke Founder Point Of Light Software http://www.polsoftware.com/ | ||
Back to top | | ||
Mike Halliday |
| ||
Registered Member #671 Joined: Tue Sep 25 2007, 12:22pmPosts: 400 | HHHMMM, 8.3 naming - that would not surprise me as we are looking at video for windows 1.1 which to be fair was from 1992 - way before long filenames. WINMM.dll has probably not been changed since. @Zehlein: glad its working for you now Editor of \'Voice of the PPL\' the newsletter for the PPL by the PPL! Still trying to get people to contribute to the newsletter! | ||
Back to top | | ||
Mike Halliday |
| ||
Registered Member #671 Joined: Tue Sep 25 2007, 12:22pmPosts: 400 | HHHMMM, 8.3 naming - that would not surprise me as we are looking at video for windows 1.1 which to be fair was from 1992 - way before long filenames. WINMM.dll has probably not been changed since. @Zehlein: glad its working for you now Editor of \'Voice of the PPL\' the newsletter for the PPL by the PPL! Still trying to get people to contribute to the newsletter! | ||
Back to top | | ||
PointOfLight |
| ||
Registered Member #49 Joined: Sun Sep 17 2006, 03:02pmPosts: 1129 | Hey, there seems to be an echo in here So far I haven't found anything really talking about the alternatives to mciSendString on the PocketPC, but I have seen a lot of indications that you are 100% correct about mciSendString not working on the PocketPC. I will keep digging to see if I can come up with anything. Eric Pankoke Founder Point Of Light Software http://www.polsoftware.com/ | ||
Back to top | | ||
Mike Halliday |
| ||
Registered Member #671 Joined: Tue Sep 25 2007, 12:22pmPosts: 400 | hee hee - I had not realised I had posted twice. Could be that MS removed it on the PPC and replaced it with something else. Wonder if CoreDLL.DLL contains the functions and procedure declarations but no actual code? Editor of \'Voice of the PPL\' the newsletter for the PPL by the PPL! Still trying to get people to contribute to the newsletter! | ||
Back to top | | ||
PointOfLight |
| ||
Registered Member #49 Joined: Sun Sep 17 2006, 03:02pmPosts: 1129 | So far I'm having no luck in finding out how to use them, but it looks like what you need to use is: wmcore.dll wmadecoder.dll wmavdecoder.dll wmvdecoder.dll I would wager that mciSendString is a moot point for PocketPC machines. Eric Pankoke Founder Point Of Light Software http://www.polsoftware.com/ | ||
Back to top | | ||
Mike Halliday |
| ||
Registered Member #671 Joined: Tue Sep 25 2007, 12:22pmPosts: 400 | oooo those look promising Editor of \'Voice of the PPL\' the newsletter for the PPL by the PPL! Still trying to get people to contribute to the newsletter! | ||
Back to top | | ||
zehlein |
| ||
Registered Member #30 Joined: Tue Sep 12 2006, 03:00pmPosts: 449 | PointOfLight wrote ... Actually, did the directory of the AVI file have spaces in it anywhere? You hit the nail once more, Eric. "PPL Files" is the directory I collect all the PPL related stuff in.... There is a crack, a crack in everything. That's how the light gets in. (L. Cohen) | ||
Back to top | | ||
PointOfLight |
| ||
Registered Member #49 Joined: Sun Sep 17 2006, 03:02pmPosts: 1129 | Too bad I can't ever hit nails when I'm building stuff Eric Pankoke Founder Point Of Light Software http://www.polsoftware.com/ | ||
Back to top | | ||
Mike Halliday |
| ||
Registered Member #671 Joined: Tue Sep 25 2007, 12:22pmPosts: 400 | It does appear that the MCI routines will only play Video for Windows 1.1 format AVI. I tried a DIVX encoded .avi file and it complained that DIVX.dll was missing! :S Maybe there is a way to combine DIVX playback with the MCI routines? Editor of \'Voice of the PPL\' the newsletter for the PPL by the PPL! Still trying to get people to contribute to the newsletter! | ||
Back to top | | ||
PointOfLight |
| ||
Registered Member #49 Joined: Sun Sep 17 2006, 03:02pmPosts: 1129 | Sorry for asking a really stupid question, but you do have DivX installed on your machine, right? Eric Pankoke Founder Point Of Light Software http://www.polsoftware.com/ | ||
Back to top | | ||