Dialog Designer wandering off the screen
Moderators: Dorian (MJT support), JRL
- Grovkillen
- Automation Wizard
- Posts: 1128
- Joined: Fri Aug 10, 2012 2:38 pm
- Location: Bräcke, Sweden
- Contact:
Dialog Designer wandering off the screen
I get the problem of the dialog designer sometimes not showing up... It seems like it's open way off the screen. As a note of information; I do have multiple screens in my office but once out and about I only have my small laptop screen. Would it make sense to have the Dialog Designer as a separate window on the taskbar? It's now hidden and I cannot use the good-ol "CTRL + right click, "move" option + arrow key, move mouse" to get the window to follow the mouse cursor.
- Grovkillen
- Automation Wizard
- Posts: 1128
- Joined: Fri Aug 10, 2012 2:38 pm
- Location: Bräcke, Sweden
- Contact:
Re: Dialog Designer wandering off the screen
Meta-solution:
Problem solved but request is still valid.
Code: Select all
MoveWindow>Dialog Designer,0,0
- Dorian (MJT support)
- Automation Wizard
- Posts: 1378
- Joined: Sun Nov 03, 2002 3:19 am
- Contact:
Re: Dialog Designer wandering off the screen
Just thinking aloud... Does restarting Macro Scheduler solve this?
Could it be storing the coordinates from when you have multiple monitors, then trying to place it somewhere that no longer exists?
Although I am imagining your laptop has probably been switched off while it was moving from place to place so my theory may be invalid.
Could it be storing the coordinates from when you have multiple monitors, then trying to place it somewhere that no longer exists?
Although I am imagining your laptop has probably been switched off while it was moving from place to place so my theory may be invalid.
Yes, we have a Custom Scripting Service. Message me or go here
- Grovkillen
- Automation Wizard
- Posts: 1128
- Joined: Fri Aug 10, 2012 2:38 pm
- Location: Bräcke, Sweden
- Contact:
Re: Dialog Designer wandering off the screen
Yeah I tried that. Also killing the process... to no avail.
- Marcus Tettmar
- Site Admin
- Posts: 7393
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
Re: Dialog Designer wandering off the screen
Do you have pin to designer set? and could your script be positioning the window (or is it being moved off the screen when running the script)? If so then when you later open the designer it is probably just moving to the same place as set by the script or moved to ...
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
- Grovkillen
- Automation Wizard
- Posts: 1128
- Joined: Fri Aug 10, 2012 2:38 pm
- Location: Bräcke, Sweden
- Contact:
Re: Dialog Designer wandering off the screen
Not pinned and not moved by any script.
- Grovkillen
- Automation Wizard
- Posts: 1128
- Joined: Fri Aug 10, 2012 2:38 pm
- Location: Bräcke, Sweden
- Contact:
Re: Dialog Designer wandering off the screen
Since this happens all the time I have created myself a script that I run after I have opened up a project:
Using a Stream Deck from Elgato it's just a click away.
Only problem now is that the commands/variable list to the left is sometimes 1000+ pixels wide. I have yet to find how to set that width using a script.
I also have this little snippet:
Code: Select all
Let>OFFSET_VALUE=70
Let>OFFSET_COUNT=0
Let>START_x=-2800
Let>START_y=-1000
Let>WINDOW_width=1500
Let>WINDOW_height=1000
GetWindowList>OPEN_WINDOWS
Separate>OPEN_WINDOWS,%CRLF%,WINDOW_ARRAY
If>WINDOW_ARRAY_count>0
Let>k=0
Repeat>k
Let>k=k+1
Let>TEMP_window_title=WINDOW_ARRAY_%k%
UpperCase>TEMP_window_title,TEMP_window_title_raw
Position>EDITOR -,TEMP_window_title_raw,1,TEMP_editor_window,False
Let>OK_TO_RESIZE=False
If>TEMP_editor_window>0
Let>OK_TO_RESIZE=True
StringReplace>TEMP_window_title_raw,EDITOR -,,TEMP_window_title_raw
Trim>TEMP_window_title_raw,TEMP_window_title_raw
ExtractFileExt>TEMP_window_title_raw,TEMP_ext
If>TEMP_ext=.SCP
Let>OK_TO_RESIZE=True
Endif>
Endif>
If>OK_TO_RESIZE=True
GetWindowSize>TEMP_window_title,TEMP_width,TEMP_height
ResizeWindow>TEMP_window_title,%WINDOW_width%,%WINDOW_height%
SetFocus>TEMP_window_title
Let>TEMP_x={%START_x%+%OFFSET_COUNT%*%OFFSET_VALUE%}
Let>TEMP_y={%START_y%+%OFFSET_COUNT%*%OFFSET_VALUE%}
MoveWindow>TEMP_window_title,TEMP_x,TEMP_y
MoveWindow>Dialog Designer,TEMP_x,TEMP_y
Add>OFFSET_COUNT,1
Endif>
Until>k=WINDOW_ARRAY_count
Endif>
Only problem now is that the commands/variable list to the left is sometimes 1000+ pixels wide. I have yet to find how to set that width using a script.
I also have this little snippet:
Code: Select all
Separate>MSCHED_VER,.,VERSION_ARRAY
Let>REGISTRY_VALUE="C:\Program Files (x86)\Macro Scheduler %VERSION_ARRAY_1%\msched.exe" "-EDITOR" "%1"
RegistryReadKey>HKEY_CLASSES_ROOT,msched\shell\open\command,,CURRENT_KEY_VALUE
IfNot>CURRENT_KEY_VALUE=REGISTRY_VALUE
//RegistryWriteKey>HKEY_CLASSES_ROOT,msched\shell\open\command,,REGISTRY_VALUE
Let>REGISTRY_TEXT=Windows Registry Editor Version 5.00%CRLF%%CRLF%[HKEY_CLASSES_ROOT\msched\shell\open\command]%CRLF%@="\"C:\\Program Files (x86)\\Macro Scheduler %VERSION_ARRAY_1%\\msched.exe\" \"-EDITOR\" \"%1\""
IfFileExists>%SCRIPT_DIR%\openInEditor.reg
DeleteFile>%SCRIPT_DIR%\openInEditor.reg
Endif>
WriteLn>%SCRIPT_DIR%\openInEditor.reg,,REGISTRY_TEXT
ExecuteFile>%SCRIPT_DIR%\openInEditor.reg
Endif>
Last edited by Grovkillen on Tue Apr 20, 2021 6:13 pm, edited 2 times in total.
- Grovkillen
- Automation Wizard
- Posts: 1128
- Joined: Fri Aug 10, 2012 2:38 pm
- Location: Bräcke, Sweden
- Contact:
Re: Dialog Designer wandering off the screen
Ah... I have now fixed my issue to 100%
Here's the fix which also resize the internal window for the "Code Builder":
Here's the fix which also resize the internal window for the "Code Builder":
Code: Select all
Let>OFFSET_VALUE=70
Let>OFFSET_COUNT=0
Let>START_x=100
Let>START_y=20
Let>CODE_BUILDER_WIDTH=400
Let>WINDOW_width=1500
Let>WINDOW_height=1000
GetWindowList>OPEN_WINDOWS
Separate>OPEN_WINDOWS,%CRLF%,WINDOW_ARRAY
If>WINDOW_ARRAY_count>0
Let>k=0
Repeat>k
Let>k=k+1
Let>TEMP_window_title=WINDOW_ARRAY_%k%
UpperCase>TEMP_window_title,TEMP_window_title_raw
Position>EDITOR -,TEMP_window_title_raw,1,TEMP_editor_window,False
Let>OK_TO_RESIZE=False
If>TEMP_editor_window>0
Let>OK_TO_RESIZE=True
StringReplace>TEMP_window_title_raw,EDITOR -,,TEMP_window_title_raw
Trim>TEMP_window_title_raw,TEMP_window_title_raw
ExtractFileExt>TEMP_window_title_raw,TEMP_ext
If>TEMP_ext=.SCP
Let>OK_TO_RESIZE=True
Endif>
Endif>
If>OK_TO_RESIZE=True
GetWindowHandle>TEMP_window_title,TEMP_window_handle
IfNot>TEMP_window_handle=0
GetWindowSize>TEMP_window_title,TEMP_width,TEMP_height
ResizeWindow>TEMP_window_title,%WINDOW_width%,%WINDOW_height%
SetFocus>TEMP_window_title
Let>TEMP_x={%START_x%+%OFFSET_COUNT%*%OFFSET_VALUE%}
Let>TEMP_y={%START_y%+%OFFSET_COUNT%*%OFFSET_VALUE%}
MoveWindow>TEMP_window_title,TEMP_x,TEMP_y
MoveWindow>Dialog Designer,TEMP_x,TEMP_y
Add>OFFSET_COUNT,1
Let>WIN_USEHANDLE=1
GetWindowChildList>TEMP_window_handle,TEMP_window_child_handle
Let>WIN_USEHANDLE=0
Separate>TEMP_window_child_handle,%CRLF%,TEMP_child_handle_array
If>TEMP_child_handle_array_count>0
Let>c=0
Repeat>c
Let>c=c+1
Let>TEMP_child_window_handle=TEMP_child_handle_array_%c%
Let>WIN_USEHANDLE=1
UIAccessibleList>TEMP_child_window_handle,TEMP_ui_elements
Separate>TEMP_ui_elements,%CRLF%,TEMP_check_array
Position>{"Code Builders"},TEMP_check_array_1,1,TEMP_check_if_correct,False
If>TEMP_check_if_correct>0
GetWindowParent>TEMP_child_window_handle,1,TEMP_parent_handle
ResizeWindow>TEMP_parent_handle,CODE_BUILDER_WIDTH,WINDOW_height
Let>c=TEMP_child_handle_array_count
Endif>
Let>WIN_USEHANDLE=0
Until>c=TEMP_child_handle_array_count
Endif>
Endif>
Endif>
Until>k=WINDOW_ARRAY_count
Endif>