Page 1 of 2

Rainmeter 3.2 Beta r2326

Posted: September 17th, 2014, 1:22 pm
by RainmeterTeam
September 17, 2014
The latest 3.2 beta version of Rainmeter is now available from
Rainmeter Main Site
As usual, Rainmeter 3.2 is fully backwards compatible with skins written for any version of Rainmeter
You need only install on top of your existing installation.
No need to uninstall 3.1 or worry about overwriting changes you have made.
Changes are described at
Release Notes
Change history for Rainmeter at
Rainmeter Version History

Re: Rainmeter 3.2 Beta r2326 Available

Posted: September 17th, 2014, 1:24 pm
by jsmorley
This is a quick bug-fix beta release to correct an issue created in r2325. The bug would prevent external applications using tools like AutoIt from identifying and sending messages to the Rainmeter window handle.

This would stop external addons like RainRGB from working correctly.

Re: Rainmeter 3.2 Beta r2326 Available

Posted: September 19th, 2014, 8:14 am
by indy1250
Hello

I'm new to rainmeter and i'm having an issue getting autoit to send a bang to rainmeter. I have updated to the latest beta 3.2.0 beta r2326 64bit Sep 17 2014
I am running rainmeter on Windows 8.1

Can you look at this code and tell me what I might be doing wrong. The image loads fine

happyface.ini

[Rainmeter]
Update =1000

[Happyface]
Meter=Image
ImageName="Happyface.png"
h=200
w=200
x=0
y=0
SolidColor=200,200,200,150
PreserveAspectRatio=1


Autoit script that I got from these forums to see if I can get this working but it doesn't for me.

;#NoTrayIcon
#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_UseUpx=n
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
#include <SendMessage.au3>

Opt("WinTitleMatchMode", 4)

; Example:
SendBang("[!About]")

Func SendBang($szBang)
Local Const $hWnd = WinGetHandle("classname=RainmeterMeterWindow")
If $hWnd <> 0 Then
Local Const $iSize = StringLen($szBang) + 1

Local Const $pMem = DllStructCreate("wchar[" & $iSize & "]")
DllStructSetData($pMem, 1, $szBang)

Local Const $pCds = DllStructCreate("dword;dword;ptr")
DllStructSetData($pCds, 1, 1)
DllStructSetData($pCds, 2, ($iSize * 2))
DllStructSetData($pCds, 3, DllStructGetPtr($pMem))

Local Const $WM_COPYDATA = 0x004A
_SendMessage($hWnd, $WM_COPYDATA, 0, DllStructGetPtr($pCds))
EndIf
EndFunc

The autoit script doesn't work but if I run rainmeter.exe !about it works fine.
No errors are thrown by the autoit script either.

I do not want to use the rainmeter.exe in my autoit script.
I looked at Plugin=WindowMessagePlugin but there is no example of receiving messages. Do I have to add something to my happyface.ini?

Thank you.

Indy1250

Re: Rainmeter 3.2 Beta r2326 Available

Posted: September 19th, 2014, 10:05 am
by jsmorley
Works fine for me. What version of AutoIt do you have installed?

If I create a text file About.au3 and paste this into it:

Code: Select all

;#NoTrayIcon
#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_UseUpx=n
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
#include <SendMessage.au3>

Opt("WinTitleMatchMode", 4)

; Example:
SendBang("[!About]")

Func SendBang($szBang)
Local Const $hWnd = WinGetHandle("classname=RainmeterMeterWindow")
If $hWnd <> 0 Then
Local Const $iSize = StringLen($szBang) + 1

Local Const $pMem = DllStructCreate("wchar[" & $iSize & "]")
DllStructSetData($pMem, 1, $szBang)

Local Const $pCds = DllStructCreate("dword;dword;ptr")
DllStructSetData($pCds, 1, 1)
DllStructSetData($pCds, 2, ($iSize * 2))
DllStructSetData($pCds, 3, DllStructGetPtr($pMem))

Local Const $WM_COPYDATA = 0x004A
_SendMessage($hWnd, $WM_COPYDATA, 0, DllStructGetPtr($pCds))
EndIf
EndFunc
Then open it in the SciTE editor that installs with AutoIt and choose Tools / Go it opens the About / Log panel just fine. If I then compile it to About.exe, it works fine when executed.

Need to know more about your AutoIt environment, and how you are compiling and executing the script. I don't see anything in the skin code you posted that would execute it.

I don't want to jump to conclusions, but on the surface it looks like you might be trying to just embed the AutoIt code in the Rainmeter skin .ini file. That certainly isn't going to to work, you need to create an AutoIt .au3 file, then test and compile it to a .exe. Then in Rainmeter, use something like LeftMouseUpAction=["PathToCompiledScript\CompiledScript.exe"].

Re: Rainmeter 3.2 Beta r2326 Available

Posted: September 19th, 2014, 10:54 am
by jsmorley
Skin:

Code: Select all

