Language: ChineseGermanSpanishFrenchDutchItalianRussian
123 Flash Chat Forums

Go Back   TOPCMM Community > SWFKit > SWFKit Support

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 02-21-2005, 07:37 PM
Junior Member
 
Join Date: Dec 2004
Posts: 7
Default shell run

Can anyboy help me?

When i start Shell.run("C:\\Eigene Dateien\\midi.exe"); it will execute in another folder.

How can i definate the destination wher midi.exe execute?

(midi.exe execute always the folder which i definated befor with Dialogs.fileOpen methode, but i want to definate without a selection)
thx Hochi
Reply With Quote
  #2 (permalink)  
Old 02-23-2005, 03:05 PM
Senior Member
 
Join Date: Dec 2002
Posts: 2,015
Default Re:shell run

Do you mean that the midi.exe isn't in c:\Eigene Dateien? And you want to find where it is without lauching a file open dialog?
Reply With Quote
  #3 (permalink)  
Old 02-23-2005, 04:22 PM
Junior Member
 
Join Date: Dec 2004
Posts: 7
Default Re:shell run

No the midi.exe is in C:\Eigene Dateien

but when i start it wiht shell run,
Code:
Shell.run("C:\\Eigene Dateien\\midi.exe");
it execute like midi.exe was in C:\pic\

and i think that this is because, befor i stat shell run, i brouse Pictures with Dialogs.fileOpen methode.


if i brouse befor with var
Code:
f = Dialogs.browse("Test'', "c:\\'');
the midi.exe will be execute in the Folder i selected

i want to select the Folder without Dialogs.browse to execute the midi.exe in this Folder
Reply With Quote
  #4 (permalink)  
Old 02-25-2005, 07:01 AM
Senior Member
 
Join Date: Dec 2002
Posts: 2,015
Default Re:shell run

The Shell.run method doesn't set the working directory of the new process, so it always uses the current directory of the main process. We will add the feature in the next version.

In Swfkit pro, u can do like this

Code:
Dll.registerFunction("kernel32.dll", "SetCurrentDirectoryA",
"setCurDir", "stdcall", "long", "string");

var exename = "C:\\Eigene Dateien\\midi.exe";
var file = new File(exename);
trace(setCurDir(file.parentPath));
Shell.run(exename);
Reply With Quote
Reply

Was this information helpful?    Yes No



Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 07:46 AM.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0 ©2007, Crawlability, Inc.