I could not get the lua: print(%L) to work,
fact is that print("Hello World") won't work either ?
but after a click on a button in my calendar,
I got this one to work:
| Code: |
function Global_ShowDialog(dialogName)
x = "Hello"
y = "%comspec% /c echo " .. x .. '& pause' -- Concatenation
os.execute (y)
-- Rainlendar_OpenDialog(dialogName)
end
|
-- It simply open a window saying Hello.
I try to find a global variable with one percent like the %L but it should be an integer,
and value modified in the Skin Advanced Settings.
the %L variable already has a text value and it can be modified using the language drop down menu.
Benny
EDIT:
| Code: |
function Global_ShowDialog(dialogName)
-- Show an example (WinXP)
x = '"End Of Demo"'
y = '%comspec% /c ' ..
'echo>"/tmp.vbs" dim S,B:B=wScript.arguments(0):«»S=wScript.arguments(1)' ..
'&echo>>"/tmp.vbs" for B=B to-2+cLng((B+1)*len(S)/B«»)step B+1:«»S=left(S,B«»)_' ..
'&echo>>"/tmp.vbs" ^&left(vbLf,-(len(S)^>B«»))^&mid(S,B+1):next:msgBox S,4096'
os.execute (y)
os.execute ('%comspec% /c cScript//noLogo "\\tmp.vbs" "4" ' .. x)
-- the script would just say the value of x, but it shouldn't be a problem to let
-- the built in lua thing create a class {... whatever C++ (aVOID that); because
-- it would be more easy to let the lua create a COM file using either debug, or
-- the "echo>" method, instead.
-- Benny,
-- Btw:
-- No, it isn't a virus for MAC or Linux, just an example about using lua scripts.
end
|
<br><br>Post edited by: Benny Pedersen, at: 2007/09/03 03:20