-
Notifications
You must be signed in to change notification settings - Fork 1
/
Init.ls
61 lines (56 loc) · 1.81 KB
/
Init.ls
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
on initLists
global movieFiles, castFiles, memberTypes, memberCategories, exportFormats, exportOptions
set movieFiles = list()
set castFiles = list()
set memberTypes = propList()
set memberCategories = propList()
set exportFormats = propList()
set exportOptions = propList()
end
-- Within a tell statement, functions in other scripts can't be accessed normally
-- The only way is to reference the main movie directly
-- To make this more mnemonic, create variables that look like class names but point to the main movie
on initClasses
global Progress, Logging, Files, Utils
set thisMovie = the movie of the window
set Progress = thisMovie
set Logging = thisMovie
set Files = thisMovie
set Utils = thisMovie
end
on setDefaultOptions
global memberTypes, exportFormats
if the count of memberTypes = 0 then enableAllCategories()
if the count of exportFormats = 0 then set exportFormats = defaultFormats()
end
on prepareMovie
global pathSep, fileioObj, fxObj
clearGlobals()
set the idleLoadMode = 0
set the title of the window = line 1 of the movieAboutInfo
set pathSep = "\"
set fileioObj = new xtra("fileio")
set fxObj = new xtra("FileXtra4")
-- This registration code was freely shared by the original developer
-- See http://mods.com.au
baRegister("Buddy API", 4031287)
-- Director's default browser detection is broken
-- Open URLs in the system default browser, not IE
browserName(getOSDirectory() & pathSep & "explorer.exe")
initLists()
initClasses()
initConsole()
setToolPaths()
processCommandLineArgs(getCommandLineArgs())
setDefaultOptions()
end
on startMovie
global consoleMode
if consoleMode then go to "Command Line Export"
else initUI()
end
on stopMovie
closeAutoclicker()
unlink()
showButtons()
end