A method of operating a plurality of electrical and/or electronic devices connected with a data processing apparatus is disclosed as including the steps of (a) detecting occurrence of events of the devices (b) recording data relating to some of said detected events in a database; (c) ordering the recorded events into sequences of events chronologically and/or geographically; (d) comparing a detected event with the sequences of events for finding a matched sequence of events; and (e) performing the remaining events in the matched sequence.