diff sikuli/CP.sikuli/CP.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 diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sikuli/CP.sikuli/CP.html	Mon May 04 22:56:18 2015 +0200
@@ -0,0 +1,112 @@
+
+<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>CP.sikuli\CP.sikuli</h2> <a href="CP.sikuli\CP.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="1415710175004.png" />)
+<span class="skw">wait</span>(<img src="1415710207538.png" />,FOREVER)
+<span class="skw">click</span>(<img src="1415710242258.png" />)
+<span class="skw">wait</span>(<img src="1415710292754.png" />,FOREVER)
+<span class="skw">type</span>(Key.BACKSPACE)
+
+<span class="skw">click</span>(<img src="1415791421283.png" />)
+strPath=path.replace(<span class="str">"/"</span>,<span class="str">"\\"</span>)
+paste(strPath[:-<span class="dig">1</span>])
+<span class="skw">click</span>(<img src="1415791723329.png" />)
+<span class="skw">sleep</span>(<span class="dig">1</span>)
+<span class="skw">type</span>(Key.BACKSPACE)
+<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="1415791723329.png" />)
+<span class="skw">click</span>(<img src="1415710897800.png" />)
+<span class="skw">wait</span>(Pattern(<img src="1415711761225.png" />).similar(<span class="dig">0.90</span>),FOREVER)
+<span class="skw">click</span>(<img src="1415711065949.png" />)
+<span class="skw">wait</span>(<img src="1415711940063.png" />,FOREVER)
+<span class="skw">wait</span>(<span class="dig">1</span>)
+<span class="skw">type</span>(Key.BACKSPACE)
+<span class="skw">click</span>(<img src="1415791774505.png" />)
+strOUT=path+<span class="str">"CP.xml"</span>
+strOUT=strOUT.replace(<span class="str">"/"</span>,<span class="str">"\\"</span>)
+paste(strOUT)
+<span class="skw">click</span>(<img src="1415791801451.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>