StrokesPlus.net
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
berlihingen  
#1 Posted : Monday, July 17, 2023 11:09:54 AM(UTC)
berlihingen

Rank: Advanced Member

Reputation:

Groups: Approved
Joined: 11/10/2020(UTC)
Posts: 30

Was thanked: 1 time(s) in 1 post(s)
Struggling to get a simple(?) script to extend the current foreground window to the right by 300px. Not feeling ashamed, coz all known LLModels also failed the task, but I would like help. Thanks.
Rob  
#2 Posted : Monday, July 17, 2023 1:51:09 PM(UTC)
Rob

Rank: Administration

Reputation:

Groups: Translators, Members, Administrators
Joined: 1/11/2018(UTC)
Posts: 1,360
United States
Location: Tampa, FL

Thanks: 28 times
Was thanked: 420 time(s) in 357 post(s)
Code:
var windowRect = sp.ForegroundWindow().Rectangle;
windowRect.Width += 300;
sp.ForegroundWindow().Rectangle = windowRect;


In the Script Help window of S+, click SystemWindow to see all of the directly accessible properties of an application window, where Rectangle is listed.

Here is the Microsoft documentation on the Rectangle struct:
https://learn.microsoft.com/en-us/dotnet/api/system.drawing.rectangle?view=netframework-4.8

Edited by user Monday, July 17, 2023 1:53:58 PM(UTC)  | Reason: Not specified

berlihingen  
#3 Posted : Monday, July 17, 2023 1:59:13 PM(UTC)
berlihingen

Rank: Advanced Member

Reputation:

Groups: Approved
Joined: 11/10/2020(UTC)
Posts: 30

Was thanked: 1 time(s) in 1 post(s)
Thanks! Nothing like from bards or bings, although they insisted they knew how to code for S+
randomConstant  
#4 Posted : Sunday, July 30, 2023 6:10:05 PM(UTC)
randomConstant

Rank: Advanced Member

Reputation:

Groups: Translators, Approved
Joined: 7/17/2021(UTC)
Posts: 135

Thanks: 35 times
Was thanked: 18 time(s) in 15 post(s)
Originally Posted by: berlihingen Go to Quoted Post
Thanks! Nothing like from bards or bings, although they insisted they knew how to code for S+

Laugh

Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.