[FYI]: Using SendMessage with AutoIt

English support forum

Moderators: white, Hacker, petermad, Stefan2

User avatar
SanskritFritz
Power Member
Power Member
Posts: 3693
Joined: 2003-07-24, 09:25 UTC
Location: Budapest, Hungary

Post by *SanskritFritz »

Somehow AHK is as messy as TC
:lol: that is why I like it!!! ;-)
I switched to Linux, bye and thanks for all the fish!
User avatar
SanskritFritz
Power Member
Power Member
Posts: 3693
Joined: 2003-07-24, 09:25 UTC
Location: Budapest, Hungary

Post by *SanskritFritz »

Read this, it helps a little to see the past and the future of AHK and AI3 synergy:
http://www.autohotkey.com/forum/viewtopic.php?p=20168#20168
I switched to Linux, bye and thanks for all the fish!
icfu
Power Member
Power Member
Posts: 6052
Joined: 2003-09-10, 18:33 UTC

Post by *icfu »

Not very promising...

Thx for info

Icfu
This account is for sale
User avatar
SanskritFritz
Power Member
Power Member
Posts: 3693
Joined: 2003-07-24, 09:25 UTC
Location: Budapest, Hungary

Post by *SanskritFritz »

Actually i think, given the present circumstances, the way AHK plans improvements, like it supports functions and local variables (finally), it is promising.
I already started to convert my scripts to use functions.
:-)
I switched to Linux, bye and thanks for all the fish!
icfu
Power Member
Power Member
Posts: 6052
Joined: 2003-09-10, 18:33 UTC

Post by *icfu »

I meant the bundling of efforts, not AHK features. ;)

Icfu
This account is for sale
User avatar
SanskritFritz
Power Member
Power Member
Posts: 3693
Joined: 2003-07-24, 09:25 UTC
Location: Budapest, Hungary

Post by *SanskritFritz »

I switched to Linux, bye and thanks for all the fish!
User avatar
Balderstrom
Power Member
Power Member
Posts: 2148
Joined: 2005-10-11, 10:10 UTC

Post by *Balderstrom »

@ SanskritFritz
Interesting stuff :) Do you by chance have any of your scripts online anywhere to look at?
icfu
Power Member
Power Member
Posts: 6052
Joined: 2003-09-10, 18:33 UTC

Post by *icfu »

Most of our AutoHotkey scripts are in the Wiki:
http://www.ghisler.ch/wiki/index.php/AutoHotkey

Icfu
This account is for sale
User avatar
StickyNomad
Power Member
Power Member
Posts: 1933
Joined: 2004-01-10, 00:15 UTC
Location: Germany

Post by *StickyNomad »

2icfu
Referring to your first post: I tried out your tipp and it works fine for the commands I tested yet, but I couldn't figure out whats up with
1075 is WM_USER+51
and why it's needed.

Ashes on my head if I did overlook something totally stupid, but maybe you can light a tiny candle to illuminate the darnesss I'm in :wink:
User avatar
SanskritFritz
Power Member
Power Member
Posts: 3693
Joined: 2003-07-24, 09:25 UTC
Location: Budapest, Hungary

Post by *SanskritFritz »

2StickyNomad
It is not needed, it is only an explanation. It is common for windows applications to define user defined messages, and Microsoft recommends that the values should be above the WM_USER constant. Ghisler simply defined his message as WM_USER+51, much like Douglas Adams his 42 ;-)
I switched to Linux, bye and thanks for all the fish!
User avatar
StickyNomad
Power Member
Power Member
Posts: 1933
Joined: 2004-01-10, 00:15 UTC
Location: Germany

Post by *StickyNomad »

2SanskritFritz
thanks for you explanation, oh Deep Thought :D

strangely, this example works fine:

Code: Select all

$hwnd = WinGetHandle("Total Commander")
DllCall("user32.dll", "int", "SendMessage", "hwnd", $hwnd , "int" , 1075 , "int", 2903 )
but when I remove ' "int" , 1075, ', the script doesn't do anything, so I'm still a little confused... :?:
User avatar
SanskritFritz
Power Member
Power Member
Posts: 3693
Joined: 2003-07-24, 09:25 UTC
Location: Budapest, Hungary

Post by *SanskritFritz »

1075 is the message identifier, the 2903 is the parameter from the Windows point of view. From TC point of view, 1075 is the message used to send commands to TC, whereas the parameter is the cm_VisTwoDriveButtons command you can find in the TOTALCMD.INC file. By changing the parameter you can send different commands to TC, but when you change the message constant, TC will do nothing if you are lucky, or something strange depending on the message it tries to interpret. You can even freeze an application by sending some messages to them.
I switched to Linux, bye and thanks for all the fish!
User avatar
StickyNomad
Power Member
Power Member
Posts: 1933
Joined: 2004-01-10, 00:15 UTC
Location: Germany

Post by *StickyNomad »

Thank you very much, SanskritFritz! I'm a complete idiot in windows programming but you enlightened me a bit.

[offtopic]
BTW and extremely Offtopic:
Did you ever hear Audio recordings of Douglas Adams live? I once heard a CD where he read excerpts from different books and it was perhaps even more enjoying than reading it!
[/offtopic]
User avatar
SanskritFritz
Power Member
Power Member
Posts: 3693
Joined: 2003-07-24, 09:25 UTC
Location: Budapest, Hungary

Post by *SanskritFritz »

I'm a complete idiot in windows programming
You are an artist :-)
Did you ever hear Audio recordings of Douglas Adams
No I havent had the chance. But i enjoyed his books very much :-)
I switched to Linux, bye and thanks for all the fish!
User avatar
StickyNomad
Power Member
Power Member
Posts: 1933
Joined: 2004-01-10, 00:15 UTC
Location: Germany

Post by *StickyNomad »

You are an artist
Thanks. I'm a webdevelopper and -designer, to be exactly :) so I'm quite capable of programming and scripting, but not with Win-Apps and all this MFC and whatever stuff...
Post Reply