How to push up/down the GUI window in sikuli?

Asked by koventhan

I have one GUI window (For example - Nodepad)

Want to move up/down and move left side or move right side...

Like how will do manually (click the top of the GUI window , Hold it and move wherever you want)

please help me for this

Question information

Language:
English Edit question
Status:
Solved
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Solved by:
RaiMan
Solved:
Last query:
Last reply:
Revision history for this message
RaiMan (raimund-hocke) said :
#1

based on the docs:

- App class can give you the region of the app's window
- you have to evaluate a position in the title area
- mouseMove(to that point)
- mouseDown()
- mouseMove(to target point)
- mouseUp()

Revision history for this message
koventhan (kingsaa2000) said :
#2

I am using below script for moving my Notepad to some location, but its not working as i expected

Please let me know what is wrong in it?

openApp("Notepad")
mouseDown(Button.LEFT)
mouseMove(Env.getMouseLocation().offset(100, 1000))
mouseUp()

Revision history for this message
Best RaiMan (raimund-hocke) said :
#3

How to get the notepad window as region look:
http://doc.sikuli.org/globals.html#controlling-applications-and-their-windows

if you have the region

mouseMove(Location(reg.x + 100, reg.y + 10))
# should move the mouse into the titlebar
mouseDown(Button.LEFT)
mouseMove(Env.getMouseLocation().offset(100, 1000))
mouseUp()

Revision history for this message
koventhan (kingsaa2000) said :
#4

Thanks RaiMan, that solved my question.