topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Thursday December 12, 2024, 4:24 am
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Last post Author Topic: DONE: Dim rest of desktop/windows, except for focused window  (Read 152479 times)

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,914
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
that would be nice.
i'd be happy to update the coding snacks page whenever you have a new version ([email protected]),
and i'd be happy to provide you with web/ftp space if you'd like a place to have your various scripts that you would have complete control over.

skrommel

  • Fastest code in the west
  • Developer
  • Joined in 2005
  • ***
  • Posts: 933
    • View Profile
    • 1 Hour Software by skrommel
    • Donate to Member
 :) I've updated the Ghoster-script above to use an ini-file.

Skrommel
« Last Edit: September 13, 2005, 07:11 PM by skrommel »

brotherS

  • Master of Good Ideas
  • Honorary Member
  • Joined in 2005
  • **
  • Posts: 2,261
    • View Profile
    • Donate to Member
Wow, I'm once again surprised what's possible with AutoHotkey!  :up:

Too bad that script slows down my PC a lot, causing CPU usage to jump from ~10% to 50% and more :( P-IV 2.4 GHz with Windows 2000 here, 1 GB RAM

Carol Haynes

  • Waffles for England (patent pending)
  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 8,069
    • View Profile
    • Donate to Member
brotherS that has been my experience too.

Do other people have large CPU usage hikes when using these AHK scripts?

skrommel

  • Fastest code in the west
  • Developer
  • Joined in 2005
  • ***
  • Posts: 933
    • View Profile
    • 1 Hour Software by skrommel
    • Donate to Member
 :) Sorry about the CPU usage, but it can be reduced by changing the Sleep,0 to Sleep,100 or some other value balancing snappy operation and CPU usage. Inserting other pauses into the script will help, too.

AutoHotkey has some overhead compared to compiling languages, but I think the ease of use is worth it!

I've changed the pause to 10 in the one on my home page at www.donationcoder.com/Software/Skrommel. It hovers below 10%.

Skrommel
« Last Edit: September 13, 2005, 07:26 PM by skrommel »

brotherS

  • Master of Good Ideas
  • Honorary Member
  • Joined in 2005
  • **
  • Posts: 2,261
    • View Profile
    • Donate to Member
Hey Skrommel, you are great! :)

CPU load still jumps to 100% when the script is activated, but is very low when it's just running.   :up:

One feature request for version 1.1: could you please add something to the code that would exit the script when the script is started again while it's still running?

And how would I define a hotkey like Ctrl-Shift-o to start and exit the script?

Thanks!

skrommel

  • Fastest code in the west
  • Developer
  • Joined in 2005
  • ***
  • Posts: 933
    • View Profile
    • 1 Hour Software by skrommel
    • Donate to Member
 :) I've just uploaded a new version that quits the one running before starting another.

If by start and exit you mean reload, add the following line to the end of the script, to have it reload when pressing Ctrl-Shift-o:

^+o::Reload

Skrommel

brotherS

  • Master of Good Ideas
  • Honorary Member
  • Joined in 2005
  • **
  • Posts: 2,261
    • View Profile
    • Donate to Member
:) I've just uploaded a new version that quits the one running before starting another.
I'm afraid I was a bit unclear in my last post :( I thought there might be a 'toggle' option, so that I could use *one* start menu entry for starting the script - and stopping it again later.

If by start and exit you mean reload, add the following line to the end of the script, to have it reload when pressing Ctrl-Shift-o:

^+o::Reload
hmm... is it also possible to start your script with that hotkey from inside my own AutoHotkey script that runs here 24/7?

skrommel

  • Fastest code in the west
  • Developer
  • Joined in 2005
  • ***
  • Posts: 933
    • View Profile
    • 1 Hour Software by skrommel
    • Donate to Member
 :) If you've got your own AHK script running, put something like this in there to toggle Ghoster on and off:

^+0::
Process, Exist, Ghoster.exe
pid=%ErrorLevel%
If pid=0
  Run,<fill in the path>Ghoster.exe
Else
  Process,Close,Ghoster.exe
