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

« back to all changes in this revision

Viewing changes to sikuli-ide/sample-scripts/set-ip-new.sikuli/set-ip.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>set-ip-new.sikuli</h2> <a href="set-ip-new.zip">(Download this script)</a>
 
71
</div>
 
72
<pre class="sikuli-code">
 
73
ip = <span class="skw">input</span>(<span class="str">"please enter the new IP address:"</span>)
 
74
syspref = App.open(<span class="str">"System Preferences.app"</span>)
 
75
<span class="kw">with</span> Region(syspref.window()):
 
76
        <span class="skw">click</span>(<img src="Network.png" />)
 
77
        <span class="skw">click</span>(<img src="1254367484704.png" />)
 
78
        <span class="skw">click</span>(<img src="1256519960853.png" />)
 
79
        <span class="skw">click</span>(<img src="1254367285543.png" /> )
 
80
        <span class="skw">wait</span>(<img src="1256520016190.png" />)
 
81
        <span class="skw">type</span>(ip + <span class="str">"\t"</span>)
 
82
        <span class="skw">type</span>(<span class="str">"255.255.255.0\t"</span>)
 
83
        <span class="skw">type</span>(<span class="str">"192.168.0.254\t"</span>)
 
84
        <span class="skw">click</span>(<img src="1254367352295.png" />)
 
85
</pre>
 
86
</body>
 
87
</html>