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 


Redistributing Window Spy

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> Miscellaneous
View previous topic :: View next topic  
Author Message
DaveR
Valued Contributor
Valued Contributor


Joined: 03 Sep 2005
Posts: 413
Location: Australia

PostPosted: Mon Apr 03, 2006 6:09 am    Post subject: Redistributing Window Spy Reply with quote

Is Window Spy redistributable?

There's no mention of any licensing or redistribution conditions in the help file.

_________________
cheers

Dave
Back to top
View user's profile Send private message
Hooligan
VDS Developer
VDS Developer


Joined: 28 Oct 2003
Posts: 480
Location: California

PostPosted: Mon Apr 03, 2006 6:35 am    Post subject: Reply with quote

I've always considered it a part of the IDE, (as a debug tool). Therefore not distributable. But that is a decision for CR...

On the other hand, there are some freeware versions of simular tools available on the internet, such as at sysinternals.com or wininternals.com.

Hooligan

_________________
Hooligan

Why be normal?
Back to top
View user's profile Send private message
DaveR
Valued Contributor
Valued Contributor


Joined: 03 Sep 2005
Posts: 413
Location: Australia

PostPosted: Mon Apr 03, 2006 10:49 am    Post subject: Reply with quote

Unfortunately systernals freeware are also non distributable.
http://www.sysinternals.com/Licensing.html

I've had a look at Mac's Window Spy Tool, but it doesn't seem to give the correct results on non VDS windows.

I believe spy.exe from the MS' Win32 SDK and Visual C/C++ would do... but I doubt it's redistributable either.

I had a quick go at writing my own without much success. All I want is for users to be able to get the main class name of any particular application's main window.

_________________
cheers

Dave
Back to top
View user's profile Send private message
SnarlingSheep
Professional Member
Professional Member


Joined: 13 Mar 2001
Posts: 759
Location: Michigan

PostPosted: Mon Apr 03, 2006 5:24 pm    Post subject: Reply with quote

This is a pretty simple version I wrote in C, if it works for what you want, you can redestribute as you like... I want 300% of any money it makes though Wink

EDIT: New version below.

_________________
-Sheep
My pockets hurt...


Last edited by SnarlingSheep on Wed May 24, 2006 5:18 am; edited 1 time in total
Back to top
View user's profile Send private message Send e-mail
WidgetCoder
Contributor
Contributor


Joined: 28 May 2002
Posts: 126
Location: CO, USA

PostPosted: Mon Apr 03, 2006 5:32 pm    Post subject: Reply with quote

DaveŽ wrote:
All I want is for users to be able to get the main class name of any particular application's main window.


If that's all you need, you could try something this:
Code:

  option scale,96
  option fieldsep,|
  list create,1
   
Title WinSpy
  DIALOG CREATE,Win Spy,-1,0,532,253,ONTOP,CLASS WinSpy
REM *** Modified by Dialog Designer on 4/3/2006 - 11:35 ***
  DIALOG ADD,TABLE,TABLE1,6,6,432,223,Window ID[100]|Window Class[120]|Window Text,,CLICK,COLUMNSORT
  DIALOG ADD,GROUP,GROUP1,6,443,84,223
  DIALOG ADD,BUTTON,WinList,13,451,67,24,WinList
  DIALOG ADD,BUTTON,Position,45,451,67,24,Position
  DIALOG ADD,BUTTON,Activate,77,451,67,24,Activate
  DIALOG ADD,BUTTON,Exit,195,451,67,24,Exit
  DIALOG ADD,STATUS,STATUS1,
  DIALOG ADD,BUTTON,Spy,135,451,67,24,Spy
  DIALOG SHOW
  %X = @SENDMSG(@WINEXISTS(~TABLE1),@SUM($1000,54),0,$20)
  dialog disable,Position
  dialog disable,Activate

:Evloop
  wait event
  goto @event()
 