Return

Skrommel

brotherS

  • Master of Good Ideas
  • Honorary Member
  • Joined in 2005
  • **
  • Posts: 2,261
    • View Profile
    • Donate to Member
I got the latest Ghoster.ahk from https://www.donation...m/Software/Skrommel/ and put the lines you suggested in my AHK script (just replaced the .exe entries with .ahk).

The hotkey starts your script as it should, but when I hit it again to stop it a window pops up:
"An older instance of this script is already running. Replace it with this instance?" :(

Another problem I have: your script sometimes conflicts with the "windows get focus and are moved to foreground by moving the mouse cursor over them (no need to click them" feature of Windows that I use: after using your script the (not dimmed) window I used it with will then always stay in the foreground, even if other windows get focus by moving the cursor on them. I have to close and open the window to fix it, minimizing does no thelp... :o

Could you fix that too please?

skrommel

  • Fastest code in the west
  • Developer
  • Joined in 2005
  • ***
  • Posts: 933
    • View Profile
    • 1 Hour Software by skrommel
    • Donate to Member
 :) I've uploaded a single run version of Ghoster.

The other problem I need more info on. What's the name of the tool you use?

Skrommel

brotherS

  • Master of Good Ideas
  • Honorary Member
  • Joined in 2005
  • **
  • Posts: 2,261
    • View Profile
    • Donate to Member
:) I've uploaded a single run version of Ghoster.
You should use AHK to always easily paste the URL of where you upload stuff in your posts, so that newbies can faster find it :)

The other problem I need more info on. What's the name of the tool you use?
It's not really a tool, but a not-that-well-known feature. With tools like TuneUp Utilities or X-Setup Pro you can set it. This is how to do it in X-Setup Pro:
  • start X-Setup Pro and click "Classic"
  • go to Hardware > Mouse > X-Mouse
  • enable "Activate window when mouse passes it"
  • enable "Bring active window to foreground if X-Mouse activates it"
  • Apply Changes
  • maybe you need to restart

skrommel

  • Fastest code in the west
  • Developer
  • Joined in 2005
  • ***
  • Posts: 933
    • View Profile
    • 1 Hour Software by skrommel
    • Donate to Member
 :huh: Works fine here with me. But you could try my autoraiser instead! Just remember to disable X-Setup Pro's autoraiser.

MouseActivate Automatically activates a window or a control when the mouse hovers over it.

Features:
- Edit the ini-file to change the settings.
- Activate a window or control.
- Move the mouse to the upper left corner of the screen to show or hide the desktop.
- Move the mouse to the left or top edge of the screen to send the active window to the back.
- Enable and disable by doubleclicking the tray icon.

You'll find the downloads and more info at Skrommel Software.

Skrommel
« Last Edit: September 16, 2005, 08:37 PM by skrommel »

zridling

  • Friend of the Site
  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 3,299
    • View Profile
    • Donate to Member
That is THE coolest page of apps I have ever seen. Thanks skrommel.

skrommel

  • Fastest code in the west
  • Developer
  • Joined in 2005
  • ***
  • Posts: 933
    • View Profile
    • 1 Hour Software by skrommel
    • Donate to Member
 :) It's all of you who are to be thanked! It's the ideas that make the difference. The slogan for DonationCoders should be "All dressed up and no place to code?"

Skrommel

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,914
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
don't forget to make a donation to your favorite skrommel! just click the dollar sign next to his name or follow the paypal link on skrommel's page.

brotherS

  • Master of Good Ideas
  • Honorary Member
  • Joined in 2005
  • **
  • Posts: 2,261
    • View Profile
    • Donate to Member
:) If you've got your own AHK script running, put something like this in there to toggle Ghoster on and off:

^+0::
Process, Exist, Ghoster.exe
pid=%ErrorLevel%
If pid=0
  Run,<fill in the path>Ghoster.exe
Else
  Process,Close,Ghoster.exe
Return

Skrommel
The hotkey starts your script as it should, but when I hit it again to stop it a window pops up:
"An older instance of this script is already running. Replace it with this instance?"

