Skip to content

Instantly share code, notes, and snippets.

@scalone
Created January 4, 2018 14:53
Show Gist options
  • Save scalone/118b789d358256aa33e8bc693f8226f1 to your computer and use it in GitHub Desktop.
Save scalone/118b789d358256aa33e8bc693f8226f1 to your computer and use it in GitHub Desktop.
<function name="fn_main">
<cleandisplay />
<integervariable value="0" variable="iReturn" />
<integervariable value="0" variable="iIterator" />
<stringvariable value="" variable="sReturn" />
<inttostring variableinteger="$(iReturn)" variablestring="$(sReturn)" />
<editfile filename="config.dat" key="touchscreen" value="1"/>
<display line="0" column="0" message="TOUCH" />
<while variable="$(iIterator)" operator="lessthan" value="10">
<integeroperator operator="++" variablesource="$(iIterator)" />
<callfunction name="fn_gettouchscreen" />
</while>
</function>
<!-- fn_gettouchscreen -->
<function name="fn_gettouchscreen">
<integervariable value="0" variable="iOption" />
<integervariable value="0" variable="iXaxis" /> <!-- Column -->
<integervariable value="0" variable="iYaxis" /> <!-- Line -->
<integervariable value="0" variable="iReturn" />
<stringvariable value="" variable="sKey" />
<stringvariable value="" variable="sReturn" />
<system.gettouchscreen axisx="$(iXaxis)" axisy="$(iYaxis)" variablereturn="$(iReturn)" />
<inttostring variableinteger="$(iReturn)" variablestring="$(sReturn)" />
<if variable="$(iReturn)" operator="equalto" value="-1">
<callfunction name="fn_gettouchscreen" />
</if>
<stringvariable value="" variable="sXaxis" />
<stringvariable value="" variable="sYaxis" />
<!-- coloquei aqui um comentario -->
<inttostring variableinteger="$(iYaxis)" variablestring="$(sYaxis)" />
<inttostring variableinteger="$(iXaxis)" variablestring="$(sXaxis)" />
<display line="3" column="0" message="Yaxis:" />
<display line="4" column="0" message="$(sYaxis)" />
<display line="5" column="0" message="Xaxis:" />
<display line="6" column="0" message="$(sXaxis)" />
<if variable="$(iYaxis)" operator="greaterthan" value="265">
<if variable="$(iYaxis)" operator="lessthan" value="304">
<exit />
</if>
</if>
</function>
<function name="fn_gettouchscreenkeyboard">
<integervariable value="0" variable="iOption" />
<integervariable value="0" variable="iXaxis" /> <!-- Column -->
<integervariable value="0" variable="iYaxis" /> <!-- Line -->
<integervariable value="0" variable="iReturn" />
<stringvariable value="" variable="sKey" />
<system.gettouchscreenkeyboard axisx="$(iXaxis)" axisy="$(iYaxis)" timeout="5000" variablekey="$(sKey)" variablereturn="$(iReturn)" />
<if variable="$(iReturn)" operator="equalto" value="-1">
<callfunction name="fn_gettouchscreenkeyboard" />
</if>
<inttostring variableinteger="$(iReturn)" variablestring="$(sReturn)" />
<display line="2" column="0" message="$(sReturn)" />
<if variable="$(iReturn)" operator="equalto" value="-1">
<callfunction name="fn_gettouchscreenkeyboard" />
</if>
<stringvariable value="" variable="sXaxis" />
<stringvariable value="" variable="sYaxis" />
<!-- coloquei aqui um comentario -->
<inttostring variableinteger="$(iYaxis)" variablestring="$(sYaxis)" />
<inttostring variableinteger="$(iXaxis)" variablestring="$(sXaxis)" />
<display line="3" column="0" message="Yaxis:" />
<display line="4" column="0" message="$(sYaxis)" />
<display line="5" column="0" message="Xaxis:" />
<display line="6" column="0" message="$(sXaxis)" />
<display line="7" column="0" message="$(sKey)" />
<if variable="$(iYaxis)" operator="greaterthan" value="265">
<if variable="$(iYaxis)" operator="lessthan" value="304">
<exit />
</if>
</if>
</function>
<callfunction name="fn_main" />
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment