Manipulate Second Monitor Only

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
tecdragon
Posts: 14
Joined: 31 Aug 2020, 10:22

Manipulate Second Monitor Only

Post by tecdragon » 17 Sep 2021, 08:25

Trying to get the following code to change the wallpaper on only the secondary screen, not the primary screen. I have downloaded multiple commercial apps and they change both, so I am trying to write a script that will change only the secondary monitor while not changing the primary one. This script pulls png's from a folder and then changes the wallpaper on a timed interval. I read through the systemparametersinfo on microsofts website but didn't see what I am looking for, help?

Code: Select all

#persistent

arr := [], cnt := 1, mnts := 1
loop, files, C:\Images\*.png
	arr.push(A_LoopFileFullPath)
SetTimer, Change, % 1000*60*mnts

change:
DllCall("SystemParametersInfo",UInt,0x0014,UInt,0,Str,arr[cnt],UInt,2)
cnt := cnt = arr.count() ? 1 : ++cnt
return
tecdragon
Posts: 14
Joined: 31 Aug 2020, 10:22

Re: Manipulate Second Monitor Only

Post by tecdragon » 20 Sep 2021, 08:48

Guess you can't do this? I even tried trials of 4 or 5 commercial products. No luck.
RussF
Posts: 1229
Joined: 05 Aug 2021, 06:36

Re: Manipulate Second Monitor Only

Post by RussF » 20 Sep 2021, 10:23

As I said the last time you posted this topic, Display Fusion will do that (in the paid version). When you download it, you can evaluate the paid version for free for 30 days before it reverts to the free version so you can see if it meets your needs before shelling out the money (not that expensive).

Just to test, I set my system to your wishes - monitor 1 has static image displayed all the time, monitor 2 has slideshow changing every minute.

You will also find many other benefits to the software as well.

Russ
tecdragon
Posts: 14
Joined: 31 Aug 2020, 10:22

Re: Manipulate Second Monitor Only

Post by tecdragon » 20 Sep 2021, 11:35

I did download and try DisplayFusion they have a fully functional trial version. I could not find anyway to disable the primary monitor, and it switched both screens. Trying to figure out a way to due programmatically.
RussF
Posts: 1229
Joined: 05 Aug 2021, 06:36

Re: Manipulate Second Monitor Only

Post by RussF » 20 Sep 2021, 12:18

In the settings window, select "Desktop Wallpaper"
Screenshot 2021-09-20 130028.png
Screenshot 2021-09-20 130028.png (20.91 KiB) Viewed 803 times
Select "Use a different image for each monitor"
Screenshot 2021-09-20 130244.png
Screenshot 2021-09-20 130244.png (20.28 KiB) Viewed 803 times
Click on Monitor 1
Screenshot 2021-09-20 131206.png
Screenshot 2021-09-20 131206.png (74.32 KiB) Viewed 803 times
Select the static image you want.

Then click on Monitor 2 and check "Slideshow:" and change the source to My images and navigate to the folder containing the images you want. You can also source images from the internet.

Don't forget to "Apply" and "OK"

Russ
tecdragon
Posts: 14
Joined: 31 Aug 2020, 10:22

Re: Manipulate Second Monitor Only

Post by tecdragon » 20 Sep 2021, 14:09

Ok thanks, I will give it a try.
KINGLIFER
Posts: 6
Joined: 26 Jan 2022, 16:15

Re: Manipulate Second Monitor Only

Post by KINGLIFER » 26 Jan 2022, 20:06

RussF wrote:
20 Sep 2021, 12:18
In the settings window, select "Desktop Wallpaper"

Screenshot 2021-09-20 130028.png

Select "Use a different image for each monitor"

Screenshot 2021-09-20 130244.png

Click on Monitor 1

Screenshot 2021-09-20 131206.png

Select the static image you want.

Then click on Monitor 2 and check "Slideshow:" and change the source to My images and navigate to the folder containing the images you want. You can also source images from the internet.

Don't forget to "Apply" and "OK"

Russ
You seem to know a bit about this software (AHK) is there a way to force a window to the secondary monitor? I would like a game to stay on display 1 and my primary (display 2) never shows any games playing.
RussF
Posts: 1229
Joined: 05 Aug 2021, 06:36

Re: Manipulate Second Monitor Only

Post by RussF » 27 Jan 2022, 06:52

@KINGLIFER, the post of mine that you quoted was referring to software called DisplayFusion, not AHK. In DF, you can set a trigger to recognize when a specific window or process starts and automatically move/center/resize, whatever that window. There is a free version of DF which gives full-version capabilities for 30 days, but triggers require a full licensed version. It is not that expensive and offers many features.

I am certain that an AHK script could be written (and probably already has if you search the forum). I'm also certain that I could probably figure it out myself given enough time, which unfortunately, at this moment, I don't have.

Additionally, keep in mind that a well-behaved program/application will follow all the rules of windows. Some games, however, seem to want to rule the roost and take over your system, especially when run in full-screen mode. If you run it in a window, you should be ok.

Russ
Post Reply

Return to “Ask for Help (v1)”