Welcome, Guest
Please Login or Register.    Lost Password?

Using variable in the section. Problem.
(1 viewing) (1) Guest
Go to bottomPage: 1
TOPIC: Using variable in the section. Problem.
#4214
Using variable in the <elements> section. Problem. 7 Years, 2 Months ago  
I could not get the lua: print(%L) to work,
fact is that print(&quot;Hello World&quot;) 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 = &quot;Hello&quot;
y = &quot;%comspec% /c echo &quot; .. x .. '&amp; 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 = '&quot;End Of  Demo&quot;'
y = '%comspec% /c ' ..
'echo&gt;&quot;/tmp.vbs&quot; dim S,B:B=wScript.arguments(0):«»S=wScript.arguments(1)' ..
'&amp;echo&gt;&gt;&quot;/tmp.vbs&quot; for B=B to-2+cLng((B+1)*len(S)/B«»)step B+1:«»S=left(S,B«»)_' ..
'&amp;echo&gt;&gt;&quot;/tmp.vbs&quot; ^&amp;left(vbLf,-(len(S)^&gt;B«»))^&amp;mid(S,B+1):next:msgBox S,4096'

os.execute (y)
os.execute ('%comspec% /c cScript//noLogo &quot;\\tmp.vbs&quot; &quot;4&quot; ' .. 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 &quot;echo&gt;&quot; 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
Benny Pedersen
Fresh Boarder
Posts: 18
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#4227
Re:Using variable in the <elements> section. Problem. 7 Years, 1 Month ago  
Print() probably outputs to the stdout which you cannot see by default.

The variables that you define in the skin's xml file are handled only internally in Rainlendar. They cannot be used in the lua scripts but I could probably add a function to get/set them.
Rainy
Moderator
Posts: 6000
graph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
Go to topPage: 1
get the latest posts directly to your desktop