Hi, as titled I wanted to know if there was a way to set a random position to a skin.
Like for example, I have a floating gif as a skin and I would like it to change position every 10 second or so.
(I really don't know anything about programming so thank you in advance !)
Have a good day
It is currently April 19th, 2024, 6:24 pm
Help Set random position to skin
-
- Posts: 9
- Joined: March 28th, 2019, 8:22 pm
Help Set random position to skin
Last edited by maxwell1 on April 24th, 2019, 10:05 pm, edited 1 time in total.
-
- Rainmeter Sage
- Posts: 16144
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: Help Set random position to skin
For first, Rainmeter is not a programming language. We don't programming.maxwell1 wrote: ↑March 28th, 2019, 8:27 pm Hi, as titled I wanted to know if there was a way to set a random position to a skin.
Like for example, I have a floating gif as a skin and I would like it to change position every 10 second or so.
(I really don't know anything about programming so thank you in advance !)
Anyway, here is a solution: add the following measures to your code:
Code: Select all
[MeasureX]
Measure=Calc
Formula=Random
LowBound=0
HighBound=(#SCREENAREAWIDTH#-#CURRENTCONFIGWIDTH#)
UpdateRandom=1
UpdateDivider=-1
DynamicVariables=1
Group=Position
[MeasureY]
Measure=Calc
Formula=Random
LowBound=0
HighBound=(#SCREENAREAHEIGHT#-#CURRENTCONFIGHEIGHT#)
UpdateRandom=1
UpdateDivider=-1
DynamicVariables=1
Group=Position
[MeasureTimer]
Measure=Calc
Formula=( COUNTER % 10 )
IfCondition=(#CURRENTSECTION#=0)
IfTrueAction=[!UpdateMeasureGroup "Position"][!Move "[MeasureX]" "[MeasureY]"]
When the measures are updated, the !Move bang moves the skin to the position established by the new measure values.
-
- Posts: 9
- Joined: March 28th, 2019, 8:22 pm
Re: Help Set random position to skin
Wow ! Thank you very much for your quick reply ! I'm gonna test it ou right now !
Thank you so much !!
Thank you so much !!
-
- Rainmeter Sage
- Posts: 16144
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: Help Set random position to skin
Have you tested it? Have you got it working as intended?
-
- Posts: 9
- Joined: March 28th, 2019, 8:22 pm
Re: Help Set random position to skin
Yeah and it works perfectly ! Tahnk you so much for your help
-
- Rainmeter Sage
- Posts: 16144
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania