It is currently May 7th, 2024, 7:18 pm

Need Help [PLAY] and [MouseAction]

Get help with creating, editing & fixing problems with skins
Sapi1993
Posts: 5
Joined: February 14th, 2012, 4:00 pm

Need Help [PLAY] and [MouseAction]

Post by Sapi1993 »

Hello Rainmeter Community,
im pretty new at editing Rainmeter codes and all this stuff.

At the moment i have 2 problems where i hope that you can may help me :welcome:
I've visited this site http://rainmeter.net/cms/Bangs but well my English isnt the best (German :great: )

1.Well i have a Skin i wanted to Edit. Its a simple Skin that shoes a picture i like. Now i want that its plays a .wav when i double click the picture but well it wont work :-(
I tried this:
LeftMouseDoubleClickAction=PLAY C:\Users\Name\blabla\Mustang.wav
After Double Click it doesnt happen anything...

2.Is it possible (on another picture not the same with the sound) to hide the picture with a doubleclick but so that it get back after a few seconds or something.
The normal !Hide does work fine but i have to refresh all that it comes back :O

Well i hope you can help me (the noob rainmeter editier :D)
MFG
Sascha

Oh and if im wrong here please tell me where to ask or just get my thread over there :oops:
User avatar
jsmorley
Developer
Posts: 22631
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Need Help [PLAY] and [MouseAction]

Post by jsmorley »

As far as the .wav file, you just need to be sure to use a valid path to the file, and be sure to use quotes around the path\filename.wav.

[MeterMyImage]
Meter=Image
ImageName=#CURRENTPATH#Images\SomeImage.png
LeftMouseDoubleClickAction=PLAY "#CURRENTPATH#Sounds\SomeSound.wav"

You can use "relative" paths to the file, so if it is in a Sounds\ folder in the same folder with your skin .ini file, you could use:

LeftMouseDoubleClickAction=PLAY "Sounds\SomeSound.wav"

Or you can use a full path to any .wav file on your computer:

LeftMouseDoubleClickAction=PLAY "C:\Users\Jeffrey Morley\Sound Files\lightning.wav"

Must be quoted in all cases however.
Sapi1993
Posts: 5
Joined: February 14th, 2012, 4:00 pm

Re: Need Help [PLAY] and [MouseAction]

Post by Sapi1993 »

LeftMouseDoubleClickAction=PLAY "C:\Users\Sascha\Desktop\Mustang.wav"

Thats the path and its 100% right, but after doubleclicking the picture i just get a windows sound :(
Well is it maybe because its a already created and finished thing? I will post the complete .ini maybe you can understand what i mean...maybe i just write it on the wrong place :oops:
http://localhostr.com/file/PQw10od/StickyPic-ls-lg-cc.ini
User avatar
jsmorley
Developer
Posts: 22631
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Need Help [PLAY] and [MouseAction]

Post by jsmorley »

As far as that "hide image" question, an approach like this would work:

Code: Select all

[Rainmeter]
Update=1000

[MeterMyImage]
Meter=Image
ImageName=#CURRENTPATH#Images\SomeImage.png
LeftMouseDoubleClickAction=!Execute [!HideMeter MeterMyImage][!EnableMeasure MeasureTimer]

[MeasureTimer]
Measure=Calc
Formula=((MeasureTimer % 20) + 1)
IfEqualValue=20
IfEqualAction=!Execute [!ShowMeter MeterMyImage][!DisableMeasure MeasureTimer]
Disabled=1
Just set the number (20 in my example) in Formula=((MeasureTimer % 20) + 1) and the IfEqualValue=20 line to how many seconds you want it to stay hidden.
User avatar
jsmorley
Developer
Posts: 22631
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Need Help [PLAY] and [MouseAction]

Post by jsmorley »

I see nothing wrong with that .ini file as far as that sound goes.

1) What version of Rainmeter are you running?
2) Are you quite sure that .wav file is in fact a standard wave sound file? Can you try the .wav file in this archive?
lightning.zip
You have it so clicking anywhere on the skin (since the action is in the [Rainmeter] section) will play the sound. I don't know what is in those two @Include files you are loading, but do be sure you don't have some other "mouse action" defined on any meters that could conflict with the PLAY command on the overall skin.
You do not have the required permissions to view the files attached to this post.
Sapi1993
Posts: 5
Joined: February 14th, 2012, 4:00 pm

Re: Need Help [PLAY] and [MouseAction]

Post by Sapi1993 »

Yea the sound thing works. I think something went wrong while converting :)

But i still have problems with the hide thing, i dont know where to put these code. I dont know if you have seen my .ini, but there isnt something like MeterMyImage and if i just copy paste than i get a big picture arround my regular picture. Well i just want to hide a already finished project from someone else and want to change as less as possible, but when i try things i just dont get something or a big picture thing :(
You do not have the required permissions to view the files attached to this post.
User avatar
jsmorley
Developer
Posts: 22631
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Need Help [PLAY] and [MouseAction]

Post by jsmorley »

I suspect the actual settings for your image meter in in one of the .inc @Include files you are using. Zip up your entire skin folder, host it somewhere and post a link to it and I will see what is what.
Sapi1993
Posts: 5
Joined: February 14th, 2012, 4:00 pm

Re: Need Help [PLAY] and [MouseAction]

Post by Sapi1993 »

User avatar
jsmorley
Developer
Posts: 22631
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Need Help [PLAY] and [MouseAction]

Post by jsmorley »

I'm afraid that I'm going to have to let you down on this one. This is a very involved, complicated suite of skins, and while very cool, I think to actually edit the setup without messing it up is just a bigger project than I can dig into. I suggest you contact the original author on deviant art (that "setup" panel has a link to his account) and ask him if he can give you any guidance on what you are trying to do.
Sapi1993
Posts: 5
Joined: February 14th, 2012, 4:00 pm

Re: Need Help [PLAY] and [MouseAction]

Post by Sapi1993 »

Well no problem :D

Thank you again for your help :p

Works now. Tried some different Codes and well i think its not the best end but it works :oops:
LeftMouseDoubleClickAction=!Execute [!Hide][!EnableMeasure MeasureTimer]

[MeasureTimer]
Measure=Calc
Formula=((MeasureTimer % 5) + 1)
IfEqualValue=0
IfEqualAction=!Execute [!RefreshApp][!DisableMeasure MeasureTimer]
Disabled=1
If you can maybe just give me a tip or explain me how this time thing works. sometimes my picture appears after 5secs sometimes after 8secs or something^^