Go Back   Northcode Support > SWF Studio V3
FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Search this Thread Display Modes
Old 2012-06-30, 06:52 AM   #1
marcothedwarf
Registered User
 
Join Date: Oct 2011
Posts: 9
Question ssCore.Layout.loadFile

Hello, I've a problem with the function "ssCore.Layout.loadFile"

I've a button with that code :

Code:
on (release){
        var return_obj = ssCore.Layout.loadFile({resource:"batch.exe"});
	ssCore.Shell.execute(return_obj.result);
	ssCore.App.quit();
}
When I click on that button, the file batch.exe is not loaded and executed, I don't understand how that function works.
I've had the batch.exe file in the Resources like that :

[-] Layout
|__ [+] batch.exe


Movie Tab : "use the auto-extract folder"

I think the problem comes from "resource:"batch.exe"" or/and "return_obj.result"... ?

Thanks for your help.


Ps : sorry for my bad english
marcothedwarf is offline   Reply With Quote
Old 2012-06-30, 12:36 PM   #2
AGo
Plugin Developer
 
Join Date: Jun 2002
Location: Germany
Posts: 2,409
You´re quite off the track here.
If you want to simply execute the exe this will be enough,
if you have set the file to auto-extract on the Layout tab

ActionScript Code:
on (release){
    ssCore.Shell.execute({path:"tempdir://batch.exe"});
}

no need to load anything. Read the docs on the methods to get to know what they do.
AGo is offline   Reply With Quote
Old 2012-06-30, 07:09 PM   #3
marcothedwarf
Registered User
 
Join Date: Oct 2011
Posts: 9
Thank for your reply

Code:
ssCore.Shell.execute({path:"tempdir://batch.exe"});
don't works so I've tried :

Code:
ssCore.Shell.execute({path:ssGlobals.ssTempDir + "\\batch.exe"});
That works only if "batch.exe" is in the same directory, it's not extract in the TempDir...
marcothedwarf is offline   Reply With Quote
Old 2012-07-01, 02:58 AM   #4
northcode
Tim
 
northcode's Avatar
 
Join Date: May 2001
Location: Ottawa
Posts: 11,873
When you add files to the Files Tab they are marked as "auto extract" (to the temp folder) by default. If you change them to "no auto extract" then you have to extract the file manually before you can use Shell.execute on it.
northcode is offline   Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes