Mercurial > hg > multiomr
view sikuli/SE.sikuli/SE.html @ 2:46fb79167a61 tip
Main Code
author | Victor Padilla <victor.padilla.mc@gmail.com> |
---|---|
date | Mon, 04 May 2015 22:56:18 +0200 |
parents | |
children |
line wrap: on
line source
<html> <head> <style type="text/css"> .sikuli-code { font-size: 20px; font-family: "Osaka-mono", Monospace; line-height: 1.5em; display:table-cell; white-space: pre-wrap; /* css-3 */ white-space: -moz-pre-wrap !important; /* Mozilla, since 1999 */ white-space: -pre-wrap; /* Opera 4-6 */ white-space: -o-pre-wrap; /* Opera 7 */ word-wrap: break-word; /* Internet Explorer 5.5+ */ width: 99%; /* remove horizontal scroll-bar when viewing in IE7 */ } .sikuli-code img { vertical-align: middle; margin: 2px; border: 1px solid #ccc; padding: 2px; -moz-border-radius: 5px; -webkit-border-radius: 5px; -moz-box-shadow: 1px 1px 1px gray; -webkit-box-shadow: 1px 1px 2px gray; } .kw { color: blue; } .skw { color: rgb(63, 127, 127); } .str { color: rgb(128, 0, 0); } .dig { color: rgb(128, 64, 0); } .cmt { color: rgb(200, 0, 200); } h2 { display: inline; font-weight: normal; } .info { border-bottom: 1px solid #ddd; padding-bottom: 5px; margin-bottom: 20px; display: none; } a { color: #9D2900; } body { font-family: "Trebuchet MS", Arial, Sans-Serif; } </style> </head> <body> <div class="info"> <h2>SE.sikuli\SE.sikuli</h2> <a href="SE.sikuli\SE.zip">(Download this script)</a> </div> <pre class="sikuli-code"> params = sys.argv[<span class="dig">1</span>:] path=params[<span class="dig">0</span>] strIMGs=<span class="str">""</span> <span class="skw">click</span>(<img src="1415716688669.png" />) <span class="skw">wait</span>(<img src="1415716721174.png" />,FOREVER) <span class="skw">click</span>(<img src="1415716758693.png" />) <span class="skw">click</span>(<img src="DropDown.png" />) <span class="skw">wait</span>(<img src="1415716942199.png" />,FOREVER) <span class="skw">click</span>(<img src="1415716964607.png" />) <span class="skw">wait</span>(<img src="1415792167505.png" />,FOREVER) <span class="skw">click</span>(Pattern(<img src="1415963853362.png" />).targetOffset(<span class="dig">45</span>,<span class="dig">15</span>)) <span class="skw">type</span>(Key.BACKSPACE) paste(path) <span class="skw">click</span>(<img src="2014-11-13_13-34-35.png" />) <span class="skw">click</span>(<img src="1415792179506.png" />) <span class="kw">for</span> i <span class="kw">in</span> range(<span class="dig">1</span>,len(params)): strIMGs=strIMGs+<span class="str">" \""</span>+params[i]+<span class="str">"\""</span> strInput=strIMGs strInput=strInput.replace(<span class="str">"/"</span>,<span class="str">"\\"</span>) paste(strInput) <span class="skw">click</span>(<img src="1415792207078.png" />) <span class="skw">rightClick</span>(<img src="1415717208007.png" />) <span class="skw">click</span>(<img src="2014-11-12_11-58-32.png" />) <span class="skw">sleep</span>(<span class="dig">1</span>) <span class="skw">type</span>(Key.BACKSPACE) <span class="skw">click</span>(<img src="1415717913108.png" />) paste(path[:-<span class="dig">1</span>]) <span class="skw">click</span>(<img src="1415717515734.png" />) <span class="skw">wait</span>(<img src="1415718431424.png" />,FOREVER) <span class="skw">click</span>(<img src="1415792424959.png" />) <span class="skw">click</span>(<img src="1415718524045.png" />) <span class="skw">wait</span>(<img src="1415792444947.png" />,FOREVER) <span class="skw">type</span>(Key.BACKSPACE) <span class="skw">click</span>(<img src="1415792490785.png" />) newPath=path.replace(<span class="str">"/"</span>,<span class="str">"\\"</span>) paste(newPath+<span class="str">"AllPages.mro"</span>) <span class="skw">click</span>(<img src="1415792510149.png" />) <span class="kw">if</span> exists(<img src="1417614329432.png" />): <span class="skw">click</span>(<img src="1417614361971.png" />) <span class="skw">click</span>(Pattern(<img src="1415718695577.png" />).exact()) <span class="skw">wait</span>(<img src="1415792536736.png" />,FOREVER) <span class="skw">type</span>(Key.BACKSPACE) <span class="skw">click</span>(<img src="1415792587415.png" />) strOUT=path+<span class="str">"SE.xml"</span> strOUT=strOUT.replace(<span class="str">"/"</span>,<span class="str">"\\"</span>) paste(strOUT) <span class="skw">click</span>(<img src="1415792640839.png" />) <span class="kw">if</span> exists(<img src="1415792786165.png" />): <span class="skw">click</span>(<img src="1415792803049.png" />) <span class="kw">if</span> exists(<img src="1415700984115.png" />): <span class="skw">click</span>(<img src="1415700984115.png" />) <span class="kw">if</span> exists(<img src="cerrar.png" />): <span class="skw">click</span>(<img src="cerrar.png" />) </pre> </body> </html>