[Rainmeter]
Update=1000
DynamicWindowSize=1
AccurateText=1

[MeterImage]
Meter=Image
W=50
H=50
SolidColor=255,255,255,255
LeftMouseUpAction=["#CURRENTPATH#About.exe"]
About.au3:

Code: Select all

;#NoTrayIcon
#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_UseUpx=n
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
#include <SendMessage.au3>

Opt("WinTitleMatchMode", 4)

; Example:
SendBang("[!About]")

Func SendBang($szBang)
Local Const $hWnd = WinGetHandle("classname=RainmeterMeterWindow")
If $hWnd <> 0 Then
Local Const $iSize = StringLen($szBang) + 1

Local Const $pMem = DllStructCreate("wchar[" & $iSize & "]")
DllStructSetData($pMem, 1, $szBang)

Local Const $pCds = DllStructCreate("dword;dword;ptr")
DllStructSetData($pCds, 1, 1)
DllStructSetData($pCds, 2, ($iSize * 2))
DllStructSetData($pCds, 3, DllStructGetPtr($pMem))

Local Const $WM_COPYDATA = 0x004A
_SendMessage($hWnd, $WM_COPYDATA, 0, DllStructGetPtr($pCds))
EndIf
EndFunc
About.zip
While this is an example of executing a compiled AutoIt script from Rainmeter, and sending window messages to Rainmeter from AutoIt, it should be noted that this is entirely unneeded in this case. There is a bang that will open About from a skin.

Code: Select all

[Rainmeter]
Update=1000
DynamicWindowSize=1
AccurateText=1

[MeterImage]
Meter=Image
W=50
H=50
SolidColor=255,255,255,255
LeftMouseUpAction=[!About]

Re: Rainmeter 3.2 Beta r2326 Available

Posted: September 19th, 2014, 7:31 pm
by indy1250
Thanks for the reply.

What i'm trying to do is execute !bangs via the autoit script to manipulate the image in rainmeter. Specifically i'm trying to send the !move bang to slide the image across the screen. But I can't even get the !about bang to send for example.

I am running autoit v3.3.12.0 which is the newest version.
The script seems to run but the about screen doesn't come up in rainmeter.

I've trying compiling the autoit script to 64 and 32 bit exe's. Tried running each as administrator and not as administrator.

I'm thinking this has something to do with UAC (User account control) in windows 8.1? Are you using windows 8.1? Guess I'm going to try this on a windows 7 build and see if I'm having the same problem.

Do I have to specify the Plugin=WindowMessagePlugin anywhere in rainmeter? rainmeter.ini or the happyface.ini?

Here is the script I created in autoit to move a image but it currently uses the rainmeter.exe which makes the mouse cursor show the waiting symbol while it's running. I'm trying to avoid running the exe over and over.

#include <Misc.au3>

Opt("WinTitleMatchMode", 2) ;1=start, 2=subStr, 3=exact, 4=advanced, -1 to -4=Nocase

$POSX = 960
$POSY = 0
$Raduis = 300
$RotateDuration = 5
$Stepby = 5

DrawCircle($POSX, $POSY, $Raduis)

Func DrawCircle($X, $Y, $r)
Local Const $PI = 3.141592653589793
For $Z = 1 to $RotateDuration
for $i = 1 to 360 step $Stepby
$angle = $i
$x1 = $r * cos($angle * $PI / 180)
$y1 = $r * sin($angle * $PI / 180)
Runwait('C:\Program Files\Rainmeter\Rainmeter.exe !Move ' & $X + $x1 & ' ' & $Y + $y1)
Next
Next
EndFunc

Thanks for your help.

Re: Rainmeter 3.2 Beta r2326 Available

Posted: September 19th, 2014, 8:05 pm
by jsmorley
Not sure. I am running Win8.1 64bit as well, and have no issues executing AutoIt scripts in Rainmeter. I do set UAC as low as it can go, but I don't turn it off.

The WindowMessage plugin plays no role in this.

Just compile the AutoIt as 32bit, (64bit is not really needed, and just makes it harder to distribute) put the .exe in with your skin, in the @Resources folder is good. Don't put it in a protected area like Program Files.

Re: Rainmeter 3.2 Beta r2326 Available

Posted: September 19th, 2014, 8:13 pm
by jsmorley
See if this skin works for you.
About_1.0.rmskin

Re: Rainmeter 3.2 Beta r2326 Available

Posted: September 19th, 2014, 8:21 pm
by indy1250
That works. I made a quick fresh windows 8.1 VM and installed autoit and rainmeter and it's working with the about.ini you sent earlier. Looks like there is something wrong with my main windows 8.1 machine. :(

I'm going to try reinstalling both rainmeter and autoit.

Sorry for wasting your time... Sigh.. I've been beating my head against the wall for days with this. Thanks for your help.

indy1250

Re: Rainmeter 3.2 Beta r2326 Available

Posted: September 19th, 2014, 8:24 pm
by jsmorley
Glad to help. Good luck!