It is currently November 28th, 2021, 5:47 am

Can you choose the position of a EXE window launched with rainmeter?

Help with creating, editing & fixing problems with skins
User avatar
MultiPotent
Posts: 6
Joined: August 30th, 2021, 10:13 pm

Can you choose the position of a EXE window launched with rainmeter?

Post by MultiPotent »

I have a custom application that launches in the center of the screen when u click the exe file.

I am now using rainmeter to launch this exe file like so:

Code: Select all

OnRefreshAction=["#CURRENTPATH#myapp.exe"]
I was wondering if rain meter can choose the XY position on the screen where to launch this application?

Also is it possible for rain meter to choose the window size of the application? I can edit the app to have a fixed size or have dynamic size. But i cant control its position. And since i am using rain meter i am wondering if it can do this for me?

Thanks!
User avatar
SilverAzide
Rainmeter Sage
Posts: 1666
Joined: March 23rd, 2015, 5:26 pm

Re: Can you choose the position of a EXE window launched with rainmeter?

Post by SilverAzide »

MultiPotent wrote: August 30th, 2021, 10:23 pm I have a custom application that launches in the center of the screen when u click the exe file.

I am now using rainmeter to launch this exe file like so:

Code: Select all

OnRefreshAction=["#CURRENTPATH#myapp.exe"]
I was wondering if rain meter can choose the XY position on the screen where to launch this application?

Also is it possible for rain meter to choose the window size of the application? I can edit the app to have a fixed size or have dynamic size. But i cant control its position. And since i am using rain meter i am wondering if it can do this for me?

Thanks!
Is this external application one you wrote? Why can't you control the position? It would be MUCH easier for you to control its placement in that app, not via Rainmeter. With that said, you probably could do it with Rainmeter if you wanted it badly enough or had no other option.

The WindowMessage plugin can be used to send messages to any window (a Windows window). You can move the window however you like, but you need to know the window name and the exact commands to do it (Spy++ can help, plus the MS docs for the SendMessage API). You can size it or do pretty much anything you want, as long as it receives normal Windows messages. Don't forget, the window would need to exist before you started sending messages to it, so you'd need to launch the app, wait for it to appear, then move it around. IMO, this is an awful approach if the executable is one you have control over, but it's your call.
Gadgets Wiki GitHub More Gadgets...
User avatar
Judian81
Posts: 118
Joined: May 6th, 2021, 2:57 pm

Re: Can you choose the position of a EXE window launched with rainmeter?

Post by Judian81 »

maybe this program can help you out.

http://www.southbaypc.com/autosizer/


AutoSizer01.png
You do not have the required permissions to view the files attached to this post.
windows 10
User avatar
MultiPotent
Posts: 6
Joined: August 30th, 2021, 10:13 pm

Re: Can you choose the position of a EXE window launched with rainmeter?

Post by MultiPotent »

SilverAzide wrote: August 31st, 2021, 12:25 am Is this external application one you wrote? Why can't you control the position? It would be MUCH easier for you to control its placement in that app, not via Rainmeter. With that said, you probably could do it with Rainmeter if you wanted it badly enough or had no other option.

The WindowMessage plugin can be used to send messages to any window (a Windows window). You can move the window however you like, but you need to know the window name and the exact commands to do it (Spy++ can help, plus the MS docs for the SendMessage API). You can size it or do pretty much anything you want, as long as it receives normal Windows messages. Don't forget, the window would need to exist before you started sending messages to it, so you'd need to launch the app, wait for it to appear, then move it around. IMO, this is an awful approach if the executable is one you have control over, but it's your call.
Thanks for the replies guys. Im solving a problem for myself which i found on the forum also of being able to code custom web applications using rain meter to facilate many of those "options". I was able to position my app based on the coords provided in rainmeter so ill release that all soon. I just wanted to be sure i wasnt over looking any settings or features since im a rainmeter noob.

Cheers!
Last edited by MultiPotent on August 31st, 2021, 6:28 pm, edited 1 time in total.
User avatar
CodeCode
Posts: 792
Joined: September 7th, 2020, 2:24 pm
Location: QLD, Australia

Re: Can you choose the position of a EXE window launched with rainmeter?

Post by CodeCode »

MultiPotent wrote: August 31st, 2021, 6:25 pm Thanks for the replies guys. Im solving a problem for myself which i found on the forum also of being able to code custom web applications using rain meter to facilate many of those "options". I was able to position my app based on the coords provided in rainmeter so ill release that all soon. I just wanted to be sure i wasnt over looking any settings or features since im a rainmeter noob.

Cheers!
Please do share, when you're ready!

I'd love to be able to do this as well.
ƈǟռ'ȶ ʄɨӼ ɨȶ ɨʄ ɨȶ ǟɨռ'ȶ ɮʀօӄɛ - ʊռʟɛֆֆ ɨȶ ɨֆ ɨռ ƈօɖɛ.