Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to send the window to the second screen
#1
Hello everyone

I have encountered two problems. I hope someone can provide some suggestions. Thanks in advance.

 1. When I open Notepad and enter some characters, I don't want people to see it, so I want to display a blue color block on the screen before starting Notepad.

 2. When I finished entering characters, I want to send the window to that second screen

Macro Macro3
Code:
Copy      Help
;1.code: Display a green color block on the screen, covering the entire desktop, without the taskbar
;
run "notepad.exe"
wait 5 WA "Notepad"
0.5
key "This is simple text, typed using the keyboard." Y

;2.code: Clear green block

;3.code: send the window to the second screen
#2
Windows does not have API to move a window of another process to another virtual desktop. Try to find an app that can do it.
#3
Thank you for your reminder, I have already got it.

use this soft
http://www.nirsoft.net/utils/multi_monitor_tool.html

Can only use class, can't use process, I don't know why

code:

Macro Macro3
Code:
Copy      Help
run "notepad"
run "$desktop$\MultiMonitorTool.exe" "/MoveWindow Next Class ''Notepad'' "
#4
Second screen = second display monitor? I thought it is about Windows 10 virtual desktops.
Use function MoveWindowToMonitor.
#5
Thank you for your reminder, I got it.

QM is too powerful, omnipotent  Wink


Macro Macro3
Code:
Copy      Help
int w
run "$system$\notepad.exe" "" "" "" 0xA00 win("" "Notepad") w
_monitor=2
MoveWindowToMonitor(w _monitor)

Regarding the first question, I saw it in the RPA software  winautomation. It is called a security screen. Is there a way to implement it in QM?  This feature, many people need  Smile

1. When I open Notepad and enter some characters, I don't want people to see it, so I want to display a blue color block on the screen before starting Notepad.
#6
The easiest is function Curtain. Other function - OnScreenDisplay.
#7
Thank you very much, the perfect implementation of the function I want

QM is too powerful, omnipotent  Heart
#8
Using the curtain function, it will always display,  Sad I need to display it when the notepad is input, other places are not displayed, I did not find the switch, is there a way to achieve this function? Can you create a code sample? thanks
#9
Macro Macro357
Code:
Copy      Help
int w=Curtain
2
DestroyWindow w
mes 1
#10
Two lines of code, perfectly solved my problem, Smile    thanks Heart


Forum Jump:


Users browsing this thread: 1 Guest(s)