title: How to use "On Message" event to check specific message availability over different CAN using Message ID
body: <p>I am having measurement log data file offline running in CANoe with more than 15 CANS. I want to check the specific CAN  message availability from different CAN bus while running the offline logfile.
  I tried to use “on Message * “event, executing only once as I want to save that result in to text file.
  Problem is every time its executing else condition.
  Is there any easy solution for the given problem?</p>
  <p>Thank you</p>
  <pre><code>Variable
       dword CANFD_01= 0x1A55549B 
         int MessageExecuted = 0;
       dword readHandle = 0;
       dword readHandle_01 = 0;
        
      
      on start
      {
        setFilePath(path, 1);
        readHandle = openFileWrite(&quot;Result.txt&quot;,0);
        readHandle_01 = openFileWrite(&quot;Result_02.txt&quot;,0);
      }
      
      on message *
      {
        
        if(MessageExecuted == 1) return;
        {
        if(this.id == CANFD_01)
            {  
              i = snprintf(buffer, elcount(buffer),&quot;CANFD_01 is there  \n&quot;);
              filePutString(buffer, elcount(buffer), readHandle);         
            }
         else 
            {
            i = snprintf(buffer, elcount(buffer),&quot;CANFD_01s not there with ID: %d\n&quot;,this.id);
                filePutString(buffer, elcount(buffer), readHandle_01);
            }
            MessageExecuted = 1; 
        } 
  }
  </code></pre>