Jump to content
Macro Express Forums

HELP New to Macro Express


lace6921

Recommended Posts

I am trying to create what I think is a simple macro

I want it to compare the information I have in a text file to the information from an application.

 

Basically

If ‘A’ does not ‘A’

Log the information into a txt file (basically an error report) and then move onto the next value in the text file.

 

I am completely lost with the if then statements.

 

This is just a portion of the macro I am using!!!

 

Let me know if you need more information, of course this blog thing is new to me also.

 

Please help!

 

Thanks

Leslie

Link to comment
Share on other sites

I would try something like this:

ASCII File Begin Process: "TestFile" (Comma Delimited Text )
 If Variable %T1% = "A"
   Variable Set String %T99% "%T2% %T3% %T4%"
   Clipboard Append Text: "LogFile,txt"
 End If
 If Variable %T1% <> "A"
   Variable Set String %T99% "%T2% %T3% %T4%"
   Clipboard Append Text: "ErrorLog,txt"
 End If
ASCII File End Process

 

I have also attached a copy of the macro for you to look at.

 

Also, I have set the macro to bypass file existence checking for these files as they are just examples. I would recommend using this unchecking this option when using these commands in your macro.

Log_File_Not_Equal.mex

Link to comment
Share on other sites

Jason,

I really appreciate your response. I have one more issue though 

 

Now my issue is the ‘A’, which is variable from a screen from a system.

How do I capture the variable and then compare it to the %T1% and use the If / Then Statement?

 

I have a Get Control %C1% and want to compare that to the %T1% use the If / Then Statement.

 

ASCII File Begin Process: "TestFile" (Comma Delimited Text )

If Variable %T1% = "A"

Variable Set String %T99% "%T2% %T3% %T4%"

Clipboard Append Text: "LogFile,txt"

End If

If Variable %T1% <> "A"

Variable Set String %T99% "%T2% %T3% %T4%"

Clipboard Append Text: "ErrorLog,txt"

End If

ASCII File End Process

 

Thank you so much.

Leslie

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...