Posted by radamjee in SWF Studio V3 on Nov 19 2008, 04:11 pm

Hi,

I am using the following script on a button to open an application while passing an argument. The setup.exe I am opening is located at the root of the disk. The file that contains this script is located in a folder off of the root of the disk. Any ideas why it would not work?

on (release) {
var path:String = ssGlobals.ssStartDir.relativePath('../');
ssCore.Shell.open({path:path+'\\setup.exe', arguments:'PW45'});
}

Thanks,
Riyaz


Posted by northcode in SWF Studio V3 on Nov 19 2008, 04:49 pm

Can you define "not work"? Does the EXE start? Are you getting an error code back from Shell.open? Try replacing setup.exe with a copy of whoami.exe renamed to setup.exe and see what happens when you use that EXE. It just spits out it's own name, location and arguments it was passed.


Posted by radamjee in SWF Studio V3 on Nov 19 2008, 07:25 pm

Thanks for the utility. I realized that the current directory was off which is why the exe was not loading. I adjusted my code for that and all is well.

Thank you so much!
Riyaz


Posted by radamjee in SWF Studio V3 on Nov 21 2008, 07:50 pm

Hi,

We are using a C# stub loader (EXE) at the root of a disc that launches a Flash/SWF Studio menu file (EXE) from a set of files based on a variety of criteria.

The stub loader runs the menu file and then a button on the menu file is used to launch other applications by passing arguments. Here is the problem.

If I use SWF Studio 3.4 Build 222, the stub loader runs the menu file but when click the button, the argument does not get passed.

If I use SWF Studio 3.6 Build 147, the stub loader runs the menu file but it launches in hidden mode. I see it come up in Task Manager but do not see the UI. When I run the menu file directly, the button does pass the argument.

Any suggestions?
Riyaz


Posted by northcode in SWF Studio V3 on Nov 21 2008, 09:53 pm

That's a known issue, here's the problem report. We've fixed it, but we haven't released a new build publicly yet.

You can get around it by modifying your call to CreateProcess to include the STARTUPINFO argument and setting the dwFlags member to STARTF_USESHOWWINDOW and the wShowWindow member to SW_SHOWNORMAL. In C/C++ you would initialize the STARTUPINFO structure like this (below).


STARTUPINFO si;
memset(&si, 0, sizeof(STARTUPINFO));
si.cb = sizeof(STARTUPINFO);
si.dwFlags = STARTF_USESHOWWINDOW;
si.wShowWindow = wShowWindow;


If you are a registered user and you send your serial number in an email to support@northcode.com (and mention this post) we'll send you the latest development build with the fix. Probably easier :)


Posted by radamjee in SWF Studio V3 on Nov 24 2008, 03:43 am

Thank you, Tim!