Yokemate of Keyboards
Posts: 2096 from 2003/2/24
From: po-RNO
I'm in a hurry now, but made quickly couple examples how you could convert the script into Hollywood. Not sure if I got everything right, but I'll check after couple days ;)
Code:
; This function uses Hollywood's ARexx support functions, but requires 68k rexxsyslib.library installed
Function p_OpenAmbientARexx(location$, view$, mode$, left, top, width, height)
Local params$ = "?view=" .. view$ .. "&mode=" .. mode$ .. "&top=" .. top .. "&left=" .. left .. "&width=" .. width .. "&height=" .. height
Local rexx$ = "ADDRESS AMBIENT;'LoadURI \"file://" .. location$ .. params$ .. "\" newwin'"
RunRexxScript(rexx$, True)
EndFunction
; This function uses the RXCmd shell command and works out of the box on MorphOS, but doesn't work on other operating systems
Function p_OpenAmbientShell(location$, view$, mode$, left, top, width, height)
Local params$ = "?view=" .. view$ .. "&mode=" .. mode$ .. "&top=" .. top .. "&left=" .. left .. "&width=" .. width .. "&height=" .. height
Local args$ = "AMBIENT \"LoadURI *\"file://" .. location$ .. params$ .. "*\" newwin\""
Execute("MOSSYS:C/RXCmd", args$)
EndFunction
; Example 1
p_OpenAmbientARexx("Ram Disk:", "list", "thumbs", 50, 50, 440, 320)
; Example 2
p_OpenAmbientShell("Ram Disk:", "list", "thumbs", 600, 50, 440, 320)