i need help trying to open an .exe file then opening a file in said exe program i.e i wanna open a file in flash after opening flash.


so far i can open the exe file with no problem but from there I'm stuck.

this is what i have

import os 
           os.system("flash.exe")

Flash can take command-line arguments. So you can do os.system("flash.exe myFileToOpen.fla") . That'll open Flash and have it open the document "myFileToOpen.fla".

If the FLA is in a different directory however, you'll need to give the path in front of the filename in the command line argument. It can be relative or absolute. And if it contains spaces, you'll need to wrap it in quotes.

# absolute path and with quotes because of spaces
os.system("flash.exe 'C:\the\directory\to my file\here.fla'")
# or for relative, using just the .. syntax
os.system("flash.exe ../doc.fla")

i tried that and am getting can not open file. and i wanna be able to run a jsfl file after that

i figured it out thanks so much

Member Avatar for sravan953

Just for my confirmation, try this if it works:

import subprocess

subprocess.call(["flash.exe",the location of the file])
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.