:SpyButton
  list clear,table1
  while @equal(@winactive(C),WinSpy)
  Wend
  %W = @winatpoint(@mousepos(X),@mousepos(y))
  if %W
    list add,table1,%W@tab()@winclass(%W)@tab()@wintext(%W)|@windir(s)\shell32.dll|2
  end
  dialog set,Status1,Windows = @count(Table1)
  goto evloop

:TABLE1CLICK
  If @greater(@index(Table1),-1)
    dialog enable,Position
    dialog enable,Activate
  else
    dialog disable,Position
    dialog disable,Activate
  end
  goto evloop

:WinListBUTTON
  list clear,table1
  list winlist,1,ICN
  %E = @count(1)
  if @greater(%E,0)
    repeat
      parse "%I;%C;%N",@item(1,@pred(%E))
      if %I
        list add,table1,%I@tab()%C@tab()%N|@windir(s)\shell32.dll|2
      end
      %E = @pred(%E)
    until @zero(%E)
    dialog set,Status1,Windows = @count(Table1)
  end
  list clear,1
  goto evloop

:PositionBUTTON
  parse "%T;%L;%W;%H;%S",@winpos(@item(table1,,1),TLWHS)
  if @equal(%S,1)
    %S = Normal
  elsif @equal(%S,2)
    %S = Inconized
  else
    %S = Maximized
  end
  info Top@tab()%T@cr()Left@tab()%L@cr()Width@tab()%W@cr()Hieght@tab()%H@cr()Status@tab()%S
  goto evloop

:ActivateBUTTON
  Window Activate,@item(table1,,1)
  goto evloop

:ExitBUTTON
:Close
  list close,1
  exit


Last edited by WidgetCoder on Tue Apr 04, 2006 1:30 am; edited 1 time in total
Back to top
View user's profile Send private message Send e-mail
DaveR
Valued Contributor
Valued Contributor


Joined: 03 Sep 2005
Posts: 413
Location: Australia

PostPosted: Tue Apr 04, 2006 12:15 am    Post subject: Reply with quote

SnarlingSheep wrote:
This is a pretty simple version I wrote in C, if it works for what you want, you can redestribute as you like... I want 300% of any money it makes though Wink


Thanks SS. It works perfectly. And 300% of "free" will be coming your way. Very Happy

_________________
cheers

Dave
Back to top
View user's profile Send private message
DaveR
Valued Contributor
Valued Contributor


Joined: 03 Sep 2005
Posts: 413
Location: Australia

PostPosted: Tue Apr 04, 2006 12:22 am    Post subject: Reply with quote

WidgetCoder,

Your sample looked (suspiciously?) just like the CR Window Spy tool. Unfortunately it had the problem of only being able to "spy" on VDS windows.

_________________
cheers

Dave
Back to top
View user's profile Send private message
WidgetCoder
Contributor
Contributor


Joined: 28 May 2002
Posts: 126
Location: CO, USA

PostPosted: Tue Apr 04, 2006 1:47 am    Post subject: Reply with quote

Oops.. I corrected the code, I was just hashing/plagiarizing out an example.. Smile
Back to top
View user's profile Send private message Send e-mail
DaveR
Valued Contributor
Valued Contributor


Joined: 03 Sep 2005
Posts: 413
Location: Australia

PostPosted: Tue Apr 04, 2006 3:24 am    Post subject: Reply with quote

Works perfectly now. Thanks.
_________________
cheers

Dave
Back to top
View user's profile Send private message
SnarlingSheep
Professional Member
Professional Member


Joined: 13 Mar 2001
Posts: 759
Location: Michigan

PostPosted: Wed May 24, 2006 5:21 am    Post subject: Reply with quote

Updated my window spy to show the window style constant names(WS_BORDER|WS_VISIBLE etc.) under the RealTime tab.


SnarlingWindowSpy.zip
 Description:

Download
 Filename:  SnarlingWindowSpy.zip
 Filesize:  7.15 KB
 Downloaded:  1912 Time(s)


_________________
-Sheep
My pockets hurt...
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 -> Miscellaneous 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