A Flash Developer Resource Site

Page 4 of 8 FirstFirst 12345678 LastLast
Results 61 to 80 of 154

Thread: Northcode's Runtime.exe verses Proxy.exe

Hybrid View

  1. #1
    Lifetime Friend of Site Staff Northcode's Avatar
    Join Date
    Dec 2000
    Location
    Whitehorse YT
    Posts
    3,764
    Code:
    // the declaration of the SmartExec function should only 
    // appear once in your project
    
    function SmartExec(file) 
    {
       platform = $version.slice(0, 3);
       if (platform == "WIN") {
          fscommnd("exec", file+".exe");
       } else {
          fscommand("exec", file+".scpt");
       }
    }
    
    // call SmartExec from your button action
    
    on (release) 
    {
       SmartExec("locpdf")
    }

  2. #2
    Member
    Join Date
    Apr 2004
    Posts
    31

    mucking around

    ok...before i go mucking around, where do i declare the SmartExec function? Just in the beginning frame?

    I REALLY appreciate this. I'm a designer, not a programmer. This is like trying to read latin.

  3. #3
    Member
    Join Date
    Apr 2004
    Posts
    31

    ok

    I've applied the function to the first frame of my movie...
    function SmartExec(target) {
    platform = $version.slice(0, 3);
    if (platform == "WIN") {
    fscommand("exec", target+".exe");
    } else {
    fscommand("exec", target+"_script");
    }
    }
    stop();

  4. #4
    Member
    Join Date
    Apr 2004
    Posts
    31

    I'm assuming theres a reason this forum won't let me post my whole message

    Then i applied this to my button. Right?

    on (release) {
    SmartExec("waterpdf");
    }

  5. #5
    Member
    Join Date
    Apr 2004
    Posts
    31

    and the rest...

    It just doesn't work. I am going to kill something. I've finally gotten my exe file to launch my bat file to launch my PDF. Of course this is just by running them. I cannot get them to work in Flash. So i am assuming there is something worng with my code.

  6. #6
    Member
    Join Date
    Apr 2004
    Posts
    31

    I'm retarded

    OK...figured it out. everything works great. one question. Is it possbile to tweak the SmartExec script to take into account Windows, OS9 and OSX instead of just windows and everything else. This would help to get around the Applescript incompatibility between 9 and X.

    Don't know if its possible though.

  7. #7
    Lifetime Friend of Site Staff Northcode's Avatar
    Join Date
    Dec 2000
    Location
    Whitehorse YT
    Posts
    3,764
    You don't get the version of the OS from $version, the best you can do there is MAC or WIN. However, I suspect that you can get the OS version from AppleScript. As long as it's possible to build and AppleScript that works on both platforms that should do it. I'll check into this. Inquiring minds want to know...

  8. #8
    Member
    Join Date
    Apr 2004
    Posts
    31

    crap

    Thanks for the info. i just don't know enough about actionscripting. Hopefully I can find something. If not, I can just make the CD so that it will run the OS9 versions of the scripts. Those should at least run in classic in OSX

  9. #9
    Junior Member
    Join Date
    Jan 2003
    Posts
    3
    Northcode, you're my hero now too.

    I just was crunching on a deadline and needed to do the exact same thing when I was directed to this forum and found this thread. It worked out very well for me. You're brilliant.

  10. #10
    Senior Member
    Join Date
    Apr 2001
    Posts
    105
    Hey Northcode,

    First up, cheers for the apps, the patience, and the help!

    Second, I have a question about your proxie.exe ...

    With the old Flash 5 standalone player, you could call a bat with the exec fscommand, and you could send perameters to the bat by tabbing them out. eg:

    st = "save.bat" add chr(9) add "param_1" add chr(9) add "param_n";
    fscommand("exec", st);

    Then in the bat, just set the params as vars. eg:

    SET VAR1=%1
    SET VARn=%n

    Can you call the proxie.exe with params as above, and have it pass the params to the bat?

    If not, is there a way around this?

    Cheers heaps,

    Jamin.
    Last edited by jamin; 05-04-2004 at 12:08 PM.

  11. #11
    Member
    Join Date
    Jun 2002
    Location
    Australia
    Posts
    62

    Help regarding proxie.exe problem

    Hi Northcode,
    Firstly thanks for producing such a useful flash utility (proxie.exe). I have been battling with this problem for some while.

    I have used it and it work for me addressing other projector files but I am trying to get it to open a Word file (myfile.doc). It is partly working in the sence that it open the Word application but the file that it should be opening is now where to be seen. I have tested the proxie.exe and it works but when I run it through the projector it only open up the Word application.

    I am using "on Release" in connection with a button. The other buttons are working but for some reason this one is not. Its not a button problem as far as I can see.

    My question to you is, is there a reason that the proxie.exe will not open up the Word file but only the application. Is there a solution to this problem.

    Thanks for your help.
    You have started a small revolution in Flash linking.



  12. #12
    Lifetime Friend of Site Staff Northcode's Avatar
    Join Date
    Dec 2000
    Location
    Whitehorse YT
    Posts
    3,764
    Hi ticktack, how are you opening the DOC file in your BAT file and what version of Word are you using?
    Last edited by Northcode; 06-18-2004 at 11:24 AM.

  13. #13
    Lifetime Friend of Site Staff Northcode's Avatar
    Join Date
    Dec 2000
    Location
    Whitehorse YT
    Posts
    3,764
    Hey jamin, I think we talked about this before didn't we? Maybe it was someone else, this thread is getting pretty long Anyhow, the ability to pass arguments to proxy, and have them passed on to the bat file, was added a while back. This is from the latest PROXY help file...

    The commandline parameter is optional and will be passed to the BAT file. You can't passs command line parameters to external applications from Flash MX or Flash MX 2004, but if you are using Flash 5 and you separate your parameters with tabs, Proxy will replace the tabs in your command line with spaces.
    You can download the latest version from http://www.northcode.com/misc/proxy.zip. This one also fixed a problem in Windows 98 where the BAT files were left hanging around (invisibly) after they finished.

  14. #14
    Member
    Join Date
    Jun 2002
    Location
    Australia
    Posts
    62

    Help - proxie.exe problem

    Hi Northcode,
    I think that it must be not finding the appropriate file.

    The file layout on the CD is as follows

    Autorun.inf
    myicon.ico
    readme.txt
    CV\myworddoc.doc
    Presentation\Presentation.exe
    menu\menu.exe ( - where the buttons are executed with )
    Code:
    on (release) {
        fscommand("exec","myworddoc.exe");
    }
    on (release) {
        fscommand("exec","presents.exe");
    }
    menu\fscommand\myworddoc.exe
    menu\fscommand\myworddoc.bat
    myworddoc.bat code is:-
    Code:
    start \CV\myworddoc.doc
    menu\fscommand\presents.exe
    menu\fscommand\presents.bat
    presents.bat code is:-
    Code:
    start \Presentation\Presentation.exe
    Thats the basic layout. The presentation works fine but for some reason the Word file (myworddoc.doc) is not opening. The Application is opening but not the file its self. Do you see any problem in this file structure or code? I have used this file structure in order to keep the files organised. Reading one of your last posts it should be fine as long as the proxie.exe and proxie.bat files are placed in the fscommand directory next to the projector file. The .bat file then redirects the pointing of the file to the \CV\myworddoc.doc file. Is this correct because it appears to work for the other link (presentation.exe), which is another projector file.
    I'd appreciate any help.
    Thanks for your help.


  15. #15
    Lifetime Friend of Site Staff Northcode's Avatar
    Join Date
    Dec 2000
    Location
    Whitehorse YT
    Posts
    3,764
    You don't need to use Start with presentation.exe, you can just run the executable directly. If you move presentation.exe into the FScommand folder then you don't even need to use proxy to launch it. The only reason to use proxy would be if presentation.exe needs to load some other files that you want to keep all in the same directory and not in fscommand.

    If word is getting launched then start can read the file name (to know it's a DOC file) but for some reason that's not getting passed to Word.

    Can you try moving the DOC file into the FScommand folder and changing your start command to something like this..

    start file.doc

    The only other thing I can think of is that somehow the registry entry that tells Windows what application to use to open DOC files has been modified so that it doesn't work any more. Can you still double click on DOC files and have them open without errors?

  16. #16
    Junior Member
    Join Date
    Apr 2008
    Posts
    5
    Quote Originally Posted by Northcode
    You don't need to use Start with presentation.exe, you can just run the executable directly. If you move presentation.exe into the FScommand folder then you don't even need to use proxy to launch it. The only reason to use proxy would be if presentation.exe needs to load some other files that you want to keep all in the same directory and not in fscommand.

    If word is getting launched then start can read the file name (to know it's a DOC file) but for some reason that's not getting passed to Word.

    Can you try moving the DOC file into the FScommand folder and changing your start command to something like this..

    start file.doc

    The only other thing I can think of is that somehow the registry entry that tells Windows what application to use to open DOC files has been modified so that it doesn't work any more. Can you still double click on DOC files and have them open without errors?
    Hi, I have the same problem with word files. Just have all the files in the fscommand folder with the .bat and the .exe files, but it still opens only the application and not the files. Is there anything wrong?

    the button code is this:
    on(release){
    fscommand("exec","conf1.exe");
    }

    and the .bat file named conf1.bat says:
    start conf1.doc

    I'm working in win XP and the last version of Microsoft Word
    Last edited by julperpub; 05-06-2008 at 12:47 PM.
    If you don't do it with passion, then just don't do it.

  17. #17
    Junior Member
    Join Date
    May 2008
    Posts
    2

    Copy2 - Pathing?

    First off Great thread and great little tools. You Rock!

    Copy2

    I have been working like the dickens to get this to work. I can run the proxy.exe file from the fscommand folder and it works like a champ.

    When I try to run it from the button inside of Flash (as3) it gives me an error:
    "UNC paths are not supported. Defaulting to windows directory.
    The system cannot find the file specified."

    Where am I going wrong?

    here is my .bat file:
    copy2 /f banner.jpg /m file has been saved /c My CD-ROM File Manager

    I have the banner.jpg in the fscommand folder as well as in the next folder up.
    I am about out of hair.

    Anyone have any suggestions.

    Thanks,

    BD72

  18. #18
    Member
    Join Date
    Jun 2002
    Location
    Australia
    Posts
    62

    Thanks Northcode

    Thnaks for you help.
    I moved the file directly into the fscommand folder and all works well. It means that the file structure is a little more messy but at least it works. Thanks again

  19. #19
    Senior Member
    Join Date
    Apr 2002
    Location
    UK
    Posts
    501
    Great thread and sure looks like it is going to help me out with my current project.

    One question though - my client has asked if acrobat reader can be put on the CDR0M and in the event that a user does not have acrobat reader on their PC, it uses acrobat reader from the CDROM. When I say use acrobat reader from CDROM, I do not mean install it from the CDROM but instead have the application executable and associated files on the CDROM which can be used to launch a chosen pdf file.

    If this is not possible using the proxy.exe bat file method, can anyone suggest if and how this could be achieved.

    Many thanks

    Paul

  20. #20
    Lifetime Friend of Site Staff Northcode's Avatar
    Join Date
    Dec 2000
    Location
    Whitehorse YT
    Posts
    3,764
    This article (link below) from my web site talks about how to use Acrobat Reader from a CD with SWF Studio (my product) but it has other info you need i.e. the minimum file list to get this working without SWF Studio. The article talks about Acrobat Reader 5. The same thing works the version 6, but the minimum file list is different.

    Using ACRORD32.EXE with SWF Studio
    http://www.northcode.com/resources/acro/acro.html

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center