Jump to content
Sign in to follow this  
dewild1

C++ to AutoIT _sendmessage translation help, please..

Recommended Posts

Hello, I have been staring at help for a few hours, and I searched the forum... I am lost... <_<

Original C++

SendMessage(HWND_BROADCAST,WM_SETTINGCHANGE,0,LongInt(Pchar('HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\SearchHidden)));

In AHK it is, (I think)

setting:="HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\SearchHidden" 
SendMessage,0x001A,0,&setting, , ahk_id 0xffff

What would it be in AutoIT??

Thank you very much.

Share this post


Link to post
Share on other sites

Search for _SendMessage in the help file

I did, like I said, fours hours. I do not get what all this stuff means. I am self taught with no formal education, but I am not an idiot.

Me on TV 1

Me on TV2

Me on TV3

Comercial 1

Comercial 2

I am just trying my best at all I do, and I have done some cool things, so please do not call me stupid and throw me a bone, please..

hWnd, msg, wParam, lParam!!! Come on, that is like a different language! <_<

I am like a dog that has been nuderd, I JUST DON"T GET IT!

Function Reference

_SendMessage

--------------------------------------------------------------------------------

Wrapper for commonly used Dll Call

#Include <misc.au3>

_SendMessage ( hWnd, msg [, wParam = 0 [, lParam = 0 [, return = 0 [, wParam Type = "int" [, lParam Type = "int" ]]]]] )

Parameters

hwnd window/control handle

msg message to send to control (number)

wParam Specifies additional message-specific information (Optional: Default 0)

lParam Specifies additional message-specific information (Optional: Default 0)

return what to return (Optional: Default 0)

wParam Type Specifies what type of additional information (Optional: Default "int")

lParam Type Specifies what type of additional information (Optional: Default "int")

Return Value

return = 0 thru 4 corresponds to the parameter of the _SendMessage Wrapper

return < 0 or > 4 returns array same as DllCall

Remarks

None

Related

DllCall

Example

#include <misc.au3>

_Main()

Func _Main()

Local Const $Off = 2, $On = -1

Opt("WinTitleMatchMode", 4)

$hwnd = WinGetHandle('classname=Progman')

_ToggleMonitor($hWnd, $Off)

Sleep ( 3000 )

_ToggleMonitor($hWnd, $On)

EndFunc

Func _ToggleMonitor($hwnd, $OnOff)

Local Const $WM_SYSCOMMAND = 274

Local Const $SC_MONITORPOWER = 61808

_SendMessage($hWnd, $WM_SYSCOMMAND, $SC_MONITORPOWER, $OnOff)

If @error Then

MsgBox(0,"_ToggleMonitor", "_SendMessage Error: " & @error)

Exit

EndIf

EndFunc

Share this post


Link to post
Share on other sites

#include <Misc.au3>

Global $WM_SETTINGCHANGE = 0x1A

$sSetting = "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\SearchHidden"
$hBroadCast = 0xffffoÝ÷ Ù8^~éܶ*'q©eÛø¬§Úyè­êÚºÚ"µÍÌÍÚTÝ[HÔÙ[YÜØYÙJ    ÌÍÚØYØÝ   ÌÍÕÓWÔÑUSÐÒSÑK ÌÍÜÔÙ][Ë  ][ÝÚ[ ][ÝË  ][ÝÜÝ][ÝÊoÝ÷ ÚÚºÚ"µÍÌÍÝÙ][ÈHÝXÝÜX]J    ][ÝØÚÉ][ÝÈ    [ÈÝ[Ó[   ÌÍÜÔÙ][ÊH
ÈH [È ][Ý×I][ÝÊBÝXÝÙ]]J    ÌÍÝÙ][ËK   ÌÍÜÔÙ][ÊBÌÍÚTÝ[HÔÙ[YÜØYÙJ    ÌÍÚØYØÝ   ÌÍÕÓWÔÑUSÐÒSÑKÝXÝÙ] ÌÍÝÙ][ÊJ


SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Share this post


Link to post
Share on other sites

Dude, thank you.

I look forward to trying it when I get home, (out in the ambulance with my family). The way you laid it out, is really helping me understand it.

Thank you.

This programming stuff is hard for me, I have the attention span of a puppy dog on crack.

Share this post


Link to post
Share on other sites

Dude, thank you.

I look forward to trying it when I get home, (out in the ambulance with my family). The way you laid it out, is really helping me understand it.

Thank you.

This programming stuff is hard for me, I have the attention span of a puppy dog on crack.

Nice commercials... couldn't figure out if you were the News Caster or the Bald guy for a while <_<

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...