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"].