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 


WINDOWS 2K and VDS2.5 / 3.51 Window Click

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help
View previous topic :: View next topic  
Author Message
Robert Switz
Newbie


Joined: 07 Dec 2002
Posts: 6

PostPosted: Sun Dec 08, 2002 3:46 am    Post subject: WINDOWS 2K and VDS2.5 / 3.51 Window Click Reply with quote

Sad I Just ran in to this problem, probably an old problem but does any body have a fix “Window Click,windowname,X,Y” just not working. As if it didn’t see the command everything before and after executes.
Any Ideas?
Thanks Bob
Back to top
View user's profile Send private message Send e-mail
Garrett
Moderator Team


Joined: 04 Oct 2001
Posts: 2149
Location: A House

PostPosted: Sun Dec 08, 2002 9:57 am    Post subject: Reply with quote

Can you drop us the source code for that so we can take a look?

-Garrett
Back to top
View user's profile Send private message
Mac
Professional Member
Professional Member


Joined: 08 Jul 2000
Posts: 1585
Location: Oklahoma USA

PostPosted: Sun Dec 08, 2002 2:49 pm    Post subject: Reply with quote

Hey Bob, Smile

I just remembered something (you may have already
allowed for this)... Embarassed

The WINDOW CLICK X and Y are absolute on the window
(from top left corner of the title bar), not just the client area,
so ya gotta allow for title bar height, menu height, etc.

I've been tweaking an old routine of Garrett's (not finished
testing it yet) to get these for various system settings, and
am gonna post an example later with different layouts.

Meanwhile, ya might check if this WINDOW CLICK example
works on your system...

Clicking B2 should WINDOW CLICK on the upper left corner
of B1. If it doesn't, ya might try try adjusting %x and %y
(ya should be able to see where the mouse cursor goes). Wink
__________________________________________________________________________________________________________________________
Code:

OPTION SCALE, 96
OPTION DECIMALSEP, "."
TITLE By Mac
DIALOG CREATE,"Test Program",-1,0,300,200
  %%hwnd = @winexists("Test Program")
  GOSUB GetWindowSpecs
  DIALOG ADD,BUTTON,B1,5,5,40,22
  DIALOG ADD,BUTTON,B2,5,255,40,22
  DIALOG ADD,STATUS,Stat
DIALOG SHOW
DIALOG SET,Stat, Border= %%b_width  Title= %%t_height  Menu= %%m_height  Status bar= %%sb_height

:EVLOOP
  WAIT EVENT
  goto @event()

:B1BUTTON
  INFO B1 has been WINDOW CLICKED...@tab()
  goto EVLOOP

:B2BUTTON
  %x = 5
  %y = 5
  WINDOW CLICK,%%hwnd,@sum(%x, %%b_width),@sum(%y, %%t_height)
  goto EVLOOP

:CLOSE
  EXIT

rem -------- SUB ------------

:GetWindowSpecs
  rem -- Get systemwide titlebar, status bar, menu height, and border width --
  %c = "TempWindowToGetWindowSpecs"
  rem -- Normal and RESIZABLE have different title heights --
    rem -- Resizable:
  rem DIALOG CREATE, "GetWindowSpecs",-1,0,200,200,RESIZABLE,CLASS %c
    rem -- Non-resizable:
  DIALOG CREATE, "GetWindowSpecs",-1,0,200,200,CLASS %c
    %%b_width = @div(@diff(@winpos(#%c,W),200), 2)
    %%t_height = @diff(@diff(@winpos(#%c,H),200),%%b_width)
    %%sb_height = @diff(%%t_height, %%b_width)
  DIALOG ADD,MENU,MenuTest
    %%b_width = @succ(%%b_width)
    %%m_height = @diff(@winpos(#%c,H),@sum(200,%%b_width,%%t_height))
    %%t_height = @succ(%%t_height)
    %%m_height = @succ(%%m_height)
  DIALOG CLOSE
  %c = @event()
  %c = ""
  exit

Cheers, Mac Smile

_________________
VDSug.dll does file IO, check/disable menu items,
non-VDS dlls, draw functions and more...
Free download (30k dll size) at:
http://www.vdsworld.com/download.php?id=361
Back to top
View user's profile Send private message Send e-mail
Robert Switz
Newbie


Joined: 07 Dec 2002
Posts: 6

PostPosted: Mon Dec 09, 2002 8:02 pm    Post subject: I found the trouble Reply with quote

Very Happy There is a problem with the window spy in VDS3.51 it doesn't give the window X, Y it gives the whole screen X,Y
Thanks All
Back to top
View user's profile Send private message Send e-mail
Mac
Professional Member
Professional Member


Joined: 08 Jul 2000
Posts: 1585
Location: Oklahoma USA

PostPosted: Mon Dec 09, 2002 10:52 pm    Post subject: Reply with quote

Ya might wanna check out this spy tool (VDS3 source code). Wink

http://www.vdsworld.com/forum/viewtopic.php?t=450

Cheers, Mac Smile

_________________
VDSug.dll does file IO, check/disable menu items,
non-VDS dlls, draw functions and more...
Free download (30k dll size) at:
http://www.vdsworld.com/download.php?id=361
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help All times are GMT
Page 1 of 1

 
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