Wiki source code of 04 Script

Last modified by Wecon on 2025/09/03 21:03

Hide last authors
Wecon 1.1 1 {{velocity output="false"}}
2 #set ($docextras = [])
3
4 #set ($videoCards = [{
5 'title': $services.localization.render('1. VB: How to get started VB Script in PIStudio'),
6 'topics': [
7 $services.localization.render('VB Script(Marco) is mainly designed for user to do some simple logical or calculation.')
8 ],
9 'url': 'https://www.youtube.com/embed/wjYNNvB5r0s',
10 'duration': '12 min'
11 },{
12 'title': $services.localization.render('2. Lua: How to Get Started Lua Script in WECON PIStudio'),
13 'topics': [
14 $services.localization.render('Lua is a powerful, efficient, lightweight, embeddable scripting language.')
15 ],
16 'url': 'https://www.youtube.com/embed/LEpvjUzNM-8',
17 'duration': '12 min'
18 },{
19 'title': $services.localization.render('3. Lua: MQTT Client'),
20 'topics': [
21 $services.localization.render('Using the Lua MQTT, the communication device which is connected to HMI can upload the values to MQTT broker(Server end)')
22 ],
23 'url': 'https://www.youtube.com/embed/c6mwvgTGeZc',
24 'duration': '29 min'
25 },{
26 'title': $services.localization.render('4. Lua Tutorial 1st Class: Lua Basic'),
27 'topics': [
28 $services.localization.render('Chapter NO.0 The pre note of programming'),
29 $services.localization.render('Chapter NO.1 Preparation Works'),
30 $services.localization.render('Chapter NO.2 Basic Syntax'),
31 $services.localization.render('Chapter NO.3 Data Type'),
32 $services.localization.render('Chapter NO.4 Variable')
33 ],
34 'url': 'https://www.youtube.com/embed/ez5N5LijrZM',
35 'duration': '39 min'
36 },{
37 'title': $services.localization.render('5. Lua Tutorial 2nd Class: Control Structure'),
38 'topics': [
39 $services.localization.render('Chapter NO.5 Loop'),
40 $services.localization.render('Chapter NO.6 Control Flow'),
41 $services.localization.render('Chapter NO.7 Function')
42 ],
43 'url': 'https://www.youtube.com/embed/CpeRBc7JV4k',
44 'duration': '41 min'
45 },{
46 'title': $services.localization.render('6. Lua Tutorial 3rd Class: Operator & String'),
47 'topics': [
48 $services.localization.render('Chapter NO.8 Operator'),
49 $services.localization.render('Chapter NO.9 String')
50 ],
51 'url': 'https://www.youtube.com/embed/ymlcZASrUH0',
52 'duration': '57 min'
53 },{
54 'title': $services.localization.render('7. Lua Tutorial 4th Class: Table & Iterator'),
55 'topics': [
56 $services.localization.render('Chapter NO.10 Array'),
57 $services.localization.render('Chapter NO.11 Iterator'),
58 $services.localization.render('Chapter NO.12 Table'),
59 $services.localization.render('Chapter NO.13 Module')
60 ],
61 'url': 'https://www.youtube.com/embed/Gikg_dUl8Z8',
62 'duration': '41 min'
63 },{
64 'title': $services.localization.render('8. Lua Tutorial 5th Class: Custom Table Drawing'),
65 'topics': [
66 $services.localization.render('1. Create the customize object and get object ID'),
67 $services.localization.render('2. Initial the table header and cell number'),
68 $services.localization.render('3. Constructure the table content')
69 ],
70 'url': 'https://www.youtube.com/embed/UOjBPHJM_H0',
71 'duration': '32 min'
72 },{
73 'title': $services.localization.render('9. Lua Tutorial 6th Class: Custom Curve Drawing'),
74 'topics': [
75 $services.localization.render('1. Create the customize object and get object ID'),
76 $services.localization.render('2. Set the line type'),
77 $services.localization.render('3. Set the curve background'),
78 $services.localization.render('4. Constructure the curve elements(one dimensional table)')
79 ],
80 'url': 'https://www.youtube.com/embed/FM8PkqrPX9o',
81 'duration': '8 min'
82 },{
83 'title': $services.localization.render('10. Lua Tutorial 7th Class: HTTP & JSON'),
84 'topics': [
85 $services.localization.render('What is HTTP'),
86 $services.localization.render('What is JSON'),
87 $services.localization.render('Take weather api as example to test'),
88 $services.localization.render('How to parse value into display')
89 ],
90 'url': 'https://www.youtube.com/embed/mw8PvuNpsf4',
91 'duration': '35 min'
92 },{
93 'title': $services.localization.render('11. Lua Tutorial 8th Class: FTP Client'),
94 'topics': [
95 $services.localization.render('What is FTP'),
96 $services.localization.render('Build up FTP site on PC'),
97 $services.localization.render('Core code part of FTP Client')
98 ],
99 'url': 'https://www.youtube.com/embed/I-MyCKih6DA',
100 'duration': '9 min'
101 },{
102 'title': $services.localization.render('12. Lua Tutorial 9th Class: CSV File Read&Write'),
103 'topics': [
104 $services.localization.render('What is CSV'),
105 $services.localization.render('How to recognize the seperator'),
106 $services.localization.render('File read write demonstration')
107 ],
108 'url': 'https://www.youtube.com/embed/DTdXkLCRhLg',
109 'duration': '22 min'
110 },{
111 'title': $services.localization.render('13. Lua Tutorial 10th Class: MQTT & OpenCloud'),
112 'topics': [
113 $services.localization.render('What is OpenCloud'),
114 $services.localization.render('Huawei IOTDA Setup'),
115 $services.localization.render('Product Model Data Create'),
116 $services.localization.render('OpenCloud Function Demonstration')
117 ],
118 'url': 'https://www.youtube.com/embed/DTdXkLCRhLg',
119 'duration': '42 min'
120 }])
121
122 #macro (helpVideoCard $data)
123 <div class="videoCard">
124 <iframe src="$data.url" allowfullscreen title="$escapetool.xml($data.title)" role="presentation" ></iframe>
125 <div class="videoCard-body">
126 <div class="videoCard-title">
127 $escapetool.xml($data.title)
128 </div>
129 <ul>
130 #foreach ($topic in $data.topics)
131 <li>$topic</li>
132 #end
133 </ul>
134 </div>
135 <div class="videoCard-footer">
136 $services.icon.renderHTML('play')
137 <a href="$data.url">$services.localization.render('help.videos.watch')</a>
138 <span class="videoCard-duration">
139 $escapetool.xml($data.duration)
140 </span>
141 </div>
142 </div>
143 #end
144 {{/velocity}}
145
146 {{velocity}}
147 {{html clean="false"}}
148 #set ($discard = $xwiki.ssx.use('Help.Videos.WebHome'))
149 <div class="row">
150 #foreach ($card in $videoCards)
151 ## See http://getbootstrap.com/css/#grid-responsive-resets .
152 #if ($foreach.index > 0 && $foreach.index % 2 == 0)
153 <div class="clearfix visible-sm-block "></div>
154 #end
155 #if ($foreach.index > 0 && $foreach.index % 3 == 0)
156 <div class="clearfix visible-md-block visible-lg-block"></div>
157 #end
158 <div class="col-xs-12 col-sm-6 col-md-4">
159 #helpVideoCard($card)
160 </div>
161 #end
162 </div>
163 {{/html}}
164
165 [[$services.localization.render('help.videos.more')>>https://www.youtube.com/playlist?list=PLhe7KI1rstRQeLSHxcTozZ0HJSk-mIYzt]]
166 {{/velocity}}