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?

User Image
GB223
5 discussion posts
Hi all,
I'm currently using the "Launch an Application and Move it to a Specific Location" script. I would like to add 2 more options to that script:

1) This should be simple I imagine: For some of the apps that launch with the script I would like to have them launched and then minimized. What command line should I add to do that?

2) This is probably more compilacated but I imagine it's still doable: For some programs that launch I would like to set up an option that auto clicks a certain button on the app interface so for example lets say I have Spotify as one of the apps to launch in my script so I would like to add a command that after it launches it waits 5 seconds to fully load and then I would like to have the play button auto-clicked. Is this something that can be done?
18 days ago  • #1
Owen Muhlethaler (BFS)'s profile on WallpaperFusion.com
Hello,

1. This line will do that for you:

Code

BFS.Window.Minimize(windowHandle);


2. If it's opening to the exact same location every time, you can use this line to move the mouse to the specific coordinates of the play button:

Code

BFS.Input.SetMousePosition(100, 100);


and then this line to send a left click:

Code

BFS.Input.LeftClickMouse();


Hope that helps!
17 days ago  • #2
User Image
GB223
5 discussion posts
Thanks, I'll try it out
17 days ago  • #3
User Image
GB223
5 discussion posts
and also, how can I add a 5 second delay before it clicks the leftbutton on the desired location to make sure the app is fully loaded?
17 days ago  • #4
Owen Muhlethaler (BFS)'s profile on WallpaperFusion.com
This line will do that for you, the timer is in milliseconds:

Code

BFS.General.ThreadWait(5000);
16 days ago (modified 16 days ago)  • #5
User Image
GB223
5 discussion posts
Thanks!
16 days ago  • #6
User Image
GB223
5 discussion posts
So I got the postion mouse and left click to work but for some reason I can't get the minimized function to work.
I'm guessing it's beacuse of the windowhandle. How can I find out what is the windowhandle of a certaion application?
Thanks for your patience :P
13 days ago  • #7
Owen Muhlethaler (BFS)'s profile on WallpaperFusion.com
The windowHandle variable will be whatever window is currently focused, which should be the window you've just launched. Try adding a 1 or 2 second delay before the minimize line, maybe it's trying to run too quick
13 days ago  • #8
Subscribe to this discussion topic using RSS
Was this helpful?  Login to Vote(1)  Login to Vote(-)