View Full Version : Opening multiple exe files in order
aae991
02-21-2009, 10:25 AM
Can AMS 7.5 be programmed to open 3-4 different exe files in a row, where the first exe file opens, then when it's done playing/displaying, the next exe file opens, etc... Each exe file is a flash generated exe projector file (complete with slide navigation, etc...).
If this is possible, can someone point me in the right direction on how to accomplish this.
Thanks!
Imagine Programming
02-21-2009, 02:36 PM
Can AMS 7.5 be programmed to open 3-4 different exe files in a row, where the first exe file opens, then when it's done playing/displaying, the next exe file opens, etc... Each exe file is a flash generated exe projector file (complete with slide navigation, etc...).
If this is possible, can someone point me in the right direction on how to accomplish this.
Thanks!
Use the action File.Run() and set Wait for return to true like so:
File.Run("AutoPlay\\Docs\\MyProg1.exe", "", "", SW_SHOWNORMAL, true);
File.Run("AutoPlay\\Docs\\MyProg2.exe", "", "", SW_SHOWNORMAL, true);
File.Run("AutoPlay\\Docs\\MyProg3.exe", "", "", SW_SHOWNORMAL, true);
File.Run("AutoPlay\\Docs\\MyProg4.exe", "", "", SW_SHOWNORMAL, true);
aae991
02-21-2009, 04:03 PM
Thanks. I'll give it a try. Will this work if the exe file has looping video and navigation built in? In other words, does AMS "know" when the exe ends - even if it doesn't play straight through?
Imagine Programming
02-21-2009, 04:05 PM
Once the started executable has stopped running (so it's removed from the processes list, really stopped) it will continue with the resting actions below.
aae991
02-21-2009, 05:57 PM
Okay... Tried the code and it works great for the first .exe file. The first .exe file has 18 looping videos in it. You navigate through each of the 18 videos with keyboard controls. Here's where it gets confusing... The 18th video of the first .exe file loops as well (until the user navigates to the next slide, but there is no next slide since it's the 18th video). So, the .exe file doesn't "stop" to allow AMS to go onto the next .exe file. Do you agree I'll have to put a stop action on the 18th video of the .exe file to allow AMS 7.5 to "see" it's over?
UPDATE... It turns out - when I'm previewing the project - that the second .exe is waiting in the background for me to close the first .exe window. Does this seem right? I had hoped there would be no window closing necessary and that the .exe files would play seamlessly.
Thanks.
Imagine Programming
02-21-2009, 06:58 PM
In order for AMS to continue with the next executable, the executable before that (when you have wait for return set to true) must be ended/closed. So a close action in the 18th vid/slide should do the trick.
aae991
02-21-2009, 08:50 PM
Do you mean a close action in AMS script or on the flash video file itself? I can't find a close action in AMS script...
Thanks for all your help - It's starting to make sense.
Imagine Programming
02-21-2009, 10:25 PM
Do you mean a close action in AMS script or on the flash video file itself? I can't find a close action in AMS script...
Thanks for all your help - It's starting to make sense.
A close action in the compiled flash file (you sayd you compiled those flashy's to exe right?) when you close that one after the 18th slide, ams will continue with the next File.Run :)
longedge
02-22-2009, 02:52 AM
Just a thought - if you've got all your source material, then it might be much easier and look better if you did it all within AMS using a flash object. Enumerate the contents of the flash folder and then play them all sequentially.
Imagine Programming
02-22-2009, 06:15 AM
Just a thought - if you've got all your source material, then it might be much easier and look better if you did it all within AMS using a flash object. Enumerate the contents of the flash folder and then play them all sequentially.
You really do like flash huh?:p
longedge
02-22-2009, 07:03 AM
You really do like flash huh?:p
:lol To be honest, no I hate it and find it very frustrating because I'm not a programmer and can't get my head around actionscript *but* I do love the flash + AMS combination :yes
Using flash makes you realise what a superb environment AMS provides for development for people of all abilities:)
aae991
02-22-2009, 08:55 AM
Interesting ideas... I have tried - successfully - to use a Flash object for each page/slide. It works like a charm, but I can't get the Flash file to go full screen. I created the individual Flash files in a program called Flair. I "coded" them to allow for full screen, but AMS won't seem to let the Flash object go full screen. If you can give me a way of making true fullscreen Flash objects in AMS, life will be good! There's got to be a way to do it! Each Flash file is 1024 x 768 resolution.
By the way, I HATE Flash as well - scripting, weird timelines, etc... Flair is a nice compromise, but it's got that darn 16,000 frame limit. It also does not allow you to import flv files AND loop them.
longedge
02-22-2009, 11:41 AM
OK what I have done in the past is -
1. Set the project window to "bordered" "always on top".
2. On startup get the user display properties.
3. On show set the window to display.Width x display.Height.
4. Set the flash object position to 0,15 (I have a small strip at the top for my AMS buttons including an exit button).
5. Set the flash object size to display.Width x (display.Height)-15.
6. Re-position the buttons as appropriate to the display properties.
It's not true full screen but it looks OK for my purposes. I don't use flv's unless that's how they come. I try to stay with mpg or wmv as the native video object is more easily configurable and full screen works so well.
As I said before, if you enumerate the contents of your flash folder you can make it so that the flash object just runs through them loading and playing them one after the other as indeed you can with videos, audio or any other files.
As far as flash files are concerned, if you are working with the fla it's even easier because you can ensure you have a Stop() on the last frame and if you want send an fsCommand as well.
Powered by vBulletin™ Version 4.0.6 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.