[Script] Cycle through your virtual desktops with a single button

Post your working scripts, libraries and tools for AHK v1.1 and older
TheKuma
Posts: 1
Joined: 23 Oct 2021, 15:50

[Script] Cycle through your virtual desktops with a single button

Post by TheKuma » 23 Oct 2021, 17:42

Hello everyone,

This is a script I worked on for a while now, and I wanted to share it.

As the title says, this script allows you to cycle through virtual desktops with a single button.
The script can automatically detect on what desktop your on, and go to the next one when the hotkey is pressed.

This is particularly useful for those who like to use 2 virtual desktops (especially for productivity), because you can then switch between them easily (no need to remember multiple shortcuts or what desktop you are on, the script does it for you).

Image

It also works on more than 2 virtual desktops.

The code can be found here, feel free to tweak for yourself / suggest changes.

Important !! For the script to work you have to have opened ALL the virtual desktops manually at least once ! Otherwise it doesn't work.
To counter this, I have made another script that scrolls through the desktops manually.

I personally find this extremely useful, I bound it to an extra key on my keyboard and now just cannot live without it :P .

Best regards, Yosef B.

iseahound
Posts: 1434
Joined: 13 Aug 2016, 21:04
Contact:

Re: [Script] Cycle through your virtual desktops with a single button

Post by iseahound » 23 Oct 2021, 17:57

Did you by any chance get some of your code from here?
https://www.computerhope.com/tips/tip224.htm

User avatar
submeg
Posts: 326
Joined: 14 Apr 2017, 20:39
Contact:

Re: [Script] Cycle through your virtual desktops with a single button

Post by submeg » 24 Oct 2021, 20:49

iseahound wrote:
23 Oct 2021, 17:57
Did you by any chance get some of your code from here?
https://www.computerhope.com/tips/tip224.htm
Which is where the one I use comes from too!
____________________________________
Check out my site, submeg.com
Connect with me on LinkedIn
Courses on AutoHotkey :ugeek:

Post Reply

Return to “Scripts and Functions (v1)”