Yes, let Buddy take care of opening the app as well:

appString = theApp & theArgs & theDoc

OK = baRunProgram(appString , "Normal", false)

Put OK
-- 33

Look up RunProgram in Buddy for more info.

Here is the list of error codes from Buddy's help:

<clip>
If the return is less than 32, then an error occurred. Some possible error numbers are 
listed here.

0 System was out of memory, executable file was corrupt, or relocations were invalid.
 1 Unspecified error.
 2 File was not found.
 3 Path was not found.
 5 Attempt was made to dynamically link to a task, or there was a sharing or 
network-protection error.
 6 Library required separate data segments for each task.
 8 There was insufficient memory to start the application.
 10 Windows version was incorrect.
 11 Executable file was invalid. Either it was not a Windows application or there was 
an error in the .EXE image.

12 Application was designed for a different operating system.
 13 Application was designed for MS-DOS 4.0.
 14 Type of executable file was unknown.
 15 Attempt was made to load a real-mode application (developed for an earlier version 
of Windows).
 16 Attempt was made to load a second instance of an executable file containing 
multiple data segments that were not marked
read-only.
 19 Attempt was made to load a compressed executable file. The file must be 
decompressed before it can be loaded.

20 Dynamic-link library (DLL) file was invalid. One of the DLLs required to run this 
application was corrupt.
 21 Application requires 32-bit extensions.
</clip>




Bertil Flink
Creative Media


----- Original Message ----- 
From: "Mendelsohn, Michael" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, June 17, 2004 3:39 PM
Subject: <lingo-l> Return value for open command...WAS: Open a specific page within a 
pdf


> Thanks, Bertil, for the excellent responses yesterday.
>
>
> Just one further question:
> When using the open command, is there a way to error check to see if it
> successfully opened?
> In other words:
>
> result = baOpenFile(...)
> put result
> -- 0
>
> But...
>
> result = open xyz
> -- errors
>
>
> - Michael M.

[To remove yourself from this list, or to change to digest mode, go to 
http://www.penworks.com/lingo-l.cgi  To post messages to the list, email [EMAIL 
PROTECTED]  (Problems, email [EMAIL PROTECTED]). Lingo-L is for learning and helping 
with programming Lingo.  Thanks!]

Reply via email to