Window Spy (My Edit on the already made script)

Post your working scripts, libraries and tools
User avatar
Delta Pythagorean
Posts: 416
Joined: 13 Feb 2017, 13:44
GitHub: DelPyth
Location: Equestria

Window Spy (My Edit on the already made script)

01 Mar 2018, 11:01

Window Spy

Following the 1.1.27.00 update of AHK, there was a script released with the installation of AHK, said file is called WindowSpy.ahk.
This script is already quite useful being taken from the compiled version of AU3 Spy, but I've decided to take the liberty to add on to it and even change a few minor things around.
I shall of course be adding new features into the future as for I am lazy and really like working with AHK :dance:

DISCLAIMER


First; Here's my code:
CODE
It's pretty huge, I know. But here's some changes that I put into it:

  • Hovered color box. Shows the current color in a box on the GUI
  • Added a "change update speed" to the script to allow slower computer users to adjust their own speeds.
  • Added a transparency dialog to make the background of the window easier to see through (Minimum is 100 for known effects).
  • Added "push info to notepad". If notepad is installed in the system (Which it should be), it will open notepad and "paste" in the data currently inside the window. You may close it freely for it does not need to be saved.
  • Upon closing the script, there is a "Log.txt" file on the desktop to view your last "save progress" from opening your info in notepad.

TODO


CHANGELOG


IMAGES
User avatar
divanebaba
Posts: 735
Joined: 20 Dec 2016, 03:53
Location: Diaspora

Re: Window Spy (My Edit on the already made script)

02 Mar 2018, 00:26

Hello Delta Pythagorean

I've just tested your addendum and the feature for exporting into notepad is a very good idea.
Unfortunately the title of Microsoft notepad changes from locale to locale, so that the title you coded, is not matching on every locale.
In Germany, the title is not Untitled - Notepad, it is Unbenannt - Editor
So when you subtract the title and leave only ahk_class and process name, it works fine.
I presume that it must work without title on every locale.
So make your modifications international, and don't use windows title, like below:

Code: [Select all] [Download] GeSHi © Codebox Plus

...
WinWaitActive, ahk_class Notepad ahk_exe notepad.exe
ControlSetText, Edit1, % Clipboard, ahk_class Notepad ahk_exe notepad.exe
WinSetTitle, ahk_class Notepad ahk_exe notepad.exe
,, Log.txt - Editor
...

[Starklichtbirne IQ >> 250!!] Dank deutscher Lehrerempfehlung, nur Süperdepp und Hartz4-Bezieher, statt Abitürient und Einkommensbezieher.
[Strong light bulb IQ >> 250!!] Thanks to german teacher's recommendation, willful and welfare recipient, instead of high school graduate and moneymaker.

Entering high school for foreign children is not prohibited in GERMANY, it's only made nearly impossible by government.
Virtually the only way - visiting high school abroad.

ADVERTISING: Patent pending strip accumulator - advanced technology - priceless inexpensive, space-saving, energy efficient - Patent priority for sale.
User avatar
jmeneses
Posts: 448
Joined: 28 Oct 2014, 11:09
Location: Catalan Republic

Re: Window Spy (My Edit on the already made script)

02 Mar 2018, 03:28

Hi Delta Pythagorean
Good job :thumbup: , thank you for sharing
Donec Perficiam
User avatar
Delta Pythagorean
Posts: 416
Joined: 13 Feb 2017, 13:44
GitHub: DelPyth
Location: Equestria

Re: Window Spy (My Edit on the already made script)

02 Mar 2018, 10:47

divanebaba wrote:Hello Delta Pythagorean

I've just tested your addendum and the feature for exporting into notepad is a very good idea.
Unfortunately the title of Microsoft notepad changes from locale to locale, so that the title you coded, is not matching on every locale.
In Germany, the title is not Untitled - Notepad, it is Unbenannt - Editor
So when you subtract the title and leave only ahk_class and process name, it works fine.
I presume that it must work without title on every locale.
So make your modifications international, and don't use windows title, like below:

Code: [Select all] [Download] GeSHi © Codebox Plus

...
WinWaitActive, ahk_class Notepad ahk_exe notepad.exe
ControlSetText, Edit1, % Clipboard, ahk_class Notepad ahk_exe notepad.exe
WinSetTitle, ahk_class Notepad ahk_exe notepad.exe
,, Log.txt - Editor
...

