Example scripts and tips (replaces Old Scripts & Tips archive)
Moderators: Dorian (MJT support), JRL, Phil Pendlebury
-
Grovkillen
- Automation Wizard
- Posts: 1131
- Joined: Fri Aug 10, 2012 2:38 pm
- Location: Bräcke, Sweden
-
Contact:
Post
by Grovkillen » Sun Apr 18, 2021 7:42 am
If you want to be sure you're focusing on the specific window you can use this little trick. The Wait>1 is added because Windows needs a bit of a head start to update the window title internally.
Code: Select all
ChromeExecute>SessionID,document.title = "%SessionID%%RND_SEED%";
ChromeGetInfo>SessionID,title,CURRENT_TITLE
Wait>1
SetFocus>CURRENT_TITLE
ResizeWindow>CURRENT_TITLE,200,200
I'm mostly using the --app= switch and thus not needing to care about the "Google Chrome" text in the window title. You may need to add the
SetFocus>%CURRENT_TITLE%* (star).
Last edited by
Grovkillen on Mon Sep 27, 2021 5:52 am, edited 2 times in total.
-
Dorian (MJT support)
- Automation Wizard
- Posts: 1389
- Joined: Sun Nov 03, 2002 3:19 am
-
Contact:
Post
by Dorian (MJT support) » Mon Apr 19, 2021 7:46 am
I look forward to trying this. Thank you for sharing.
Yes, we have a
Custom Scripting Service. Message me or go
here