桌面自動化
預覽滑鼠、鍵盤與已開啟視窗的操控
6 個類別,共 116 個節點
- 所屬發行版
- 元編程(教育版)元編程(專業版)
- 支援等級
- 第 2 級(擬定)
- 所屬包
- 桌面自動化
桌面自動化
控制滑鼠和鍵盤,與已開啟的視窗互動,並處理檔案和正在執行的程序。使用這些工具在其他桌面應用程式中自動執行任務。
巨集自動化
啟用視窗Brings the window whose title contains this text, ignoring case, to the front and gives it the keyboard - how a macro switches to another program before sending it keys.點選滑鼠Presses and releases a mouse button where the pointer already is.在指定位置點選滑鼠Moves the pointer somewhere and clicks there.關閉視窗Asks a window to close, as its title bar button does.指揮程序的視窗Applies one command to every window of a named process.按兩下滑鼠Presses and releases a button twice where the pointer already is.拖動Presses a button at one point, glides to another, and releases.沿路徑拖動Presses a button at the first point, glides through every remaining point in order, and releases at the last.沿多條路徑拖動Draws a whole pen path: one drag per pen-down..pen-up mark, in order, with the pen lifted between them.查詢視窗The first window whose title contains this text, or DesktopWindow.None.按程序查詢視窗Every window whose owning process has this name, ignoring case and an .exe suffix.按標題查詢視窗Every window whose title contains this text, ignoring case.聚焦程序Brings a named process's first window to the front.聚焦視窗Brings a window to the front and gives it the keyboard.能否讀取按鍵狀態Whether this machine can be asked what the keyboard is doing, as opposed to only told.是否支援False where nothing here can emulate input on this machine; every call is then a no-op.平臺名稱A short name for a status line: "Windows", "X11", "Quartz", "none".支援情況How far the backend in force is to be trusted.取得游標位置Where the pointer is now.取得指定位置的顯示器Which monitor a coordinate is on, or the primary one where it is on none of them.取得顯示器Every monitor, with its place on the virtual desktop and its scale.取得前臺視窗The window with focus, or DesktopWindow.None where nothing has it.取得自身程序名稱This process's own name, so a macro can recognise - and avoid acting on - the windows of the program running it.取得有視窗的程序The distinct names of every process that owns a window, for a caller offering a list to choose from.取得虛擬桌面邊界The rectangle every coordinate in this class lives in: the union of every monitor.取得視窗邊界Where the first window of a named process is, as four numbers, and whether it was found at all.取得視窗Every top-level window that is on screen and has a title, front-most first where the platform has an order.取得游標下的視窗The front-most window whose bounds contain the pointer, or DesktopWindow.None.按鍵是否按下Whether a key is physically down right now, whoever has focus.最大化前臺視窗Maximises the window that currently has focus.最大化程序視窗Maximises every window of a named process.最大化視窗Fills the window's monitor with it.最小化前臺視窗Iconifies the window that currently has focus.最小化程序視窗Iconifies every window of a named process.最小化視窗Iconifies a window.移動游標Moves the pointer by a delta from wherever it is.平滑移動游標Moves the pointer to an absolute coordinate over time, accelerating and decelerating.按鍵Presses and releases a key, optionally holding modifiers while it is pressed.按組合鍵Presses a chord given as keys: every key but the last is held, the last is pressed, and the held ones are released in reverse.還原程序視窗Brings back every minimised window of a named process, each as it was before it was minimised, and leaves its other windows as they are.還原視窗Puts a minimised or maximised window back to its previous size.滾動到位置Scrolls vertically.水平滾動Scrolls horizontally.傳送文字Types text into whatever has focus, as characters rather than key positions.設定游標位置Puts the pointer at an absolute virtual-desktop coordinate, immediately.設定按鍵狀態Holds a key down, or lets it up, without the other half.設定滑鼠狀態Presses or releases a mouse button without releasing it again.嘗試啟用按顯示器 DPI 感知Asks Windows to treat this process as per-monitor DPI aware, so the coordinates here are real pixels.嘗試按下指定名稱的鍵Presses a key named as text, including a chord written as one string: "Enter", "esc", "ctrl+c".嘗試按下指定名稱的多個鍵Presses a chord named as separate strings, as ["ctrl", "shift", "n"].等待Waits, in milliseconds.等待,除非按下某鍵Waits, unless a key goes down first - in which case it stops waiting there and says so.
螢幕矩形
螢幕矩形A rectangle on the virtual desktop.包含Half-open containment: the right and bottom edges are outside.分解相等下邊One past the bottommost pixel.中心The pixel in the middle, which is where a window command aims a click.設定高度是否為空True where this rectangle encloses no pixels at all.右邊One past the rightmost pixel.設定寬度設定 X設定 Y取得雜湊碼設定高度設定寬度設定 X設定 Y轉為文字Reads as a rectangle rather than as a record's field list.並集The smallest rectangle holding both.空矩形Nothing: what a backend that cannot answer the question reports.相等運算不等運算
桌面視窗
桌面視窗A window somewhere on the desktop, and which process owns it.分解相等邊界Where it sits, in virtual-desktop coordinates.顯示狀態Minimised, maximised or ordinary.是否存在False for DesktopWindow.None.控制代碼The platform's identifier: an HWND on Windows, an X11 window id, a CGWindowID.程序 IDThe owning process, or 0 where unknown.程序名稱The owning process's name without extension, or empty where unknown.標題The window's title bar text.取得雜湊碼轉為文字Reads as a window rather than as a record's field list, for a log line or a status bar.無視窗No window: what "nothing is in front" and "nothing matched" both report.相等運算不等運算
顯示器資訊
顯示器資訊One monitor: where it sits on the virtual desktop, and at what scale.分解相等邊界The whole monitor, in virtual-desktop pixels.每英寸點數The monitor's effective DPI, 96 meaning unscaled.是否為主顯示器The one whose top-left corner is the origin.名稱The platform's name for the device, for a caller that wants to show a list.縮放比例96 DPI is 1.0; a monitor at 150% reports 1.5.工作區域What is left after the taskbar or dock.取得雜湊碼轉為文字相等運算不等運算