| View previous topic :: View next topic |
| Author |
Message |
DaveR Valued Contributor


Joined: 03 Sep 2005 Posts: 413 Location: Australia
|
Posted: Mon Apr 03, 2006 6:09 am Post subject: Redistributing Window Spy |
|
|
Is Window Spy redistributable?
There's no mention of any licensing or redistribution conditions in the help file.
_________________ cheers
Dave |
|
| Back to top |
|
 |
Hooligan VDS Developer


Joined: 28 Oct 2003 Posts: 480 Location: California
|
Posted: Mon Apr 03, 2006 6:35 am Post subject: |
|
|
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 |
|
 |
DaveR Valued Contributor


Joined: 03 Sep 2005 Posts: 413 Location: Australia
|
Posted: Mon Apr 03, 2006 10:49 am Post subject: |
|
|
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 |
|
 |
SnarlingSheep Professional Member


Joined: 13 Mar 2001 Posts: 759 Location: Michigan
|
Posted: Mon Apr 03, 2006 5:24 pm Post subject: |
|
|
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
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 |
|
 |
WidgetCoder Contributor


Joined: 28 May 2002 Posts: 126 Location: CO, USA
|
Posted: Mon Apr 03, 2006 5:32 pm Post subject: |
|
|
| 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 |
|
 |
DaveR Valued Contributor


Joined: 03 Sep 2005 Posts: 413 Location: Australia
|
Posted: Tue Apr 04, 2006 12:15 am Post subject: |
|
|
| 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  |
Thanks SS. It works perfectly. And 300% of "free" will be coming your way.
_________________ cheers
Dave |
|
| Back to top |
|
 |
DaveR Valued Contributor


Joined: 03 Sep 2005 Posts: 413 Location: Australia
|
Posted: Tue Apr 04, 2006 12:22 am Post subject: |
|
|
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 |
|
 |
WidgetCoder Contributor


Joined: 28 May 2002 Posts: 126 Location: CO, USA
|
Posted: Tue Apr 04, 2006 1:47 am Post subject: |
|
|
Oops.. I corrected the code, I was just hashing/plagiarizing out an example..
|
|
| Back to top |
|
 |
DaveR Valued Contributor


Joined: 03 Sep 2005 Posts: 413 Location: Australia
|
Posted: Tue Apr 04, 2006 3:24 am Post subject: |
|
|
Works perfectly now. Thanks.
_________________ cheers
Dave |
|
| Back to top |
|
 |
SnarlingSheep Professional Member


Joined: 13 Mar 2001 Posts: 759 Location: Michigan
|
Posted: Wed May 24, 2006 5:21 am Post subject: |
|
|
Updated my window spy to show the window style constant names(WS_BORDER|WS_VISIBLE etc.) under the RealTime tab.
| Description: |
|
 Download |
| Filename: |
SnarlingWindowSpy.zip |
| Filesize: |
7.15 KB |
| Downloaded: |
1912 Time(s) |
_________________ -Sheep
My pockets hurt... |
|
| 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
|
|