Welcome to Wolfram Community! Please provide your trials in terms of Wolfram Language code. This will make it easier for other members to help you.
Check several methods available to include your code in the rules http://wolfr.am/READ-1ST