Sign in to follow this  
Followers 0
ramadash

problems using GUIRegisterMSG twice

7 posts in this topic

ok I use GUIRegisterMessage on 2 script, they both run at the same time.

the first time the first script is executed it works, the first time the second script is executed it works.

but the 2nd time the first script is executed it dosent work and I am really starting to get clueless as the "why" it dosent work.

the first script register:

$CMD_CallWrapper = 10000
GUIRegisterMsg($CMD_CallWrapper, "CallWrapper" )

the second script register:

$CMD_CallWrapper = 10002
GUIRegisterMsg($CMD_CallWrapper, "CallWrapper" )

it looks like the 2nd register overwrite the first one.. but message ID's are differents so I don't see why it would do this (I dont have much experience of windows messaging, not to say none at all). Also I was not able to test if the 2nd script receive message works the 2nd time because I need the first script to work in order for the 2nd one to start again.

I also tryied to re-register the first script each time befor it start's but there was absolutly no difference at all.

Any help would be very appreciated thanks you in advance.

Share this post


Link to post
Share on other sites



indeed i will try this, I will post results tomorrow. If this work, then I would really like to know why. (curiosity)

Share this post


Link to post
Share on other sites

I tryied this and it dosent work. I would really like some hints im starting to get really pissed..

Share this post


Link to post
Share on other sites

Could you provide a more elaborate sample? My PostMessage sample seems to work with several scripts open at the same time (tried with 4). I'm using Autoit-v3.2.1.4 on w2k.

Share this post


Link to post
Share on other sites

If I set this up correctly, the only time it wouldn't work for me is when it can't differentiate between the scripts. When both scripts had unique names it worked, even if both used $CMD_CallWrapper = 10000 and both had functions named CallWrapper().

I used these names to test:

main.exe

$mygui = GuiCreate( "myTest", 1, 1)

main2.exe

$mygui = GuiCreate( "cow", 1, 1)

Hope this helps!

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  
Followers 0