|Subject||Can I parse just the relevant text from a variable?|
We are considering using your Automize application for the following purpose:
1) Monitor an Email address for Emails with specific Subject text.
2) If the Email or Emails exist, run 1 Command Line executable for each Email received, using info parsed from the Subject as a parameter in the Command line statement.
It was very easy to implement a Chain with 2 tasks. One that would check Email and if any existed go to the second task that would run a Command Line that would use the ::Subject variable for passing the appropriate parameter. This works but I have 2 questions:
1) How can I parse just the relevant text from the ::Subject variable to pass on in the Command Line statement? It now works only if the Subject line consists of only the info needed for the Command Line parameter (no extra spaces or characters).
2) How can I handle situations where multiple Emails are in the Inbox when checked? Now I am only able to process the last Email received.
Your help will be appreciated.
Thanks for evaluating Automize.
1) You cannot text process the subject via automize. So, your only option is to process the subject in your executable. When you pass the subject as a commandline variable, there will be multiple parameters passed depending on the number of spaces in the subject. so you will have to loop through the parameter array and obtain your subject. OR, you could try enclosing the subject in quotes "..." and then pass this as the commandline. This may allow the entire subject to be passed as 1 parameter.. (not sure)
2) This is a fairly difficult situation and unfortunately, I do not think it can be done via automize. When multiple emails are in the box, they are saved as files named taskTitle_1, taskTitle_2 etc..in the local mail folder set in the task. Your only option would be to do some batch file processing on these files and send the subject as commandline to your executable.
-- Sincerely, Melvin Desilva Hitek Software