DonationCoder.com Forum

DonationCoder.com Software => Coding Snacks => Post New Requests Here => Topic started by: garbanzo on August 31, 2008, 01:21 AM

Title: IDEA: the most basic screen ruler imaginable
Post by: garbanzo on August 31, 2008, 01:21 AM

screen rulers - there are 101 of them, and i think i've tried them all. most look like rulers and are absolutely impractical. this is what i would like to see instead:

a tiny window that normally shows the x,y coordinates of the cursor. hitting a hotkey sets the current cursor position as Point A. hitting it a second time sets the position as Point B. the window then displays the distance between A and B in pixels. maybe a line could be drawn on the screen as a visual guide, and holding Shift could constrain mouse movement to 45 degree increments to ensure accuracy.

actually it doesn't even have to have a window - it could just be a text overlay that you could drag around the screen and stick wherever you want. that would be nice :)

just something fast and basic to use along with your favorite zoom utility for getting quick measurements while building skins and GUIs.

thanks!
Title: Re: IDEA: the most basic screen ruler imaginable
Post by: lanux128 on August 31, 2008, 03:10 AM
a DC member, Renegade had coded something like this before (https://www.donationcoder.com/forum/index.php?topic=5490.0). maybe you can take a look. :)

(http://renegademinds.com/Portals/0/Ruler-Drag-Point.png)

• Renegade's Floating Ruler (https://www.donationcoder.com/forum/index.php?topic=5490.0)
Title: Re: IDEA: the most basic screen ruler imaginable
Post by: lanux128 on August 31, 2008, 03:38 AM
incidentally, freewaregenius did a write-up today about a program called Window Ruler (http://www.hexagora.com/en_dw_winruler.asp).

[ You are not allowed to view attachments ]
• http://www.freewaregenius.com/2008/08/29/window-ruler-easily-measure-any-on-screen-object/
Title: Re: IDEA: the most basic screen ruler imaginable
Post by: PhilB66 on August 31, 2008, 04:42 AM
@garbanzo

You could achieve that with a FastStone Capture (and probably with other similar tools) but if you insist on a seperate ruler tool... check out Meazure (http://www.cthing.com/Meazure.asp).

A utility for measuring, magnifying and capturing arbitrary portions of the screen.

[ You are not allowed to view attachments ]

To download go to http://shareware.pcmag.com/product.php%5Bid%5D75607%5BSiteID%5Dpcmag (a Simtel alternative)
Title: Re: IDEA: the most basic screen ruler imaginable
Post by: garbanzo on August 31, 2008, 11:32 AM
thanks for the suggestions. i have actually tried all of these. i have tried dozens of these apps. but none work well for me, which is why i posted here.

Renegade's wouldn't even run. Window Ruler measures in two axes only. not very useful at all. and this last one, well it's big and it uses an installer so it doesn't seem like the small and portable app i am trying to find...

so my request stands, such as it is :)
Title: Re: IDEA: the most basic screen ruler imaginable
Post by: app103 on August 31, 2008, 01:17 PM
Renegade's ruler requires the .NET framework installed. Make sure you have that first, if you plan on running .NET applications.

Personally, I happen to like his quite a bit and I wish he would finish it. :-*
Title: Re: IDEA: the most basic screen ruler imaginable
Post by: lanux128 on August 31, 2008, 04:37 PM
Renegade's ruler requires the .NET framework installed. Make sure you have that first, if you plan on running .NET applications.

.NET runtimes can downloaded from here (http://www.microsoft.com/net/Download.aspx).
Title: Re: IDEA: the most basic screen ruler imaginable
Post by: garbanzo on August 31, 2008, 11:43 PM
thanks for the tip, but i have .NET installed. i got the big pack - 2.0, 3.0 and 3.5 - and still get an error saying .NET isn't installed. one would assume 3.5 would be recursive and contain all previous versions, but it appears that isn't the case?

anyway maybe i have to go get 1.0 as well. i chopped up my XP with nlite and i must have removed the basic version...

EDIT

i installed .NET 1.0 SP3 redist, and i still get an error, so i had to get .NET 1.1

how many of these idiotic things are there?

anyway i got it working in the end. and it seems to be about the same as the rest. it lets me measure rectangles. horizontal and vertical. nothing more.

i just want to draw a line on the screen and see how long it is. that would be most useful. surely there is something out there?

Title: Re: IDEA: the most basic screen ruler imaginable
Post by: skrommel on September 03, 2008, 03:12 AM
 :) Try SmallMeasure!

It's a simple screen ruler. Just move the two "corners" to measure the distance.
When the mousebutton is down, you can use the arrow keys for fine grain movement.

Skrommel


;SmallMeasure.ahk
; A simple screen ruler
; Move the corners to measure the distance
; When the mousebutton is down, use the arrow keys for fine grain moving
;Skrommel @ 2008

#SingleInstance,Force
SetWindelay,0
CoordMode,ToolTip,Screen

size=15

Gui,1:+LastFound +Border -Caption +ToolWindow +AlwaysOnTop
gui1:=WinExist()
Gui,1:Color,0000FF
Gui,1:Margin,0,0
Gui,1:Font,S100
Gui,1:Add,Text,GMOVE Vvfrom,% Chr(255)
Gui,1:Show,W%size% H%size%
WinSet,Region,0-0 %size%-0 0-%size%,ahk_id %gui1%

Gui,2:+LastFound +Border -Caption +ToolWindow +AlwaysOnTop
gui2:=WinExist()
Gui,2:Color,FF0000
Gui,2:Margin,0,0
Gui,2:Font,S100
Gui,2:Add,Text,GMOVE Vvto,% Chr(255)
Gui,2:Show,W%size% H%size%
WinSet,Region,%size%-0 %size%-%size% 0-%size% ,ahk_id %gui2%
Return


~LButton::
MouseGetPos,mx,my,mwin,mctrl
If mwin In %gui1%,%gui2%
{
  moving=1
  SetTimer,MEASURE,100
  Gosub,MEASURE
}
Return

~LButton Up::
If moving=1
{
  moving=0
  SetTimer,MEASURE,Off
  ToolTip
}

~*Right::
If moving=1
  MouseMove,1,0,0,R
Return

~*Left::
If moving=1
  MouseMove,-1,0,0,R
Return

~*Up::
If moving=1
  MouseMove,0,-1,0,R
Return

~*Down::
If moving=1
  MouseMove,0,1,0,R
Return

MOVE:
 PostMessage,0xA1,2,,,A
Return

MEASURE:
  MouseGetPos,mx,my,mwin,mctrl
  WinGetPos,wx2,wy2,,,ahk_id %gui2%
  WinGetPos,wx1,wy1,,,ahk_id %gui1%
  ToolTip,% "(" wx1 "," wy1 ") - (" wx2 "," wy2 ") = (" wx2+size-wx1 "," wy2+size-wy1 ") and " Round(Sqrt((wx2+size-wx1)**2+(wy2+size-wy1)**2)) " pixels long"
Return
Title: Re: IDEA: the most basic screen ruler imaginable
Post by: lanux128 on September 03, 2008, 05:01 AM
Try SmallMeasure!

It's a simple screen ruler. Just move the two "corners" to measure the distance.

if one waits patient enough, Skrommel will appear bearing coding snacks. :)
Title: Re: IDEA: the most basic screen ruler imaginable
Post by: app103 on September 04, 2008, 03:36 AM
if one waits patient enough, Skrommel will appear bearing coding snacks. :)

[ You are not allowed to view attachments ]
Title: Re: IDEA: the most basic screen ruler imaginable
Post by: Grorgy on September 04, 2008, 03:54 AM
 ;D
Title: Re: IDEA: the most basic screen ruler imaginable
Post by: VideoInPicture on September 04, 2008, 07:41 AM
thanks for the tip, but i have .NET installed. i got the big pack - 2.0, 3.0 and 3.5 - and still get an error saying .NET isn't installed. one would assume 3.5 would be recursive and contain all previous versions, but it appears that isn't the case?

anyway maybe i have to go get 1.0 as well. i chopped up my XP with nlite and i must have removed the basic version...

EDIT

i installed .NET 1.0 SP3 redist, and i still get an error, so i had to get .NET 1.1

how many of these idiotic things are there?
......

The .Net versions 1.0 and 1.1 are now legacy versions and not widely used anymore. I actually haven't seen many programs use .Net 1.0/1.1 since .Net 2.0 and above are so dominant. Anyways, if the source code is available, we could always recompile the program to use .Net 2.0.
Title: Re: IDEA: the most basic screen ruler imaginable
Post by: lanux128 on September 04, 2008, 07:49 PM
if one waits patient enough, Skrommel will appear bearing coding snacks. :)
(see attachment in previous post (https://www.donationcoder.com/forum/index.php?topic=14647.msg127759#msg127759))

a big H for hilarious! ;D
Title: Re: IDEA: the most basic screen ruler imaginable
Post by: app103 on September 08, 2008, 10:41 AM
Partial credit goes to Josh for making the original Clippy/Skrommel comparison (http://omgplzstfukthx.blogspot.com/2008/08/those-bastards-stole-all-of-mousers.html), about a month ago in the DC IRC channel.