Could you fix that please? :)

I was not able to try your other suggestion yet since I did not restart my OS yet.

skrommel

  • Fastest code in the west
  • Developer
  • Joined in 2005
  • ***
  • Posts: 933
    • View Profile
    • 1 Hour Software by skrommel
    • Donate to Member
 :) Just uploaded Ghoster v1.1!

Nothing major, just cleaned up the code, removed some flickering and removed the WINDOW from the Alt-Tab chain.

Please let me know if I broke something else!

Skrommel
« Last Edit: October 08, 2005, 05:09 PM by skrommel »

lanux128

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 6,277
    • View Profile
    • Donate to Member
hi there,

just a mention about Ghoster's sister app - Zorro...

Description:
Zorro is a utility to completely blank the screen except for a rectangular area selected by the user.
This is especially useful for watching videos on your computer without being distracted by other programs.

Freeware. For Windows 95, 98, Me, NT, 2000, XP, and 2003 Server.


best regards,
lanux

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,914
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
neat!!

kproth

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 34
    • View Profile
    • Donate to Member
Re: DONE: Dim rest of desktop/windows, except for focused window
« Reply #70 on: June 12, 2006, 03:10 PM »
Neat idea, but I'm seeing a couple issues with it:

1. I have a multi-monitor setup where the primary monitor is in landscape mode (1280x1024) while the secondary is in portrait mode (1024x1280). Even with the multi-monitor support turned on, it doesn't seem to dim anything on monitor #2.

2. If I change to showontop=1 (to always show the always-on-top windows), my task bar goes dim when the app first starts, and doesn't undim until the first time I click on it.


tempdonationcoder

  • Participant
  • Joined in 2007
  • *
  • default avatar
  • Posts: 3
    • View Profile
    • Donate to Member
Re: DONE: Dim rest of desktop/windows, except for focused window
« Reply #71 on: April 30, 2007, 02:06 PM »
Hi
Let me first thank for a great app and your great work.

I was wondering of how you would go about with changing the application icon.

- I tried replacing the icon with reshacker but this did not work
- Also tried an autohotkey script which is capable of replacing icons but with no success.

Any ideas?
« Last Edit: April 30, 2007, 02:09 PM by tempdonationcoder »

skrommel

  • Fastest code in the west
  • Developer
  • Joined in 2005
  • ***
  • Posts: 933
    • View Profile
    • 1 Hour Software by skrommel
    • Donate to Member
Re: DONE: Dim rest of desktop/windows, except for focused window
« Reply #72 on: April 30, 2007, 06:25 PM »
 :) You have to ResHack AutoHotkeySC.bin.

Skrommel

lanux128

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 6,277
    • View Profile
    • Donate to Member
Re: DONE: Dim rest of desktop/windows, except for focused window
« Reply #73 on: May 02, 2007, 11:31 PM »
you can also use this program - AHK-Icon-Changer, more info here..

This script helps to change the icons of compiled and uncompiled (!) scripts.
It also allows to set the fileinformations (Copyright, Version, Description, ...) for a compiled script (has to be compiled with AHK Icon Changer)... To take full advantage you have simply to create a folder named "Settings" in the Scripts folder.
-website

AHKIconChanger.jpg

vermeulen

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 2
    • View Profile
    • Donate to Member
Re: DONE: Dim rest of desktop/windows, except for focused window
« Reply #74 on: March 19, 2008, 09:21 AM »
I'm having trouble getting this to work properly with 2 monitors. The main is 1400x1050 (Dell D610 with Intel integrated video), and the secondary monitor is 1280x1024.  The main monitor works great, but nothing dims on the other one. Windows that are partially in both windows dim on the main monitor. TransOther works great on both monitors. My INI setting look like this:
[Settings]
backcolor=000000
image=
x=
y=
width=
height=
stretchwidth=1
stretchheight=1
keepaspect=1
transparency=175
jump=1
showdesktop=0
showontop=0
multimon=1

Even working like this, this is a great app. Thanks!
« Last Edit: March 19, 2008, 12:02 PM by vermeulen »