dcsimg
A Flash Developer Resource Site

Results 1 to 9 of 9

Thread: calling an .exe from within a .exe - possible?

  1. #1
    Senior Member
    Join Date
    Aug 2000
    Posts
    104
    I wondered if you can call an .exe from within a .exe using thje fscommand and how do you do it?

    cheers stuart

  2. #2
    Senior Member
    Join Date
    Jul 2000
    Posts
    103
    You can. You'll want to use the EXEC FSCommand. So, it's exec filename.exe.

    Hope that helps,
    Rick

  3. #3
    Senior Moderator
    Defender of the Faith
    Pope de Flash's Avatar
    Join Date
    Feb 2000
    Posts
    3,429
    there is a great product that will give a bit more control over your projector files called jugglor check it out at http://www.***********.com I use it all the time and it does a great job. Just thought it would be a bit of usful information. Regards, Bill

  4. #4
    Member
    Join Date
    Aug 2000
    Posts
    39
    I dont know if this helps, but I do it in VB alot.

    Private Sub ShockwaveFlash1_FSCommand(ByVal command As String, ByVal args As String)

    select case command

    case "OpenPrgm"
    Shell "Path to my program", vbNormalFocus

    end select

    End Sub

  5. #5
    Senior Member
    Join Date
    Jul 2000
    Posts
    103
    I've usually done this through VB, as well. I just posted a quick hack that will allow all users (those with or without VB) to edit an accompanying text file that determines the location of the file to be launched.

    It ain't perfect and it ain't pretty, but it's free.

    More info can be found at:
    http://www.flashgeek.com/tutorials/07_launchapp_01.htm

    Hope that helps,
    Rick

  6. #6
    Junior Member
    Join Date
    Aug 2000
    Posts
    17

    Exclamation

    Hadron,
    What does this VB function do. and how would I use it? (details?)

  7. #7
    Member
    Join Date
    Aug 2000
    Posts
    39
    b-nut

    Lets say you want to execute notepad from flash.

    First lets assume you have created a flash interface with a button on it labeled Notepad.
    In the props for the button add the following action.

    On (Release)
    FS Command ("Notepad", "")
    End On

    Publish your .fla

    Now switch to VB.

    Past the Swflash.ocx on form1

    Set to props for the swflash.ocx to load your swf.
    You should now see your .swf file on your VB form.

    Go to the code window and select the following event for the
    Flash ocx control it will look like this.

    Private Sub ShockwaveFlash1_FSCommand(ByVal command As String, ByVal args As String)

    ‘ add the following code.

    Select case command

    Case “Notepad”
    Shell (“notepad.exe”,vbnormalFocus)
    End select

    End sub

    Ill put a demo file with source on a ftp site l8r so check back.


  8. #8
    Member
    Join Date
    Aug 2000
    Posts
    39
    http://www.execpc.com/~rogmed/FlashVb.zip

    a down a dirty example of using fscommand with Visual Basic.

    you should already be infected with Vb 5.0 runtimes.

  9. #9
    Senior Member
    Join Date
    Aug 2000
    Posts
    104

    Smile thanks

    thank you very much thanks for your time.

    cheers stuart

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