It is currently April 28th, 2024, 4:51 pm

Need some sort of wait bang

Get help with creating, editing & fixing problems with skins
Nooby4Ever
Posts: 29
Joined: December 22nd, 2009, 2:49 pm

Need some sort of wait bang

Post by Nooby4Ever »

Hi

I'm making and WMP radio skin but i have a problem which i can't solve :confused:

If the user presses and button i want to open a file (asx), then run a lua script and 2 command measures.
Like this:

Code: Select all

LeftMouseDownAction=!Execute [open file][lua script update][command 1][command 2]
But i have a problem WMP isn't loaded yet while the lua script runs , so it thinks WMP isn't playing while it actually is. Also between the command should be a little delay.

I tried to add a bat (waiting) file between them to cause an delay but obviously rainmeter just start everything and that's it, the Execute and don't wait till 1 is done before starting the other; So this didn't work.

Then i tried to make 2 calc measures that have and updatedivider=-1:

Code: Select all

[cDelay2]
Measure=Calc
Formula=1
IfEqualValue=1
IfEqualAction=!Execute [!CommandMeasure mPlayer Play][!CommandMeasure cDelay2 UpdateDivider=-1][!DisableMeasure cDelay2]
UpdateDivider=-1
Group=Delay
I call them with (simplified code):

Code: Select all

LeftMouseDownAction=!Execute [!CommandMeasure cDelay2 UpdateDivider=1][!EnableMeasureGroup Delay]
But then i get a warning : !CommandMeasure not supported by [cDelay2] so i guess this way won't work either.

But i pretty much ran out of idea's; so how can i run the script and commands (with a pause between the commands) after WMP had loaded and asx file by the click on a button. :)

BTW: i thought there was an way to run Execute=... when the skin starts up, i think it was in the [Rainmeter] section of the skin but i can't find it in the manual. Or was i dreaming?
User avatar
KreAch3R
Posts: 608
Joined: February 7th, 2011, 7:27 pm
Location: Thessaloniki, GR

Re: Need some sort of wait bang

Post by KreAch3R »

When you need is this. Given that you 've managed to get so far without asking makes me think you 'll figure out the rest, but if you need more help, just ask. :)

Also, to send a !bang when the skin first starts (refreshes), use this!OnRefreshAction= under the [Rainmeter] section .
Inactive, due to life changes. Send me a PM for any question.

Desktop DeviartArt
Image
Nooby4Ever
Posts: 29
Joined: December 22nd, 2009, 2:49 pm

Re: Need some sort of wait bang

Post by Nooby4Ever »

Ok thanks, my skin is done now :)
https://n00by4ever.deviantart.com/#/d566phm

The OnRefreshAction was not completely what i was looking for but it gets the job done.
User avatar
KreAch3R
Posts: 608
Joined: February 7th, 2011, 7:27 pm
Location: Thessaloniki, GR

Re: Need some sort of wait bang

Post by KreAch3R »

Very beautiful. I will try it sometime. You can take a look here to find out if there is a !bang that does exactly what you want.
Inactive, due to life changes. Send me a PM for any question.

Desktop DeviartArt
Image