Processing Ajax...

Title

Message

Confirm

Confirm

Confirm

Confirm

Are you sure you want to delete this item?

Confirm

Are you sure you want to delete this item?

Confirm

Are you sure?

User Image
SG-1 Charpy
10 discussion posts
Hi,
I try to create a trigger to automatically switch 6 instance of the same software on my second screen and place them in a defined order. As shown in the attached screenshot.
I managed to place the first window but how to identify the others?
https://www.dropbox.com/s/iizk4hicsyudanh/CCS64.JPG?dl=0

This would help me for my project !
• Attachment [protected]: CCS64.JPG [121,429 bytes]
Jan 31, 2017 (modified Jan 31, 2017)  • #1
Keith Lammers (BFS)'s profile on WallpaperFusion.com
Does each one of those windows run in its own process?
Jan 31, 2017  • #2
User Image
SG-1 Charpy
10 discussion posts
Yes, see the screenshots, sorry it's in french because i'm ---------------> french ;)
• Attachment: CCS64-2.JPG [34,751 bytes]
CCS64-2.JPG
CCS64-2.JPG
• Attachment: CCS64-3.JPG [62,481 bytes]
CCS64-3.JPG
CCS64-3.JPG
Jan 31, 2017 (modified Jan 31, 2017)  • #3
Keith Lammers (BFS)'s profile on WallpaperFusion.com
Ok, thanks! It wouldn't be possible to distinguish these windows via Triggers, but you could create a Scripted Function to launch each instance and move it to a specific size and location. I've attached a sample for 2 instances. To add more instances to the script, just copy the second one and modify the x, y, width, and height values in the BFS.Window.SetLocation line.

Hope that helps!
• Attachment: ScriptedFunction.txt [750 bytes]
Jan 31, 2017  • #4
User Image
SG-1 Charpy
10 discussion posts
Thanks a lot !!! After some unsuccessful test (starting loop of application)
It's working now !!!
The final script posted in next message :D
• Attachment: Essai 1.JPG [118,979 bytes]
Essai 1.JPG
Essai 1.JPG
• Attachment: option.GIF [91,703 bytes]
option.GIF
option.GIF
Feb 1, 2017  • #5
User Image
SG-1 Charpy
10 discussion posts
Now here the script :
Thanks a lot Mr Keith Lammers for your help !!!
• Attachment: DisplayFusion Multiple Instance.txt [1,783 bytes]
Feb 1, 2017  • #6
Keith Lammers (BFS)'s profile on WallpaperFusion.com
Awesome, glad to hear you were able to get it sorted!
Feb 2, 2017  • #7
User Image
SG-1 Charpy
10 discussion posts
:|Sorry to dig up this post. I haven't used this script for a while. But now when I use it I only one instance of the software is running. My DisplayFusion Pro and windows 10 is updated with the last version.
• Attachment: Capture.PNG [904,928 bytes]
Capture.PNG
Capture.PNG
Jan 5, 2021  • #8
Keith Lammers (BFS)'s profile on WallpaperFusion.com
Could you export the script from your DF settings and attach it so that I can have a quick look at it?
Jan 9, 2021  • #9
User Image
Greg Cantrell13682
2 discussion posts
Hello, I'm trying to do this same thing. The script is working quite well, but the two instances do not move to the location they should. both open directly in the center of the screen.

I've included the script I'm using below. Any guidance?
• Attachment [protected]: DisplayFusion Multiple Instance test.txt [1,169 bytes]
Aug 31, 2021  • #10
Keith Lammers (BFS)'s profile on WallpaperFusion.com
@Greg: It's maybe that the app isn't returning an appID. Can you try changing this:
windowHandle = BFS.Application.GetMainWindowByAppID(appID);


to this:

Code

BFS.General.ThreadWait(5000);
windowHandle = BFS.Window.GetFocusedWindow();
Aug 31, 2021  • #11
User Image
Greg Cantrell13682
2 discussion posts
Yes, this fixed it! Well mostly. I had to add a few more pauses of 2000 in between launches to give it time to load. Once I did that plus your method everything worked perfectly. Thank you!
Aug 31, 2021  • #12
Keith Lammers (BFS)'s profile on WallpaperFusion.com
No worries, glad to hear it!
Sep 1, 2021  • #13
Subscribe to this discussion topic using RSS
Was this helpful?  Login to Vote(-)  Login to Vote(-)