home *** CD-ROM | disk | FTP | other *** search
- REM Launches the VLR Editor with Windows DLLs
- REM vlred8.csc August 12, 1998
- DECLARE FUNCTION FindWindow LIB "user32" (BYVAL classname AS LONG, BYVAL title AS STRING) AS LONG ALIAS "FindWindowA"
- DECLARE FUNCTION WinExec LIB "kernel32" (BYVAL path AS STRING, BYVAL shw AS LONG) AS LONG ALIAS "WinExec"
-
- #addfol "..\..\Scripts"
- #include "VPConst.csi"
-
- window$ = "VLR Editor"
- exeName$ = "VLRED8.EXE"
-
- REM Get path of Ventura Destination from registry
- exePath$ = REGISTRYQUERY(2, VENTURA_REGQUERY_CONST, "Destination")
- exePath$ = exePath$ + "\Programs"
- exeName$ = exePath$ + "\" + exeName$
-
- errmsg$ = "Couldn't run " + exeName$
-
- REM Load the application if not loaded already
- win = FindWindow(0, window$)
- IF win = 0 THEN
- err = WinExec(exeName$, 1)
- IF err < 0 THEN err = err * -1
- IF err < 33 THEN
- MESSAGE(errmsg$)
- STOP
- ENDIF
- win = FindWindow(0, window$)
- ENDIF
-
-
-