It is currently April 26th, 2024, 4:32 pm

Tutorial Help

Discuss the use of Lua in Script measures.
drakulaboy
Posts: 165
Joined: June 29th, 2014, 8:35 pm

Tutorial Help

Post by drakulaboy »

done all like in this video
[youtube]46pjMM9Ydm4[/youtube]

and i get

Image

why and what is the problem

Code: Select all

[Rainmeter]
 Update=1

[myScript]
 Measure=Script
 ScriptFile=myScript.lua

[image]
 Meter=Image
 ImageName=Stop.png
 W=100
 H=100

Code: Select all

function intialize ()
        opacity = 255
        fadeOut = true
end

function Update()

	if opacity == 255 then
		fadeOut = true
	elseif opacity == 0 then
		fadeOut = false
    end

   SKIN:Bang('!SetOption image ImageAlpha ' .. opacity)

   if fadeOut == true then
	opacity = opacity - 1
   else
	opacity = opacity + 1
  end

end
User avatar
smurfier
Moderator
Posts: 1931
Joined: January 29th, 2010, 1:43 am
Location: Willmar, MN

Re: Tutorial Help

Post by smurfier »

The function name you want to use is Initialize. Note the capitalization.
GitHub | DeviantArt | Tumblr
This is the song that never ends. It just goes on and on my friends. Some people started singing it not knowing what it was, and they'll continue singing it forever just because . . .
drakulaboy
Posts: 165
Joined: June 29th, 2014, 8:35 pm

Re: Tutorial Help

Post by drakulaboy »

wow, 1 error and the code won't work, i wish a compilator for lua scripts :D thank you for answer! now it's working, i want to use some simple scripts on a few skins