GenExSwipe: Simple Swipe Example

Share and discuss your flows and ideas with other users.

Moderator: Martin

Post Reply
Mucatigoa
Posts: 5
Joined: 09 Nov 2014 17:30

GenExSwipe: Simple Swipe Example

Post by Mucatigoa » 14 Jan 2015 03:03

GenExSwipe: Simple Swipe Example. http://automagic4android.com/flow.php?i ... dd3373c7dd

It swipes from x10 y600 to x10 y500 and then back again.
With AM open, it will either scroll the flow a bit, or move a flow object up and then down.

Executes global swipe command: input {gamin} swipe {gamx1} {gamy1} {gamx2} {gamy2} {gamtime}
  • gamin = input type, touchscreen is default and could have been excluded.
    gamtime = ms length of swipe, 1/2 second in this example.
The action GenExSwipe set AM kybd is not used. This sets AM as default keyboard, seems it is not needed, not for me anyway.


Code: Select all

<?xml version='1.0' encoding='UTF-8' standalone='yes' ?>
<data version="1.26.0">
  <action type="message_dialog">
    <useDefaultName>false</useDefaultName>
    <name>GenExSwipe dlg stdvars</name>
    <title>--> { flow_name }</title>
    <message>
exit_code { exit_code }
stderr { stderr }
stdout { stdout }</message>
    <timeoutEnabled>true</timeoutEnabled>
    <timeout>31000</timeout>
  </action>
  <action type="execute_root_command">
    <useDefaultName>false</useDefaultName>
    <name>GenExSwipe exrootcmd 1</name>
    <command>input {gamin} swipe {gamx1} {gamy1} {gamx2} {gamy2} {gamtime}</command>
    <seContext></seContext>
    <workingDirectory></workingDirectory>
    <variableStdout>stdout</variableStdout>
    <variableStderr>stderr</variableStderr>
    <variableExitCode>exit_code</variableExitCode>
  </action>
  <action type="execute_root_command">
    <useDefaultName>false</useDefaultName>
    <name>GenExSwipe exrootcmd 2</name>
    <command>input {gamin} swipe {gamx2} {gamy2}  {gamx1} {gamy1} {gamtime}
</command>
    <seContext></seContext>
    <workingDirectory></workingDirectory>
    <variableStdout>stdout</variableStdout>
    <variableStderr>stderr</variableStderr>
    <variableExitCode>exit_code</variableExitCode>
  </action>
  <action type="control_user_interface">
    <useDefaultName>false</useDefaultName>
    <name>GenExSwipe ini</name>
    <script>gamx1 = 10;
gamy1 = 600 ;
gamx2 = 10;
gamy2 = 500;
gamin = "touchscreen";
gamtime = 500;

// input swipe 555 600 555 500 1000
// input {gamin} swipe {gamx1} {gamy1} {gamx2} {gamy2} {gamtime}
// input {gamin} swipe {gamx2} {gamy2}  {gamx1} {gamy1} {gamtime}


</script>
  </action>
  <action type="set_default_input_method">
    <useDefaultName>false</useDefaultName>
    <name>GenExSwipe set AM kybd</name>
    <inputMethod>ch.gridvision.ppam.androidautomagic/.keyboard.AutotypeInputMethodService</inputMethod>
  </action>
  <flow type="flow">
    <name>GenExSwipe Swipe Example</name>
    <group>.EX</group>
    <enabled>false</enabled>
    <lastExecutionStartTime>1421203033114</lastExecutionStartTime>
    <lastExecutionEndTime>1421203040523</lastExecutionEndTime>
    <executionPolicy>PARALLEL</executionPolicy>
    <triggercontainer id="t1" x="70.0" y="122.5" />
    <actioncontainer id="t2" x="-105.0" y="297.5">GenExSwipe set AM kybd</actioncontainer>
    <actioncontainer id="t3" x="70.0" y="682.5">GenExSwipe dlg stdvars</actioncontainer>
    <actioncontainer id="t4" x="70.0" y="542.5">GenExSwipe exrootcmd 2</actioncontainer>
    <actioncontainer id="t5" x="70.0" y="402.5">GenExSwipe exrootcmd 1</actioncontainer>
    <actioncontainer id="t6" x="70.00001" y="262.5">GenExSwipe ini</actioncontainer>
    <connection from="t1" to="t6" type="NORMAL" sourcePosition="SOUTH" targetPosition="NORTH" />
    <connection from="t4" to="t3" type="NORMAL" sourcePosition="SOUTH" targetPosition="NORTH" />
    <connection from="t5" to="t4" type="NORMAL" sourcePosition="SOUTH" targetPosition="NORTH" />
    <connection from="t6" to="t5" type="NORMAL" sourcePosition="SOUTH" targetPosition="NORTH" />
  </flow>
</data>

Post Reply