- Home
- Deutsch
- Skripten / Logik
- Blockly
- Bastle meine Einkaufsliste. =) Kommentare? :)
Bastle meine Einkaufsliste. =) Kommentare? :)
-
Ich bastel mir gerade eine Einkaufsliste...
Ziel soll es sein, dass ich am Ende eine Liste habe, die nach Geschäften sortiert ist.
Stehe noch ganz am Anfang, aber es funktioniert schon etwas.
Sage der normalen "Alexa Einkaufslist":
- setze Produkt auf meine Einkaufliste
oder - setze Ort Produkt auf meine Einkaufsliste
Dann wird einsortiert.
Vielleicht kann der Ansatz ja jemandem als Inspiration dienen oder vielleicht hat auch jemand Kommentare, wie man (ich) es besser machen könnte.
<xml xmlns="http://www.w3.org/1999/xhtml"> <variables> <variable type="" id="K.UvtC*?_TX1ho;sL^L@">Liste</variable> <variable type="" id="s/1M:P9ju5UoIn(R*Cqk">Produkt</variable> <variable type="" id="f!8~+vt7Kuw9$r@wJ@st">Einkaufsort</variable> <variable type="undefined" id="timeout">timeout</variable> <variable type="" id="aR8gF*3BgIkNJTFhJ{aZ">i</variable> </variables> <block type="on_ext" id="qs;k=85TeWPGVix[zL#u" x="-837" y="38"> <mutation items="1"></mutation> <field name="CONDITION">ne</field> <field name="ACK_CONDITION"></field> <value name="OID0"> <shadow type="field_oid" id="O#yX[^tOpOc*,9M0k+uU"> <field name="oid">default</field> </shadow> <block type="regex" id="edZk=w${#(!?[K!Xk{vG"> <field name="TEXT">alexa2.0.Lists.SHOPPING_LIST.items.*.value</field> </block> </value> <statement name="STATEMENT"> <block type="variables_set" id="WICfiMJn3|pN[gjk4$-n"> <field name="VAR" id="K.UvtC*?_TX1ho;sL^L@" variabletype="">Liste</field> <value name="VALUE"> <block type="get_value" id="HiC*tYhW!5Z.n`76~Xq."> <field name="ATTR">val</field> <field name="OID">0_userdata.0.einkaufsliste</field> </block> </value> <next> <block type="variables_set" id="BvG%Gi|C#]!J01MXEY=L"> <field name="VAR" id="s/1M:P9ju5UoIn(R*Cqk" variabletype="">Produkt</field> <value name="VALUE"> <shadow type="text" id="Hk[;;3XnW{VjJbcizccN"> <field name="TEXT">abc</field> </shadow> <block type="text_getSubstring" id="Zktw?P.xSgy7MZ?dgM}*"> <mutation at1="true" at2="false"></mutation> <field name="WHERE1">FROM_START</field> <field name="WHERE2">LAST</field> <value name="STRING"> <block type="on_source" id="|mS#hA$6L/o7QSx|B2h$"> <field name="ATTR">state.val</field> </block> </value> <value name="AT1"> <block type="math_arithmetic" id="`1e)y!~7EXH?4VbLOk4(" inline="false"> <field name="OP">ADD</field> <value name="A"> <shadow type="math_number" id="g(C`hxLD_jf2QsRAGKwF"> <field name="NUM">1</field> </shadow> <block type="text_indexOf" id="0jR}mb]u04}UFmTOq;XL"> <field name="END">FIRST</field> <value name="VALUE"> <block type="on_source" id="22#E7OU_hM[crWQM6Z;;"> <field name="ATTR">state.val</field> </block> </value> <value name="FIND"> <shadow type="text" id="q+i_8?PZ(RF+d*J19WVe"> <field name="TEXT"> </field> </shadow> </value> </block> </value> <value name="B"> <shadow type="math_number" id="qj+ZtJX|VQh0US?n59Y|"> <field name="NUM">1</field> </shadow> </value> </block> </value> </block> </value> <next> <block type="controls_if" id="?7o@OMpEh-:21Neg`]Z8"> <mutation else="1"></mutation> <value name="IF0"> <block type="logic_compare" id="-_!}RlY5.9I=[CN|n}I-"> <field name="OP">GT</field> <value name="A"> <block type="text_indexOf" id="$gv[6JL!~SIoaB+aYFI;"> <field name="END">FIRST</field> <value name="VALUE"> <block type="on_source" id="%N{)jjwnP9/5=OU34L@{"> <field name="ATTR">state.val</field> </block> </value> <value name="FIND"> <shadow type="text" id="s@:Vn,Q})Ef+]%QrHQ,S"> <field name="TEXT"> </field> </shadow> </value> </block> </value> <value name="B"> <block type="math_number" id="6]!=`}r-uDA5`8?!g{Ea"> <field name="NUM">0</field> </block> </value> </block> </value> <statement name="DO0"> <block type="variables_set" id=".l#Q}^B4aNLKUy6-61ja"> <field name="VAR" id="f!8~+vt7Kuw9$r@wJ@st" variabletype="">Einkaufsort</field> <value name="VALUE"> <shadow type="text" id="(8t%3#W/JPVfR.P8DBl~"> <field name="TEXT">abc</field> </shadow> <block type="text_getSubstring" id="oU1TYK,!)3(0-UDqbd%{"> <mutation at1="false" at2="true"></mutation> <field name="WHERE1">FIRST</field> <field name="WHERE2">FROM_START</field> <value name="STRING"> <block type="on_source" id=";aaEKW7:?g2(n$8ww:{t"> <field name="ATTR">state.val</field> </block> </value> <value name="AT2"> <block type="math_arithmetic" id="1=:LfxOOE}/[J!TY|ADA" inline="false"> <field name="OP">MINUS</field> <value name="A"> <shadow type="math_number" id="g(C`hxLD_jf2QsRAGKwF"> <field name="NUM">1</field> </shadow> <block type="text_indexOf" id="C!VW}!C28j5f]gbZ]d~M"> <field name="END">FIRST</field> <value name="VALUE"> <block type="on_source" id="S?|ZiT8@cB0ehKjjJ/@m"> <field name="ATTR">state.val</field> </block> </value> <value name="FIND"> <shadow type="text" id="7paAcc#tb?Yr!?{pmPRi"> <field name="TEXT"> </field> </shadow> </value> </block> </value> <value name="B"> <shadow type="math_number" id="YqRk2TG#D0,sjX*`/lsf"> <field name="NUM">1</field> </shadow> </value> </block> </value> </block> </value> <next> <block type="controls_for" id="JS9GxOG+AHzra`~LB~@@"> <field name="VAR" id="aR8gF*3BgIkNJTFhJ{aZ" variabletype="">i</field> <value name="FROM"> <shadow type="math_number" id="Foa5UJ,qx|r?WTQu$)-G"> <field name="NUM">1</field> </shadow> </value> <value name="TO"> <shadow type="math_number" id="H#(IMB-G%Y8lQ(/6b)K0"> <field name="NUM">10</field> </shadow> <block type="math_arithmetic" id="*W+TpDjJ]9c8].:y/q}:"> <field name="OP">MINUS</field> <value name="A"> <shadow type="math_number" id="n+Ts~#2GV6_5Gd!zav00"> <field name="NUM">1</field> </shadow> <block type="lists_length" id="c2@6od?sgS0Mv-cZXmwZ"> <value name="VALUE"> <block type="variables_get" id=".`sQ8F-M+w{[t[DCJ,+v"> <field name="VAR" id="K.UvtC*?_TX1ho;sL^L@" variabletype="">Liste</field> </block> </value> </block> </value> <value name="B"> <shadow type="math_number" id="GfG34lFEg5;-NdTy5An{"> <field name="NUM">1</field> </shadow> </value> </block> </value> <value name="BY"> <shadow type="math_number" id="y=n!M[;:jh%=Cfz)P^0q"> <field name="NUM">1</field> </shadow> </value> <statement name="DO"> <block type="controls_if" id="%Be{gNwco/%94=vMmP6}"> <value name="IF0"> <block type="logic_compare" id="RJGg2w~iWO#O!/%t`|#b"> <field name="OP">GT</field> <value name="A"> <block type="lists_indexOf" id="jc9~]=8g[L1#s/h%%yU#" inline="false"> <field name="END">FIRST</field> <value name="VALUE"> <block type="lists_getIndex" id="aqsV3G$5DEnSnPw6dHL;" inline="false"> <mutation statement="false" at="true"></mutation> <field name="MODE">GET</field> <field name="WHERE">FROM_START</field> <value name="VALUE"> <block type="variables_get" id="FSAb((ML3HY/lE{+sP[G"> <field name="VAR" id="K.UvtC*?_TX1ho;sL^L@" variabletype="">Liste</field> </block> </value> <value name="AT"> <block type="variables_get" id="P$}sL0y*,SR8n*41.Zr*"> <field name="VAR" id="aR8gF*3BgIkNJTFhJ{aZ" variabletype="">i</field> </block> </value> </block> </value> <value name="FIND"> <block type="variables_get" id="{KG)4izQ}r$/;;49E8/,"> <field name="VAR" id="f!8~+vt7Kuw9$r@wJ@st" variabletype="">Einkaufsort</field> </block> </value> </block> </value> <value name="B"> <block type="math_number" id=",P0Criqm?(QC[h;J)Sa]"> <field name="NUM">0</field> </block> </value> </block> </value> <statement name="DO0"> <block type="lists_setIndex" id="A2b/s:L}5]tdrb*%bW9T" inline="false"> <mutation at="false"></mutation> <field name="MODE">INSERT</field> <field name="WHERE">LAST</field> <value name="LIST"> <block type="lists_getIndex" id="LDb_E:_?S-,FNLCVqKs3" inline="false"> <mutation statement="false" at="true"></mutation> <field name="MODE">GET</field> <field name="WHERE">FROM_START</field> <value name="VALUE"> <block type="variables_get" id=".#+d+WlDCRqZdT:y{9jm"> <field name="VAR" id="K.UvtC*?_TX1ho;sL^L@" variabletype="">Liste</field> </block> </value> <value name="AT"> <block type="variables_get" id="h*.1I7bY{zK_Ryoq6Uvc"> <field name="VAR" id="aR8gF*3BgIkNJTFhJ{aZ" variabletype="">i</field> </block> </value> </block> </value> <value name="TO"> <block type="variables_get" id="F$91-F6bI,b%y^w@9B4e"> <field name="VAR" id="s/1M:P9ju5UoIn(R*Cqk" variabletype="">Produkt</field> </block> </value> </block> </statement> </block> </statement> </block> </next> </block> </statement> <statement name="ELSE"> <block type="lists_setIndex" id="C+?|!Izw?pK97GpE|,6A"> <mutation at="false"></mutation> <field name="MODE">INSERT</field> <field name="WHERE">LAST</field> <value name="LIST"> <block type="lists_getIndex" id="[eKPFT8h%LNZ8yL,S|?a"> <mutation statement="false" at="false"></mutation> <field name="MODE">GET</field> <field name="WHERE">LAST</field> <value name="VALUE"> <block type="variables_get" id="G)-.7_/n57fSNb_uaKw@"> <field name="VAR" id="K.UvtC*?_TX1ho;sL^L@" variabletype="">Liste</field> </block> </value> </block> </value> <value name="TO"> <block type="variables_get" id="k~Ah15yX-+F|R+uxO|Ok"> <field name="VAR" id="s/1M:P9ju5UoIn(R*Cqk" variabletype="">Produkt</field> </block> </value> </block> </statement> <next> <block type="timeouts_settimeout" id="#O+,EZg2jG+Nna+V2g)I"> <field name="NAME">timeout</field> <field name="DELAY">5000</field> <field name="UNIT">ms</field> <statement name="STATEMENT"> <block type="debug" id="Uc;x/c(S7pEF^RUaS!!v"> <field name="Severity">warn</field> <value name="TEXT"> <shadow type="text" id="`#f6:%lD;+651S^]$8cg"> <field name="TEXT">test</field> </shadow> <block type="variables_get" id="1L}l]t~2.`rB_$@N%D+B"> <field name="VAR" id="K.UvtC*?_TX1ho;sL^L@" variabletype="">Liste</field> </block> </value> <next> <block type="update" id="#N=8f4(8(BUrf-!CnflB"> <mutation delay_input="false"></mutation> <field name="OID">0_userdata.0.einkaufsliste</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="variables_get" id="*.=s!n2)5PPW)v)srZI7"> <field name="VAR" id="K.UvtC*?_TX1ho;sL^L@" variabletype="">Liste</field> </block> </value> </block> </next> </block> </statement> </block> </next> </block> </next> </block> </next> </block> </statement> </block> <block type="update" id="6^8z6fQ-;or6SIEJr:2a" x="38" y="462"> <mutation delay_input="false"></mutation> <field name="OID">0_userdata.0.einkaufsliste</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="lists_create_with" id="E!qv.@Y[EnPf1nJ#VSVD"> <mutation items="8"></mutation> <value name="ADD0"> <block type="lists_create_with" id="2hCG24iLq7y/eWJ)7LR%"> <mutation items="1"></mutation> <value name="ADD0"> <block type="text" id="Hp;0?Vi,En/LiE:qz%!|"> <field name="TEXT">aldi</field> </block> </value> </block> </value> <value name="ADD1"> <block type="lists_create_with" id="?y={2KXTKRB+,!=.M)_b"> <mutation items="1"></mutation> <value name="ADD0"> <block type="text" id="E]xzXQU^.aZ]b8kS,mks"> <field name="TEXT">edeka</field> </block> </value> </block> </value> <value name="ADD2"> <block type="lists_create_with" id="n3pLt6|j=$ON6fj6#)An"> <mutation items="1"></mutation> <value name="ADD0"> <block type="text" id="eI8~WsLTO,]u|3Pn#MSL"> <field name="TEXT">globus</field> </block> </value> </block> </value> <value name="ADD3"> <block type="lists_create_with" id="H`}_6-Y~?v|rruxn0J!S"> <mutation items="1"></mutation> <value name="ADD0"> <block type="text" id="j^a%AmH@(F@{UC5P9@/v"> <field name="TEXT">lidl</field> </block> </value> </block> </value> <value name="ADD4"> <block type="lists_create_with" id="in+D@D67==$N9UN[TEs0"> <mutation items="1"></mutation> <value name="ADD0"> <block type="text" id="qQxe|IdWCMRb/lz08B|p"> <field name="TEXT">dm</field> </block> </value> </block> </value> <value name="ADD5"> <block type="lists_create_with" id="wa]M-[{zore1Kdvd)bc+"> <mutation items="1"></mutation> <value name="ADD0"> <block type="text" id="{BJXy?lROGL#E!s|]qyy"> <field name="TEXT">real</field> </block> </value> </block> </value> <value name="ADD6"> <block type="lists_create_with" id="q=Ln^57=vGHH*+NN$3y]"> <mutation items="1"></mutation> <value name="ADD0"> <block type="text" id="!O`k+r?wRyM4_HCZ~o2`"> <field name="TEXT">rewe</field> </block> </value> </block> </value> <value name="ADD7"> <block type="lists_create_with" id="G1}F57uD-kKzl,`$ym#c"> <mutation items="1"></mutation> <value name="ADD0"> <block type="text" id="O)XrN1kvj:d{r3LK)+XI"> <field name="TEXT">egal</field> </block> </value> </block> </value> </block> </value> </block> </xml>
- setze Produkt auf meine Einkaufliste
-
Hallo, auch ich möchte meine Alexa Einkaufsliste in die VIS bringen, da hilft mir dein Post Super weiter, vor allem finde ich die Idee mit dem sortieren nach Geschäft ne klasse Idee.
Jetzt fange ich erst an, und habe folgendes gemacht
Ich möchte also als erstes schlicht und einfach den Wert in eine Zeichenkette schreiben, was aber nicht funktioniert.Kannst du mir helfen und sagen was ich falsch gemacht habe?
Vergiss es, klappt jetzt, auch wenn ich nicht weiß warum
-
-