Posts: 726
Threads: 99
Joined: Mar 2018
04-02-2019, 02:38 AM
(This post was last modified: 04-02-2019, 02:51 AM by win.)
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
;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
Posts: 12,092
Threads: 142
Joined: Dec 2002
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.
Posts: 726
Threads: 99
Joined: Mar 2018
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
run "notepad"
run "$desktop$\MultiMonitorTool.exe" "/MoveWindow Next Class ''Notepad'' "
Posts: 12,092
Threads: 142
Joined: Dec 2002
04-02-2019, 10:40 AM
(This post was last modified: 04-02-2019, 10:41 AM by Gintaras.)
Second screen = second display monitor? I thought it is about Windows 10 virtual desktops.
Use function MoveWindowToMonitor.
Posts: 726
Threads: 99
Joined: Mar 2018
04-02-2019, 10:51 AM
(This post was last modified: 04-02-2019, 10:58 AM by win.)
Thank you for your reminder, I got it.
QM is too powerful, omnipotent
Macro
Macro3
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
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.
Posts: 12,092
Threads: 142
Joined: Dec 2002
The easiest is function Curtain. Other function - OnScreenDisplay.
Posts: 726
Threads: 99
Joined: Mar 2018
04-02-2019, 11:18 AM
(This post was last modified: 04-02-2019, 11:23 AM by win.)
Thank you very much, the perfect implementation of the function I want
QM is too powerful, omnipotent
Posts: 726
Threads: 99
Joined: Mar 2018
04-04-2019, 01:13 AM
(This post was last modified: 04-04-2019, 01:13 AM by win.)
Using the curtain function, it will always display,
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
Posts: 12,092
Threads: 142
Joined: Dec 2002
04-04-2019, 02:29 PM
(This post was last modified: 04-04-2019, 02:36 PM by Gintaras.)
Macro
Macro357
int w=Curtain
2
DestroyWindow w
mes 1
Posts: 726
Threads: 99
Joined: Mar 2018
Two lines of code, perfectly solved my problem,
thanks