~ubuntu-branches/ubuntu/utopic/sikuli/utopic

« back to all changes in this revision

Viewing changes to sikuli-ide/sample-scripts/rob-new.sikuli/rob-new.html

  • Committer: Bazaar Package Importer
  • Author(s): Gilles Filippini
  • Date: 2011-10-04 23:32:13 UTC
  • mfrom: (4.1.2 sid)
  • Revision ID: james.westby@ubuntu.com-20111004233213-36fm78hx0z53tkuw
Tags: 1.0~x~rc3-dfsg1-2
* New patch fix-cmake-sikuli-ide.patch:
  + Fix random FTBFS due to missing inter target dependency

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
 
 
2
<html>
 
3
   <head>
 
4
      <style type="text/css">
 
5
         .sikuli-code {
 
6
            font-size: 20px;
 
7
            font-family: "Osaka-mono", Monospace;
 
8
            line-height: 1.5em;
 
9
            display:table-cell;
 
10
            white-space: pre-wrap;       /* css-3 */
 
11
            white-space: -moz-pre-wrap !important;  /* Mozilla, since 1999 */
 
12
            white-space: -pre-wrap;      /* Opera 4-6 */
 
13
            white-space: -o-pre-wrap;    /* Opera 7 */
 
14
            word-wrap: break-word;       /* Internet Explorer 5.5+ */
 
15
            width: 99%;   /* remove horizontal scroll-bar when viewing in IE7 */
 
16
         }
 
17
         .sikuli-code img {
 
18
            vertical-align: middle;
 
19
            margin: 2px;
 
20
            border: 1px solid #ccc;
 
21
            padding: 2px;
 
22
            -moz-border-radius: 5px;
 
23
            -webkit-border-radius: 5px;
 
24
            -moz-box-shadow: 1px 1px 1px gray;
 
25
            -webkit-box-shadow: 1px 1px 2px gray;
 
26
         }
 
27
         .kw {
 
28
            color: blue;
 
29
         }
 
30
         .skw {
 
31
            color: rgb(63, 127, 127);
 
32
         }
 
33
 
 
34
         .str {
 
35
            color: rgb(128, 0, 0);
 
36
         }
 
37
 
 
38
         .dig {
 
39
            color: rgb(128, 64, 0);
 
40
         }
 
41
 
 
42
         .cmt {
 
43
            color: rgb(200, 0, 200);
 
44
         }
 
45
 
 
46
         h2 {
 
47
            display: inline;
 
48
            font-weight: normal;
 
49
         }  
 
50
         
 
51
         .info {
 
52
            border-bottom: 1px solid #ddd;
 
53
            padding-bottom: 5px;
 
54
            margin-bottom: 20px;
 
55
            display: none;
 
56
         }
 
57
 
 
58
         a {
 
59
            color: #9D2900;
 
60
         }
 
61
 
 
62
         body {
 
63
            font-family: "Trebuchet MS", Arial, Sans-Serif;
 
64
         }
 
65
 
 
66
      </style>
 
67
   </head>
 
68
<body>
 
69
<div class="info">
 
70
<h2>rob-new.sikuli</h2> <a href="rob-new.zip">(Download this script)</a>
 
71
</div>
 
72
<pre class="sikuli-code">
 
73
firefox = App.open(<span class="str">"Firefox"</span>)
 
74
<span class="kw">with</span> Region(firefox.window()):
 
75
        <span class="kw">while</span> <span class="kw">not</span> <span class="skw">find</span>(Pattern(<img src="1254347537847.png" />).similar(<span class="dig">0.93</span>)):
 
76
                <span class="skw">sleep</span>(<span class="dig">1</span>)
 
77
                <span class="skw">click</span>(<img src="1273528585844.png" />)
 
78
 
 
79
        <span class="skw">click</span>(<img src="1273528622709.png" />)
 
80
        <span class="skw">popup</span>(<span class="str">"Rob just said something!"</span>)
 
81
</pre>
 
82
</body>
 
83
</html>