30 lines
852 B
Plaintext
30 lines
852 B
Plaintext
function ReadRegistryKey(key as string, section as string) as dynamic
|
|
sec = CreateObject("roRegistrySection", section)
|
|
if not sec.Exists(key)
|
|
return invalid
|
|
end if
|
|
return sec.Read(key)
|
|
end function
|
|
|
|
function DeleteRegistryKey(key as string, section as string)
|
|
sec = CreateObject("roRegistrySection", section)
|
|
sec.Delete(key)
|
|
sec.Flush()
|
|
end function
|
|
|
|
function GetPlayletLibUrlsFromRegistry() as object
|
|
urlsJson = ReadRegistryKey("playlet_lib_urls", "Playlet")
|
|
if urlsJson = invalid
|
|
return invalid
|
|
end if
|
|
urls = ParseJson(urlsJson)
|
|
return urls
|
|
end function
|
|
|
|
function ClearPlayletLibUrlsIfNeeded(launchArgs as object) as void
|
|
if launchArgs = invalid or launchArgs.clearPlayletLibUrls = invalid
|
|
return
|
|
end if
|
|
DeleteRegistryKey("playlet_lib_urls", "Playlet")
|
|
end function
|