View previous topic :: View next topic |
Author |
Message |
nickos Valued Newbie
Joined: 17 Mar 2007 Posts: 26
|
Posted: Sat Mar 17, 2007 5:15 pm Post subject: Need help with click event |
|
|
I need to send an click event to other program window (not vds). This Window only have one child window, that is a bitmap without any button or shortcut.
I assume that bitmap have some "hotspot" area to capture an event click within a bounded co-ordinates.
Is it possible to send a click event without bringing that window ontop from other windows, or make other transparent? |
|
Back to top |
|
|
Skit3000 Admin Team
Joined: 11 May 2002 Posts: 2166 Location: The Netherlands
|
Posted: Sat Mar 17, 2007 9:24 pm Post subject: |
|
|
With the use of the window click command, you can send a mouseclick to another window. I don't think you can do this without making the window active, since of the nature of Windows itself. The window click just simulates a real mouse click, together with all other events and things included. _________________ [ Add autocomplete functionality to your VDS IDE windows! ]
Voor Nederlandse beginners met VDS: bekijk ook eens deze tutorial! |
|
Back to top |
|
|
vtol Valued Contributor
Joined: 05 Feb 2004 Posts: 642 Location: Eastern Indiana
|
Posted: Sun Mar 18, 2007 2:53 am Post subject: |
|
|
I guess WINDOW HIDE, <window> then do CLICK event on the child window, then unhide window(WINDOW NORMAL, <window>) would be to flicky or noticable. |
|
Back to top |
|
|
nickos Valued Newbie
Joined: 17 Mar 2007 Posts: 26
|
Posted: Sun Mar 18, 2007 10:20 am Post subject: |
|
|
How about with @sendmsg Command?
Actually when click at the hotspot region this bitmap will generate like a SHOWMODAL command.
Any more suggestion? |
|
Back to top |
|
|
vtol Valued Contributor
Joined: 05 Feb 2004 Posts: 642 Location: Eastern Indiana
|
Posted: Sun Mar 18, 2007 10:47 am Post subject: |
|
|
Someone may know a API @sendmsg command to graphic here, I've just seen them send to buttons, tables and lists.
Goodluck |
|
Back to top |
|
|
PGWARE Web Host
Joined: 29 Dec 2001 Posts: 1563
|
Posted: Sun Mar 18, 2007 2:54 pm Post subject: |
|
|
Bitmap/graphics are not actual windows, they are painted to the parent windowed control the graphic is ontop of. I don't think it's possible to send a message directly the bitmap like that.
I really think the only true method is sending the actual click and activating the window. |
|
Back to top |
|
|
nickos Valued Newbie
Joined: 17 Mar 2007 Posts: 26
|
Posted: Mon Mar 19, 2007 2:30 pm Post subject: |
|
|
I try this on my winamp play list
:begin
wait
%p = @sendmsg(Winamp Playlist Editor,$204,0,80,50)
%p = @sendmsg(Winamp Playlist Editor,$205,0,80,50)
exit
A popup menu apear just like I leftclick on play list, even the play list is covered by other window.
But,
The script stop (hung) at line 4, and continue to exit when I close that menu.
Although,
%p = @sendmsg(Winamp Playlist Editor,$201,0,80,50)
The X: pointer seems work, not the Y: pointer
I dont really know the right syntax for @sendmsg command |
|
Back to top |
|
|
vdsalchemist Admin Team
Joined: 23 Oct 2001 Posts: 1448 Location: Florida, USA
|
Posted: Mon Mar 19, 2007 2:51 pm Post subject: |
|
|
nickos wrote: | I try this on my winamp play list
:begin
wait
%p = @sendmsg(Winamp Playlist Editor,$204,0,80,50)
%p = @sendmsg(Winamp Playlist Editor,$205,0,80,50)
exit
A popup menu apear just like I leftclick on play list, even the play list is covered by other window.
But,
The script stop (hung) at line 4, and continue to exit when I close that menu.
Although,
%p = @sendmsg(Winamp Playlist Editor,$201,0,80,50)
The X: pointer seems work, not the Y: pointer
I dont really know the right syntax for @sendmsg command |
From what I can see is that you have too many parameters for the @SendMsg function.
These lines
Code: |
%p = @sendmsg(Winamp Playlist Editor,$204,0,80,50)
%p = @sendmsg(Winamp Playlist Editor,$205,0,80,50)
|
Should be
Code: |
%p = @sendmsg(@Winexists(Winamp Playlist Editor),$204,80,50)
%p = @sendmsg(@Winexists(Winamp Playlist Editor),$205,80,50)
|
The syntax for @sendmsg is
%p = @sendmsg(<Window ID>,<Message ID>,<WParam>,<LParam>) _________________ Home of
Give VDS a new purpose!
|
|
Back to top |
|
|
vdsalchemist Admin Team
Joined: 23 Oct 2001 Posts: 1448 Location: Florida, USA
|
Posted: Mon Mar 19, 2007 3:03 pm Post subject: |
|
|
Actually I just looked up the WM_RBUTTONDOWN and WM_RBUTTONUP messages and the lparam should be a this...
Code: |
# Place the X cord in the loword.
# Place the Y cord in the hiword.
%x = @BINARY(WORD,50)
%y = @binary(WORD,80)
%A = %X%Y
# convert to string
%B = @VAL(%A)
# send the messages
%p = @sendmsg(@winexists(Winamp Playlist Editor),$204,0,%B)
%p = @sendmsg(@winexists(Winamp Playlist Editor),$205,0,%B)
|
_________________ Home of
Give VDS a new purpose!
|
|
Back to top |
|
|
nickos Valued Newbie
Joined: 17 Mar 2007 Posts: 26
|
Posted: Tue Mar 20, 2007 2:48 pm Post subject: |
|
|
It works at the "hotspot" too.
Lo&hiword that was I missed.
The script stop at @sndmsg command line, seems to be waiting a retuning value from application processes.
Some how must be another way, I just can figure it out.
At the moment I use another exe to continue my script.
Many thanks All. |
|
Back to top |
|
|
vdsalchemist Admin Team
Joined: 23 Oct 2001 Posts: 1448 Location: Florida, USA
|
Posted: Tue Mar 20, 2007 4:14 pm Post subject: |
|
|
nickos,
IMHO You should test for the response of the WM_RBUTTONDOWN before sending the WM_RBUTTONUP. WM_RBUTTONDOWN should return 0 if the window processed the message. It should look something like this...
Code: |
# Place the X cord in the loword.
# Place the Y cord in the hiword.
%x = @BINARY(WORD,50)
%y = @binary(WORD,80)
%A = %X%Y
# convert to string
%B = @VAL(%A)
# send the messages
%p = @sendmsg(@winexists(Winamp Playlist Editor),$204,0,%B)
If @Zero(%p)
%p = @sendmsg(@winexists(Winamp Playlist Editor),$205,0,%B)
End
|
_________________ Home of
Give VDS a new purpose!
|
|
Back to top |
|
|
nickos Valued Newbie
Joined: 17 Mar 2007 Posts: 26
|
Posted: Fri Mar 23, 2007 5:53 am Post subject: |
|
|
Still not moving from $205 |
|
Back to top |
|
|
vdsalchemist Admin Team
Joined: 23 Oct 2001 Posts: 1448 Location: Florida, USA
|
Posted: Fri Mar 23, 2007 1:36 pm Post subject: |
|
|
nickos,
Winamp may be going directly into a menu loop after it gets a WM_RBUTTONUP message? I'm not sure since I have not used Winamp in over 5 years. _________________ Home of
Give VDS a new purpose!
|
|
Back to top |
|
|
nickos Valued Newbie
Joined: 17 Mar 2007 Posts: 26
|
Posted: Fri Mar 23, 2007 1:49 pm Post subject: |
|
|
Hi Dragon, thx for help.
Are Gadgetx can get list item from other program windows? Or maybe there are an easy way in VDS rather than using ext dll's.
Again, thanks. |
|
Back to top |
|
|
vtol Valued Contributor
Joined: 05 Feb 2004 Posts: 642 Location: Eastern Indiana
|
Posted: Sat Mar 24, 2007 12:22 am Post subject: |
|
|
I made a frontend for DIVx and had same kind of problems as far as keeping connected to the DIVx classname, seemed to change all the time or hide from my frontend in a very smart way.
I think its there to protect the program from being slave to another as far as legal right and what have you, I'm not sure though.
But I gave that project up long time ago. |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You can attach files in this forum You can download files in this forum
|
|