How can we use the horizontal and vertical scroll in script?

Asked by babu

Suppose i want to scroll up or down , swipe left or right in emulator/simulator . How can we get these operations in sikuli script
and i am still struck up with using keyboard down button..

click("DOWN",KEY_CTRL)....Is it right ? If not just tell me the right way to proceed..

Thanks in advance

Question information

Language:
English Edit question
Status:
Solved
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Solved by:
Roman Podolyan
Solved:
Last query:
Last reply:
Revision history for this message
Best Roman Podolyan (podolyan-roman) said :
#1

Please read the documentation on low-level keyboard and mouse commands.

http://sikuli.org/docx/region.html#low-level-mouse-and-keyboard-actions

If there is not enough information and/or clarity on key commands, search other forum topics, using request like CTRL -
https://answers.launchpad.net/sikuli/+questions?field.search_text=ctrl&field.sort=RELEVANCY&field.sort-empty-marker=1&field.actions.search=Search&field.language=en&field.language=ru&field.language-empty-marker=1&field.status=OPEN&field.status=NEEDSINFO&field.status=ANSWERED&field.status=SOLVED&field.status-empty-marker=1

I coded srolls and swipes, writing functions in Python for that.

Here is two examples of that routines, "drag up" and flick/swipe up:
http://pastebin.com/qqdcMRde

I never made them perfect, they are quick and dirty, there are many hardcoded things, but they worked for me and the general idea should be clear.

Revision history for this message
babu (babu-arumugam) said :
#2

Thanks Roman Podolyan, that solved my question.