home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
1&1 Multimedia Trend 1996 10 B
/
MM_TREND.ISO
/
prog
/
isdn
/
shared.dir
/
00303_Script_303
< prev
next >
Wrap
Text File
|
1996-08-18
|
4KB
|
178 lines
-- System
-- Parts from: MovieUtilities XObject/DLL Example Movie,
-- v. 1.0.7 for MS Windows 3.1 (7/25/94)
-- by David Jackson Shields
-- ⌐ 1994 by Macromedia, Inc.
-- Provides utility functions not yet in Director.
on InitSystem
-- Machinen infos
-- Init die X-Libs
-- Filenames und PathNames
global gxUtilObj, gxFileObj, gxMsgObj
global gbIsPC
global gsWinPath, gsIniFile
global gsMoviePath
--debug " ++++++++++++ check the machine ++++++++++++"
if not gbIsPC then
--alert "Diese Programm ben÷tigt Windows ⌐"
exit
end if
if (the colorDepth < 8) then
alert "Die Darstellung ist bei 16 Fraben nicht orginalgetreu!"
end if
-- ++++++++++++++ open x-libs +++++++++++++++++++
-- --------- open the external factory ---------
--debug "open Util-lib .."
openXLib "MovUtils.DLL"
-- create the object in RAM:
if objectP( gxUtilObj ) then gxUtilObj( mDispose )
put MovUtils( mNew ) into gxUtilObj
put value( gxUtilObj ) into result
if result < 0 then
Fehler result, "Das Modul: movutils.dll ist nicht vorhanden!"
exit
end if
--debug "is ok"
-- ---------------- open file IO ------------
--debug "open FileIO"
openXLib "fileio.DLL"
-- create object
if objectP( gxFileObj ) then gxFileObj( mDispose )
--debug "is ok"
-- ---------------- open Message Exchange ------------
--debug "open caw"
openXLib "cawXobj.DLL"
-- create object
if objectP( gxMsgObj ) then gxMsgObj( mDispose )
--debug "is ok"
-- ----------------- set the path ---------------
GetVolName
GetWinPath -- 1ter Aufruf holt win path fⁿr ini files
set gsMoviePath = the PathName
--debug "MoviePath: " & gsMoviePath
end InitSystem
-- *************************************************
on ClearSystem
-- on stop clean up the mess
global gxUtilObj, gxFileObj, xMsgXobj
if objectP( gxUtilObj ) then gxUtilObj( mDispose )
if objectP( gxFileObj ) then gxFileObj( mDispose )
if objectP( gxMsgObj ) then gxMsgObj( mDispose )
closeXLib -- alle!!
end ClearSystem
on getVolName
-- extract volume name from a given path name string:
global gxUtilObj, gsX, gsIniFile
if objectP( gxUtilObj ) then
put gxUtilObj( mGetVolName, the pathName ) into gsX
else
Fehler 101, "--"
end if
-- set gsIniFile = gsWinPath & "\" & gsIniFile
--debug "Volume: " & gsX
end getVolName
on getSysPath
-- returns complete volume and pathName of currently active System folder
-- as a string. NOTE: This is the DOS System directory.
global gxUtilObj, gsSysPath
if objectP( gxUtilObj ) then
put gxUtilObj( mGetSystemPath ) into gsSysPath
else
Fehler 101, "--"
end if
end getSysPath
on getWinPath
-- returns complete volume and pathName of currently active
-- Windowsfolder as a string...useful for creating/opening Prefs:
global gxUtilObj, gsWinPath, gsIniFile
if objectP( gxUtilObj ) then
put gxUtilObj( mGetWindowsPath ) into gsWinPath
else
Fehler 101, "--"
end if
--debug "Winpath:" & gsWinPath
set gsIniFile = gsWinPath & "\" & gsIniFile
--debug "IniDatei: " & gsIniFile
end getWinPath
on setPath
-- Set the default pathName of "volume:\directory(s):" so that
-- with FileIO "?read" permission, the FileOpen/Save Dialog opens to the
-- specified folder. This does not affect the Lingo pathName property.
global gxUtilObj
if objectP( gxUtilObj ) then
put field "volDirectory" into s
put gxUtilObj( mSetDefaultPath, s ) into result
if result = -1 then
alert "No such directory exists. Please try again..."
exit
end if
else
Fehler 101, "--"
end if
end setPath