forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Need help with click event
Goto page 1, 2  Next
 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> Advanced Help for VDS 5 & Up
View previous topic :: View next topic  
Author Message
nickos
Valued Newbie


Joined: 17 Mar 2007
Posts: 26

PostPosted: Sat Mar 17, 2007 5:15 pm    Post subject: Need help with click event Reply with quote

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? Laughing
Back to top
View user's profile Send private message Send e-mail
Skit3000
Admin Team


Joined: 11 May 2002
Posts: 2166
Location: The Netherlands

PostPosted: Sat Mar 17, 2007 9:24 pm    Post subject: Reply with quote

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
View user's profile Send private message
vtol
Valued Contributor
Valued Contributor


Joined: 05 Feb 2004
Posts: 620
Location: Indiana

PostPosted: Sun Mar 18, 2007 2:53 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website AIM Address
nickos
Valued Newbie


Joined: 17 Mar 2007
Posts: 26

PostPosted: Sun Mar 18, 2007 10:20 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
vtol
Valued Contributor
Valued Contributor


Joined: 05 Feb 2004
Posts: 620
Location: Indiana

PostPosted: Sun Mar 18, 2007 10:47 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website AIM Address
PGWARE
Web Host


Joined: 29 Dec 2001
Posts: 1542

PostPosted: Sun Mar 18, 2007 2:54 pm    Post subject: Reply with quote

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
View user's profile Send private message
nickos
Valued Newbie


Joined: 17 Mar 2007
Posts: 26

PostPosted: Mon Mar 19, 2007 2:30 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
vdsalchemist
Admin Team


Joined: 23 Oct 2001
Posts: 1448
Location: Florida, USA

PostPosted: Mon Mar 19, 2007 2:51 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
vdsalchemist
Admin Team


Joined: 23 Oct 2001
Posts: 1448
Location: Florida, USA

PostPosted: Mon Mar 19, 2007 3:03 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
nickos
Valued Newbie


Joined: 17 Mar 2007
Posts: 26

PostPosted: Tue Mar 20, 2007 2:48 pm    Post subject: Reply with quote

It works Very Happy 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
View user's profile Send private message Send e-mail
vdsalchemist
Admin Team


Joined: 23 Oct 2001
Posts: 1448
Location: Florida, USA

PostPosted: Tue Mar 20, 2007 4:14 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
nickos
Valued Newbie


Joined: 17 Mar 2007
Posts: 26

PostPosted: Fri Mar 23, 2007 5:53 am    Post subject: Reply with quote

Still not moving from $205 Sad
Back to top
View user's profile Send private message Send e-mail
vdsalchemist
Admin Team


Joined: 23 Oct 2001
Posts: 1448
Location: Florida, USA

PostPosted: Fri Mar 23, 2007 1:36 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
nickos
Valued Newbie


Joined: 17 Mar 2007
Posts: 26

PostPosted: Fri Mar 23, 2007 1:49 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
vtol
Valued Contributor
Valued Contributor


Joined: 05 Feb 2004
Posts: 620
Location: Indiana

PostPosted: Sat Mar 24, 2007 12:22 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website AIM Address
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> Advanced Help for VDS 5 & Up All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
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




Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group