It is currently May 21st, 2024, 6:29 am

NirCmd Question

Get help with creating, editing & fixing problems with skins
idstealth
Posts: 8
Joined: September 22nd, 2010, 1:21 pm

NirCmd Question

Post by idstealth »

Hi all,

I am not sure if this should be here, so please, if it doesn't, push it somewhere else. (:

I am using NirCmd to interface with VLCCtrl by Poiru. Rainmeter calls NirCmd to send a command to vlcctrl to do whatever (e.g. go to the next song) Here is my code:

Code: Select all


[Rainmeter]
Author=Idstealth
BackgroundMode=1
Update=1000

[MeterVLC]
Meter=Image
ImageName="VLC.ico"
W=75
H=75
AntiAlias=1
LeftMouseUpAction=!Execute ["C:\Program Files (x86)\VideoLAN\VLC\vlc.exe" "C:\Users\Idstealth\Documents\Music"]

[MeterShuffle]
Meter=Image
ImageName="Shuffle.ico"
X=60
Y=75
W=15
H=15
AntiAlias=1
LeftMouseUpAction=!Execute ["#ADDONSPATH#Nircmd\NirCmd.exe" exec hide vlcctrl /u=127.0.0.1:8080 /a=pl_random]

[MeterPlay]
Meter=Image
ImageName="Play.ico"
X=0
Y=75
W=15
H=15
AntiAlias=1
LeftMouseUpAction=!Execute["#ADDONSPATH#Nircmd\Nircmd.exe" exec hide vlcctrl /u=127.0.0.1:8080 /a=pl_random]

[MeterPrevious]
Meter=Image
ImageName="Previous.ico"
X=20
Y=75
W=15
H=15
AntiAlias=1
LeftMouseUpAction=!Execute["#ADDONSPATH#Nircmd\Nircmd.exe" exec hide vlcctrl /u=127.0.0.1:8080 /a=pl_next]
It always returns me an Unknown Bang error. Why is this so?

Note: I know my [MeterPrevious] says '/a=pl_next', it's just to test if the commands work. Also, I placed vlcctrl in my C:\Windows folder so that I wouldn't have to specify the path.
poiru
Developer
Posts: 2872
Joined: April 17th, 2009, 12:18 pm

Re: NirCmd Question

Post by poiru »

Why are you using nircmd to control vlcctrl? Just look at the Gnometer VLC skin (Gnometer -> Media Player -> VLC.ini) or use something like:

ButtonCommand=!Execute ["#CURRENTPATH#vlcctrl.exe" /u=127.0.0.1:8080 /a=pl_next]

with vlcctrl.exe located in the same folder as the skin.
idstealth
Posts: 8
Joined: September 22nd, 2010, 1:21 pm

Re: NirCmd Question

Post by idstealth »

Hi Poiru, I have just solved the problem. Couple of syntax errors, fixed them and added on stuff so now it works just fine. Thanks!