主题:  当用open运行一个外部文件,如何得到是否成功的消息


职务:普通成员
等级:1
金币:0.0
发贴:34
注册:2001/2/9 10:21:43
#12002/8/15 15:24:45
当用open运行一个外部文件,请问director 如何得到是否成功的消息,是否有错误指令反馈?大侠请指点


说得越多越糟糕,说得越少越悬乎。

D计划-混沌

职务:管理员
等级:6
金币:15.2
发贴:3528
注册:2007/4/9 9:48:37
#22002/8/15 15:59:26
buddyapi
set ok = baShell "open", "c:\windows\notepad.exe", "myfile.txt" , "", "normal" )
case ok of
0:alert"System was out of memory"
2:alert"File was not found"
3:alert"Path was not found"
5:alert"Sharing or network-protection error"
6:alert"Library required separate data segments for each task"
8:alert"There was insufficient memory to start the application"
10:alert"Windows version was incorrect"
11:alert"Executable file was invalid" Either it was not a Windows application or there was an error in the "EXE image"
12:alert"Application was designed for a different operating system"
13:alert"Application was designed for MS-DOS 4"0"
14:alert"Type of executable file was unknown"
15:alert"Attempt was made to load a real-mode application (developed for an earlier version of Windows)"
16:alert"Attempt was made to load a second instance of an executable file containing multiple data segments that were not marked read-only"
19:alert"Attempt was made to load a compressed executable file" The file must be decompressed before it can be loaded"
20:alert"Dynamic-link library (DLL) file was invalid" One of the DLLs required to run this application was corrupt"
21:alert"Application requires 32-bit extensions"
26:alert"A sharing violation occurred"
27:alert"The filename association is incomplete or invalid"
29:alert"The DDE transaction failed"
30:alert"The DDE transaction could not be completed because other DDE transactions were being processed"
31:alert"There is no application associated with the given filename"