Posted By

lmontealegre on 02/06/13


Tagged


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

danfinrud55


Script that simply returns the current date


 / Published in: C#
 

Script that simply returns the current date

  1. using System;
  2. using VisualWebRipper.Internal.SimpleHtmlParser;
  3. using VisualWebRipper;
  4. public class Script
  5. {
  6. //See help for a definition of WrInputTransformationArguments.
  7. public static string TransformInput(WrInputTransformationArguments args)
  8. {
  9. try
  10. {
  11. return DateTime.Now.ToString("dd/MM/yyyy");
  12. }
  13. catch(Exception exp)
  14. {
  15. //Place error handling here
  16. args.WriteDebug(exp.Message);
  17. return "Custom script error";
  18. }
  19. }
  20. }

Report this snippet  

You need to login to post a comment.