Thanks for the suggestion, I'll do my best to get it working!
Thanks for the feedback as well!
Helgef
Posts: 3163
Joined: 17 Jul 2016, 01:02
Contact:

Re: Window Spy (My Edit on the already made script)

09 Mar 2018, 02:02

Looks good, I like the colorbox :thumbup:.

Thanks for sharing, cheers.
User avatar
BGM
Posts: 419
Joined: 20 Nov 2013, 20:56
GitHub: bgmCoder
Contact:

Re: Window Spy (My Edit on the already made script)

09 Mar 2018, 10:54

When you hold ctrl to suspend, the Mouse Position still continues to update.
I have found that if, while keeping control held, you move the mouse to Window Spy's UI and activate it, you can have Mouse Position frozen, too, and it will stay frozen until you activate some other window. (this is with "Follow Mouse" unchecked).

However, I think it would be better if Mouse Position would also freeze.

But, I have "Follow Mouse" unchecked, and Mouse Position seems to continue to follow the mouse once I've activated some other window. The other information does not update, but mouse position continues to if I have clicked to activate some other window.

I don't know if that is by design, however.

By the way, in the directions at the bottom of the UI, the parenthesis is missing at the end. It starts with one, but doesn't end with one.
User avatar
Delta Pythagorean
Posts: 416
Joined: 13 Feb 2017, 13:44
GitHub: DelPyth
Location: Equestria

Re: Window Spy (My Edit on the already made script)

09 Mar 2018, 21:07

BGM wrote:When you hold ctrl to suspend, the Mouse Position still continues to update.
I have found that if, while keeping control held, you move the mouse to Window Spy's UI and activate it, you can have Mouse Position frozen, too, and it will stay frozen until you activate some other window. (this is with "Follow Mouse" unchecked).

However, I think it would be better if Mouse Position would also freeze.

But, I have "Follow Mouse" unchecked, and Mouse Position seems to continue to follow the mouse once I've activated some other window. The other information does not update, but mouse position continues to if I have clicked to activate some other window.

I don't know if that is by design, however.

By the way, in the directions at the bottom of the UI, the parenthesis is missing at the end. It starts with one, but doesn't end with one.

Ah, I'll see what's wrong with it.
Pierrre

Re: Window Spy (My Edit on the already made script)

09 Apr 2018, 19:33

Hello, i'm new to ahk and
I try this but i have lot of error because i don't have some function : Format, strReplace,etc..
Where can i find them because i dont't want waste my time to rebuild them, thanks
:wtf:
User avatar
jeeswg
Posts: 4971
Joined: 19 Dec 2016, 01:58
Location: UK

Re: Window Spy (My Edit on the already made script)

09 Apr 2018, 23:04

You might want to update your version of AutoHotkey.

Changes & New Features
https://autohotkey.com/docs/AHKL_ChangeLog.htm
1.1.17.00 - December 27, 2014: Format
1.1.21.00 - March 28, 2015: StrReplace
Pierrre

Re: Window Spy (My Edit on the already made script)

10 Apr 2018, 21:19

Yes!! it work, very nice job and thank you for help :)
Asmodeus
Posts: 46
Joined: 19 Oct 2015, 15:53

Re: Window Spy (My Edit on the already made script)

24 Aug 2018, 06:26

nice script, please consider adding: save window position and start the GUI next time from there.
Pause script via Pause::Pause,Toggle (more intuitive imo). cheers
Thoughtfu1Tux
Posts: 1
Joined: 31 May 2018, 23:26

Re: Window Spy (My Edit on the already made script)

05 Sep 2018, 04:02

Asmodeus wrote:nice script, please consider adding: save window position and start the GUI next time from there.
Pause script via Pause::Pause,Toggle (more intuitive imo). cheers


This is something you can do yourself by just editing the code. This is a personal preference of yours and I don't think everyone needs to have this feature added to theirs as well.

Just open up the code and do a "Ctl + F" and find the keyboard shortcut for "Pause".
aaffe
Posts: 144
Joined: 16 Jan 2014, 04:23

Re: Window Spy (My Edit on the already made script)

11 Sep 2018, 23:37

Perhaps this script should be added in the ahk Installation?

Return to “Scripts and Functions”

Who is online

Users browsing this forum: No registered users and 23 guests