hsautogui-0.3.0: Haskell bindings for PyAutoGUI, a library for automating user interaction
Safe HaskellNone
LanguageHaskell2010

AutoGUI

Synopsis

Documentation

data Key Source #

Instances

Instances details
Eq Key Source # 
Instance details

Defined in AutoGUI.Keys

Methods

(==) :: Key -> Key -> Bool #

(/=) :: Key -> Key -> Bool #

Ord Key Source # 
Instance details

Defined in AutoGUI.Keys

Methods

compare :: Key -> Key -> Ordering #

(<) :: Key -> Key -> Bool #

(<=) :: Key -> Key -> Bool #

(>) :: Key -> Key -> Bool #

(>=) :: Key -> Key -> Bool #

max :: Key -> Key -> Key #

min :: Key -> Key -> Key #

Show Key Source # 
Instance details

Defined in AutoGUI.Keys

Methods

showsPrec :: Int -> Key -> ShowS #

show :: Key -> String #

showList :: [Key] -> ShowS #

ToPy Key Source # 
Instance details

Defined in AutoGUI.Keys

Methods

toPy :: Key -> IO SomeObject #

Lift Key Source # 
Instance details

Defined in AutoGUI.Keys

Methods

lift :: Key -> Q Exp #

liftTyped :: Key -> Q (TExp Key) #

alert :: Text -> IO () Source #

Show a box onscreen until dismissed

click :: MouseButton -> IO () Source #

Click a specified mouse button

confirm :: Text -> IO Bool Source #

Show a box onscreen until a user hits OK or Cancel Return True on OK, False on Cancel, and False if user closes the box

doubleClick :: IO () Source #

Double click the mouse

drag :: Integer -> Integer -> IO () Source #

Clicks and drags the mouse through a motion of (x, y)

dragDuration :: Integer -> Integer -> Double -> IO () Source #

Clicks and drags the mouse through a motion of (x, y), over a number of seconds

dragRel :: Integer -> Integer -> IO () Source #

Clicks and drags the mouse through a motion of (x, y)

dragRelDuration :: Integer -> Integer -> Double -> IO () Source #

Clicks and drags the mouse through a motion of (x, y)

dragTo :: Integer -> Integer -> IO () Source #

Clicks and drags the mouse to the position (x, y)

dragToDuration :: Integer -> Integer -> Double -> IO () Source #

Clicks and drags the mouse to the position (x, y), over a number of seconds

failsafe :: Bool -> IO () Source #

When set to true, move the mouse to the upper-left corner of the screen to throw a Python exception, and quit the program

hotkey :: [Key] -> IO () Source #

Press a key combination

key :: QuasiQuoter Source #

This quasiquoter lets you use [key|enter|] at compile time, so you don't get a Maybe as you would from mkKey

keyDown :: Key -> IO () Source #

Simulate holding a key down

keyUp :: Key -> IO () Source #

Simulate releasing a key

leftClick :: IO () Source #

Left click the mouse

locateCenterOnScreen :: FilePath -> IO (Maybe (Integer, Integer)) Source #

Return (x, y) of center of an image, if the image is found

locateOnScreen :: FilePath -> IO (Maybe (Integer, Integer, Integer, Integer)) Source #

Return (left, top, width, height) of first place the image is found

middleClick :: IO () Source #

Middle click the mouse

mouseDown :: IO () Source #

Press the left mouse button down

mouseUp :: IO () Source #

Release the left mouse button

moveAndClick :: Integer -> Integer -> IO () Source #

Move the mouse to some (x, y) position and click there

moveRel :: Integer -> Integer -> IO () Source #

Move the mouse relative to where it is now

moveRelDuration :: Integer -> Integer -> Double -> IO () Source #

Move the mouse relative to where it is now, over a number of seconds

moveTo :: Integer -> Integer -> IO () Source #

Move the mouse to an (x, y) position

moveToDuration :: Integer -> Integer -> Double -> IO () Source #

Move the mouse to an (x, y) position, over a number of seconds

onScreen :: Integer -> Integer -> IO Bool Source #

Test whether (x, y) is within the screen size

password :: Text -> IO Text Source #

Show a box onscreen, allowing user to enter some screened text Return empty string if user closes the box

pause :: Double -> IO () Source #

Set a number of seconds to wait in between autogui actions

position :: IO (Integer, Integer) Source #

(x, y) position of the mouse

press :: Key -> IO () Source #

Simulate a keypress

prompt :: Text -> IO Text Source #

Show a box onscreen, allowing user to enter some text Return empty string if user closes the box

rightClick :: IO () Source #

Right click the mouse

scroll :: Integer -> IO () Source #

Scroll up (positive) or down (negative)

size :: IO (Integer, Integer) Source #

(screenWidth, screenHeight) of the primary monitor in pixels

sleep :: Double -> IO () Source #

Sleep for a given fractional number of seconds

tripleClick :: IO () Source #

Triple click the mouse

typewrite :: Text -> IO () Source #

Write out some Text as though it were entered with the keyboard, newline is enter

typewriteKeys :: [Key] -> IO () Source #

Write out some Text as though it were entered with the keyboard, newline is enter

write :: Text -> IO () Source #

Write out some Text as though it were entered with the keyboard

writeWithInterval :: Text -> Double -> IO () Source #

Write out some Text as though it were entered with the keyboard, with a specified number of seconds between keypresses