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
Fri Jun 13 2008, 06:11PM

Registered Member #671
Joined: Tue Sep 25 2007, 12:22PM
Posts: 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
Sat Jun 14 2008, 11:06AM

Registered Member #49
Joined: Sun Sep 17 2006, 03:02PM
Posts: 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
Sat Jun 14 2008, 12:56PM

Registered Member #671
Joined: Tue Sep 25 2007, 12:22PM
Posts: 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
Sat Jun 14 2008, 05:33PM


Registered Member #1
Joined: Wed Apr 19 2006, 08:25PM
Posts: 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
Sun Jun 15 2008, 03:33AM

Registered Member #30
Joined: Tue Sep 12 2006, 03:00PM
Posts: 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
Sun Jun 15 2008, 05:14AM

Registered Member #671
Joined: Tue Sep 25 2007, 12:22PM
Posts: 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
Sun Jun 15 2008, 05:27AM

Registered Member #671
Joined: Tue Sep 25 2007, 12:22PM
Posts: 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
Sun Jun 15 2008, 08:10PM

Registered Member #49
Joined: Sun Sep 17 2006, 03:02PM
Posts: 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
Mon Jun 16 2008, 11:08AM
Registered Member #1001
Joined: Tue May 20 2008, 01:45PM
Posts: 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
Mon Jun 16 2008, 01:49PM

Registered Member #671
Joined: Tue Sep 25 2007, 12:22PM
Posts: 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
Mon Jun 16 2008, 02:15PM

Registered Member #671
Joined: Tue Sep 25 2007, 12:22PM
Posts: 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
Mon Jun 16 2008, 02:46PM

Registered Member #30
Joined: Tue Sep 12 2006, 03:00PM
Posts: 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
Mon Jun 16 2008, 03:42PM

Registered Member #671
Joined: Tue Sep 25 2007, 12:22PM
Posts: 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
Mon Jun 16 2008, 05:27PM

Registered Member #30
Joined: Tue Sep 12 2006, 03:00PM
Posts: 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
Mon Jun 16 2008, 06:09PM

Registered Member #671
Joined: Tue Sep 25 2007, 12:22PM
Posts: 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
Tue Jun 17 2008, 01:12PM

Registered Member #49
Joined: Sun Sep 17 2006, 03:02PM
Posts: 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
Tue Jun 17 2008, 02:25PM

Registered Member #30
Joined: Tue Sep 12 2006, 03:00PM
Posts: 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
Tue Jun 17 2008, 02:39PM

Registered Member #49
Joined: Sun Sep 17 2006, 03:02PM
Posts: 1129
I didn't do it dodge.png

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
Tue Jun 17 2008, 04:33PM

Registered Member #671
Joined: Tue Sep 25 2007, 12:22PM
Posts: 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
Tue Jun 17 2008, 05:04PM

Registered Member #671
Joined: Tue Sep 25 2007, 12:22PM
Posts: 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
Tue Jun 17 2008, 05:54PM

Registered Member #49
Joined: Sun Sep 17 2006, 03:02PM
Posts: 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
Wed Jun 18 2008, 07:38AM

Registered Member #671
Joined: Tue Sep 25 2007, 12:22PM
Posts: 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
Wed Jun 18 2008, 10:16AM

Registered Member #49
Joined: Sun Sep 17 2006, 03:02PM
Posts: 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
Wed Jun 18 2008, 11:19AM

Registered Member #671
Joined: Tue Sep 25 2007, 12:22PM
Posts: 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
Wed Jun 18 2008, 12:02PM

Registered Member #30
Joined: Tue Sep 12 2006, 03:00PM
Posts: 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
Wed Jun 18 2008, 04:05PM

Registered Member #49
Joined: Sun Sep 17 2006, 03:02PM
Posts: 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
Tue Jul 01 2008, 03:38AM

Registered Member #671
Joined: Tue Sep 25 2007, 12:22PM
Posts: 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
Tue Jul 01 2008, 08:55AM

Registered Member #49
Joined: Sun Sep 17 2006, 03:02PM
Posts: 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
 

Jump:     Back to top

Syndicate this thread: rss 0.92 Syndicate this thread: rss 2.0 Syndicate this thread: RDF
Powered by e107 Forum System