It is currently April 26th, 2024, 11:16 pm

Rainmeter -> AutoIt interaction

Share and get help with Plugins and Addons
Batulin_dmitri
Posts: 3
Joined: September 7th, 2013, 9:19 am

Rainmeter -> AutoIt interaction

Post by Batulin_dmitri »

First of all - I'm from Ukraine))) So my English is not so well)

I made the Autoit script, which gets the data of standart input stream (to make the spectrum analyzer in Rainmeter, and don't use Samurize at all)...

On AutoIt side - everything is fine - VUMeter works, Analyzer get's the spectrum... But problem is to send data into Rainmeter. In first realization I used the SendBang function from here:
http://rainmeter.net/cms/Developers-API-WindowMessage
Like that:

Code: Select all

$actualLeft=<someValueHere>
SendBang('!SetVariable DSVUMeterLeft "'&$actualLeft&'"')
So Rainmeter recive's the bang, an process it, shure... But it recive's the bang ONLY for active skin... I made VUmeter skin, and Spectrum skin... One by one it works, but bouth of them - not...

So I decide to use windowMessage plugin to ask my AutoIt program (deamon in fact) about specified values...

I tried to send message to script like that:

Code: Select all

[MeasureWinampPlaying]
Measure=Plugin
Plugin=WindowMessagePlugin
WindowClass=Autoit v3 GUI
WindowMessage=1024 0 0
And handle message on scrip side:

Code: Select all

#include <GUIConstantsEx.au3>
#include <SendMessage.au3>
GUICreate("Hello World", 200, 100)
Opt("GUIOnEventMode", 0)

While 1
  $msg = GUIGetMsg()
	if $msg>0 then
	ConsoleWrite("):(")
	ConsoleWrite($msg)
	EndIf
	if $msg<0 then
	ConsoleWrite("):(")
	ConsoleWrite($msg)
EndIf
WEnd
So I tried to write into console any getted message... And not even one from Rainmeter was recived...

I'm doing something wrong... But what?
User avatar
moshi
Posts: 1740
Joined: November 13th, 2012, 9:53 pm

Re: Rainmeter -> AutoIt interaction

Post by moshi »

have you tried using the config's (skin's) name? as in:

SendBang('!SetVariable DSVUMeterLeft "'&$actualLeft&'" whateverthenameofyourskinis')

http://docs.rainmeter.net/manual/bangs#SetVariable
http://docs.rainmeter.net/manual/skins#Config
Batulin_dmitri
Posts: 3
Joined: September 7th, 2013, 9:19 am

Re: Rainmeter -> AutoIt interaction

Post by Batulin_dmitri »

moshi wrote:have you tried using the config's (skin's) name? as in:

SendBang('!SetVariable DSVUMeterLeft "'&$actualLeft&'" whateverthenameofyourskinis')

http://docs.rainmeter.net/manual/bangs#SetVariable
http://docs.rainmeter.net/manual/skins#Config
I was)) But it doesn't fix the problem of two skins, which used the same variables... In that case variabe recive one specified skin... Sending bangs to two or more skins from AutoIt - it is not very good solution...

In fact - variables can be recived by one skin, and after that banged into others ... Some like proxy wrapper on au3 script... That is real solution.

But it's sill not perfect((

But thanks for help)))
Batulin_dmitri
Posts: 3
Joined: September 7th, 2013, 9:19 am

Re: Rainmeter -> AutoIt interaction

Post by Batulin_dmitri »

With current realization I did simple mediaplayer controll skin and skins for VUMeter (left\right which is the arcs on big circle) and two skins for spectrum analysis...
(screen in attachment)

Autoit app sending bangs to Controller skin (which is button between spectrums). After that Controller checking is skins avaliable...
If some skin avaliable - controller sending data to skin... If no skins avaliable - it's shut's down and kill the process of Autoit app...

Realization is very, I mean VERY far to end...

Features which is need to be done:
- read\write config of Autoit app
in config must be:
- number of bars for spectrum
- name of controllerskin to send data
- prefixes for variables which will be sent to skin
- sensitivity of VUmeters and Spectrums
- flag of show or not the tray icon of app
- flag of send or not data about VULevels\Spectrums
- flag of send or not data about system volume
- config window for app

Thanks for:
moshi - for suggestion
jsmorley - for sendBang() function and for ProcessEnd.exe
You do not have the required permissions to view the files attached to this post.