sodele... Laustärke Skript v2.0 😉
Screenshot 2023-08-20 124037.png
sorry wg der Auflösung... dehalb hier der Code:
Spoiler <xml xmlns="https://developers.google.com/blockly/xml"> <variables> <variable id="m_fU+GKEG~B4S))D@G%D">myID</variable> <variable id="]*kEFZ(e5z@72cb9Kp)@">alexas</variable> <variable id="7DB5dK0*1*QrjhrIj`D@">currentState</variable> <variable id="f_q.[.fq?kf)rg~LImu*">Liste</variable> <variable id="=bB!0$flaPHx5xr,b}O2">volume</variable> <variable id="s1]}lXeH,G-qQsYDYd_D">echoDP</variable> <variable id="PLIj`{XSzaq%S^b|u|9C">startvolume</variable> <variable id=")fOlUEb))?kcB`=qR~S3">volumeDP</variable> </variables> <block type="on_ext" id="k=luF#idQtOl_@M6flnn" x="-362" y="-137"> <mutation xmlns="http://www.w3.org/1999/xhtml" items="1"></mutation> <field name="CONDITION">ne</field> <field name="ACK_CONDITION"></field> <value name="OID0"> <shadow type="field_oid" id=",1InwyuX,mX(pM%f=7[4"> <field name="oid">tr-064.0.callmonitor.toPauseState</field> </shadow> </value> <statement name="STATEMENT"> <block type="controls_if" id="a#peb##pl^rskkX5sF2j"> <mutation elseif="1"></mutation> <value name="IF0"> <block type="logic_compare" id="^(KTRn:2s;0bVLV9c9pM"> <field name="OP">EQ</field> <value name="A"> <block type="on_source" id="7ueOMjbvGVq53bVnKg=1"> <field name="ATTR">state.val</field> </block> </value> <value name="B"> <block type="text" id="lOXch{[^VuN9O!M#*Lp7"> <field name="TEXT">ring</field> </block> </value> </block> </value> <statement name="DO0"> <block type="variables_set" id="u8ls7N|2kdrhw=LM}dYe"> <field name="VAR" id="]*kEFZ(e5z@72cb9Kp)@">alexas</field> <value name="VALUE"> <block type="lists_create_with" id="Cml@$nj-]O8g=_3G-3Bm"> <mutation items="0"></mutation> </block> </value> <next> <block type="controls_forEach" id="+CD$_+})VP$2T2{VISfj"> <field name="VAR" id="7DB5dK0*1*QrjhrIj`D@">currentState</field> <value name="LIST"> <block type="selector" id="VHHYFf3xuK..M[?2zJH)"> <field name="TEXT">alexa2.0.Echo-Devices.*.Player.currentState</field> </block> </value> <statement name="DO"> <block type="controls_if" id="MXVR%kD*413661ao`Ct#"> <value name="IF0"> <block type="get_value_var" id="E,6hCU*eJrq:TKIhFB|w"> <field name="ATTR">val</field> <value name="OID"> <shadow type="text"> <field name="TEXT"></field> </shadow> <block type="variables_get" id="|]ro_}|L^?(5c`v;PqxM"> <field name="VAR" id="7DB5dK0*1*QrjhrIj`D@">currentState</field> </block> </value> </block> </value> <statement name="DO0"> <block type="variables_set" id="/bxLeW=!=(zIAU[[DWFD"> <field name="VAR" id="=bB!0$flaPHx5xr,b}O2">volume</field> <value name="VALUE"> <block type="procedures_callcustomreturn" id="eA|4{hk^}TL_Rgk[rG`!"> <mutation name="volume"> <arg name="myID"></arg> </mutation> <value name="ARG0"> <block type="variables_get" id=")VZv-OfyN3-xZ)`oY5N1"> <field name="VAR" id="7DB5dK0*1*QrjhrIj`D@">currentState</field> </block> </value> </block> </value> <next> <block type="variables_set" id="ofWMjx5t9[ql4^doe2EI"> <field name="VAR" id="PLIj`{XSzaq%S^b|u|9C">startvolume</field> <value name="VALUE"> <block type="get_value_var" id="D:]y!pZ=29yPC+}Ijo;{"> <field name="ATTR">val</field> <value name="OID"> <shadow type="text"> <field name="TEXT"></field> </shadow> <block type="variables_get" id="i$Z*+dPA=,=Yd:)2LC[+"> <field name="VAR" id="=bB!0$flaPHx5xr,b}O2">volume</field> </block> </value> </block> </value> <next> <block type="lists_setIndex" id="hAg1{doON,wAa#HfXJaO"> <mutation at="false"></mutation> <field name="MODE">INSERT</field> <field name="WHERE">FIRST</field> <value name="LIST"> <block type="variables_get" id="VUH}v$`#wE*rFa?W+]EC"> <field name="VAR" id="]*kEFZ(e5z@72cb9Kp)@">alexas</field> </block> </value> <value name="TO"> <block type="text_join" id="t1P@D?Lp8J8|]vg/j0Ot"> <mutation items="5"></mutation> <value name="ADD0"> <block type="text" id=":Y^Z*#FUchfwz@|*rkeR"> <field name="TEXT">{"alexa":"</field> </block> </value> <value name="ADD1"> <block type="variables_get" id="Yu-./7s[y=Y,PEg#:n~A"> <field name="VAR" id="=bB!0$flaPHx5xr,b}O2">volume</field> </block> </value> <value name="ADD2"> <block type="text" id="RSJh~5$HV+aXl4;TlKt,"> <field name="TEXT">","volume":"</field> </block> </value> <value name="ADD3"> <block type="variables_get" id="Qh!c}$^AuO#2t/uDq9Z/"> <field name="VAR" id="PLIj`{XSzaq%S^b|u|9C">startvolume</field> </block> </value> <value name="ADD4"> <block type="text" id="qGg=(P1`#=G}qqXB:]UT"> <field name="TEXT">"}</field> </block> </value> </block> </value> <next> <block type="control_ex" id="4l(|#j[4L$$sWHR9SUUi" inline="true"> <field name="TYPE">false</field> <field name="CLEAR_RUNNING">FALSE</field> <value name="OID"> <shadow type="field_oid" id="L5Y?{gdAy`+Eu2aDz;4u"> <field name="oid">Object ID</field> </shadow> <block type="variables_get" id="J]hw[!oisa+Fl}{[(MPj"> <field name="VAR" id="=bB!0$flaPHx5xr,b}O2">volume</field> </block> </value> <value name="VALUE"> <shadow type="logic_boolean" id="D|S86z5K*TaX%j2f]f$,"> <field name="BOOL">TRUE</field> </shadow> <block type="math_number" id="fScOfmZjI@aS.2QM#K[M"> <field name="NUM">10</field> </block> </value> <value name="DELAY_MS"> <shadow type="math_number" id="(#aa7Yf(M?qam54_0Ivw"> <field name="NUM">0</field> </shadow> </value> </block> </next> </block> </next> </block> </next> </block> </statement> </block> </statement> <next> <block type="update" id="Uc=Y=]%-Noin21s=DFrd"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">0_userdata.0.Test.ringringJson</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="text_join" id="SyAI)iprVj+}B4n698)`"> <mutation items="3"></mutation> <value name="ADD0"> <block type="text" id="~(9$Z/6zBodzmyj*`Jt["> <field name="TEXT">[</field> </block> </value> <value name="ADD1"> <block type="variables_get" id="}s*oA=Rm0Xzo9.PvfU+~"> <field name="VAR" id="]*kEFZ(e5z@72cb9Kp)@">alexas</field> </block> </value> <value name="ADD2"> <block type="text" id="-sdZGU8Qx:R1qo~(i!~J"> <field name="TEXT">]</field> </block> </value> </block> </value> </block> </next> </block> </next> </block> </statement> <value name="IF1"> <block type="logic_compare" id="~5KEhQiW#m9Xj{EcR]60"> <field name="OP">EQ</field> <value name="A"> <block type="on_source" id="LWP5%Z}QkxU%/KDa,NFd"> <field name="ATTR">state.val</field> </block> </value> <value name="B"> <block type="text" id="EV+}XQ^T/cFm3-,pb5VS"> <field name="TEXT">end</field> </block> </value> </block> </value> <statement name="DO1"> <block type="variables_set" id="#H?SRSa1j8M.kLK#uwS*"> <field name="VAR" id="]*kEFZ(e5z@72cb9Kp)@">alexas</field> <value name="VALUE"> <block type="convert_json2object" id="zJUKSj`5tyR}x-#avWKu"> <value name="VALUE"> <block type="get_value" id="]7WRm.^LJKU58%Gcu#Hn"> <field name="ATTR">val</field> <field name="OID">0_userdata.0.Test.ringringJson</field> </block> </value> </block> </value> <next> <block type="controls_repeat_ext" id="]/seVO9]~;q=ETwSZKMe"> <value name="TIMES"> <shadow type="math_number" id="sVGhj0m?S$,Q97([`:Ku"> <field name="NUM">10</field> </shadow> <block type="lists_length" id="?|hUt8t[0wT_%sB_XK:a"> <value name="VALUE"> <block type="variables_get" id="w)1ES|p@3UUdS]fvFn1{"> <field name="VAR" id="]*kEFZ(e5z@72cb9Kp)@">alexas</field> </block> </value> </block> </value> <statement name="DO"> <block type="variables_set" id="Iz%nRBgAuBKbyY%`mlli"> <field name="VAR" id="f_q.[.fq?kf)rg~LImu*">Liste</field> <value name="VALUE"> <block type="lists_getIndex" id="`%:y%ov]q8uM[(e,%^yU"> <mutation statement="false" at="false"></mutation> <field name="MODE">GET_REMOVE</field> <field name="WHERE">FIRST</field> <value name="VALUE"> <block type="variables_get" id="F.uQ:u/{Q(1urH*rrxl]"> <field name="VAR" id="]*kEFZ(e5z@72cb9Kp)@">alexas</field> </block> </value> </block> </value> <next> <block type="variables_set" id="xQ)Zo%?X?y;Eai=V7$VN"> <field name="VAR" id="s1]}lXeH,G-qQsYDYd_D">echoDP</field> <value name="VALUE"> <block type="get_attr" id="BrFLvvH4K6;|](~Ae!L,"> <value name="PATH"> <shadow type="text" id="b+^lWI%YGS/$4y[Vl8T!"> <field name="TEXT">alexa</field> </shadow> </value> <value name="OBJECT"> <block type="variables_get" id="@P=IDeURD)(lm76~`hcx"> <field name="VAR" id="f_q.[.fq?kf)rg~LImu*">Liste</field> </block> </value> </block> </value> <next> <block type="variables_set" id="(l*pWmdD3NW_pYCRtLza"> <field name="VAR" id=")fOlUEb))?kcB`=qR~S3">volumeDP</field> <value name="VALUE"> <block type="get_attr" id="R!zU=W1w-`o|[prr=o4#"> <value name="PATH"> <shadow type="text" id="e[K(Pi`GbSG$XOe5xP0U"> <field name="TEXT">volume</field> </shadow> </value> <value name="OBJECT"> <block type="variables_get" id="|5%*K]lEk@bZuWN[^MK="> <field name="VAR" id="f_q.[.fq?kf)rg~LImu*">Liste</field> </block> </value> </block> </value> <next> <block type="control_ex" id="^AfPZeVlkPYr#]y|v.Xm" inline="true"> <field name="TYPE">false</field> <field name="CLEAR_RUNNING">FALSE</field> <value name="OID"> <shadow type="field_oid"> <field name="oid">Object ID</field> </shadow> <block type="variables_get" id="Ot-QwT#{oXIzu]v85N@B"> <field name="VAR" id="s1]}lXeH,G-qQsYDYd_D">echoDP</field> </block> </value> <value name="VALUE"> <shadow type="logic_boolean" id="eoOP.k-!J,C9~ywgQE?m"> <field name="BOOL">TRUE</field> </shadow> <block type="convert_tonumber" id="tigd%YVNad1$v`TglWCR"> <value name="VALUE"> <block type="variables_get" id="l}/G6dx+3#[.HEP*LoY5"> <field name="VAR" id=")fOlUEb))?kcB`=qR~S3">volumeDP</field> </block> </value> </block> </value> <value name="DELAY_MS"> <shadow type="math_number" id=";1c.]PWG/{P]+b}M:YBd"> <field name="NUM">0</field> </shadow> </value> </block> </next> </block> </next> </block> </next> </block> </statement> </block> </next> </block> </statement> </block> </statement> </block> <block type="procedures_defcustomreturn" id="E:a`vGcq3aTw!M/ieI-." x="163" y="-112"> <mutation statements="false"> <arg name="myID" varid="m_fU+GKEG~B4S))D@G%D"></arg> </mutation> <field name="NAME">volume</field> <field name="SCRIPT">cmV0dXJuIG15SUQucmVwbGFjZSgiY3VycmVudFN0YXRlIiwidm9sdW1lIik7IA==</field> <comment pinned="false" h="80" w="160">Beschreibe diese Funktion …</comment> </block> </xml>der DP ringringJson muss als JSON angelegt werden.
Arbeite aber noch an einer eleganteren Methode vom Skript 🙂