Keyboard Shortcut or Hotkey To Switch To Next Windows 7 Desktop Wallpaper

In case of windows 7, if you want to switch to the next desktop wallpaper in the current applied windows 7 themes, you will need to right click on the empty area of the desktop and select Next desktop background [ as shown in the image below ]


What if you can you use a keyboard shortcut to switch to next desktop background wallpaper, yes it is possible via AutoHotKey script executable we have created for you. You just need to press Win+n keys to change the desktop background instantly with the new one.

Source Code Of This Hotkey Script below, We got it from here

#n::                             ; use the Windows+n hotkey
WinActivate, ahk_class Progman   ; activate the Desktop
MouseGetPos, xpos, ypos          ; get current mouse position
Click 0,0                        ; click in the corner of the desktop, to unselect any selected icon
Send +{F10}                      ; send Shift+F10, the shortcut for right-click
Send n                           ; send "n", the key for "next desktop background"
Click %xpos%, %ypos%, 0          ; put the mouse back at its previous position
return                           ; done!

We have compiled the above script into a executable, so you just need to run the executable of the script in any version of windows and press Win+n to switch to next desktop background in windows 7

Download Windows 7 Wallpaper Switcher Executable |Script


  1. Ralph says

    Hello, this does not work if you put the taskbar on the left side of the screen (that’s how I work) because the ‘Start’button is positioned there then. How can I execute the script? I’ve put it in a txt file and changed the extension to .vbs then to .bat but without luck.

  2. Scott says


    This ROCKS. Thank you for only bringing it to all of our attention, but more importantly for compiling the executable for all of us!

    Now the $25,000 question…

    I presume your Autohotkey script is obviously limited to the API command calls available in Win7, but is there a letter you can replace “n” with in the script (perhaps “p” for “previous”) that loads the *previous* wallpaper?

    Thanks in advance on this issue and for all the work you do here! SOOOOO helpful for all of us…

  3. WORMSS says

    his script can’t do that, all his is doing is moving the mouse to the top corner, faking the right mouse key, selecting the correct menu and then moving the mouse back to the original position..

    since there is no previous key on the rightclick of the wallpaper his script cannot do it.

  4. MMJ431 says

    write the following code in notepad and then Save the file as “Next_Desktop.vbs” or something like that. Now when you double click the file it will simulate the keystrokes to go to the next desktop background.
    set WshShell = WScript.CreateObject(“WScript.Shell”)
    WshShell.SendKeys(“^ “)

  5. says

    Thank you for the script.

    I just wanted to add that you don’t need to get the mouse position and then click. It’s actually better without these lines in place, otherwise we see a brief blinking of the right click menu happening, which kinda makes all this futile.

    I download AutoHotkey and edited the above script to remove the mouse-related actions. Here’s the revised script:

    #n:: ; use the Windows+n hotkey
    WinActivate, ahk_class Progman ; activate the Desktop
    Send +{F10} ; send Shift+F10, the shortcut for right-click
    Send n ; send “n”, the key for “next desktop background”
    return ; done!

    This works great for me in Windows 7.

  6. Kanishk says

    I downloaded the executable. How to edit the script?
    I plan to replace (0,0) with the position of top-right corner because I keep taskbar on left side. Is that possible? What is position of topright corner? my screen resolution is 1366X768. Is the position (1366,0) ?
    P.S. i’m a newb.

Leave a Reply

Your email address will not be published. Required fields are marked *