httprequest return value

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
BobDDstryr
Junior Coder
Posts: 38
Joined: Fri Oct 22, 2010 2:47 am

httprequest return value

Post by BobDDstryr » Thu Apr 07, 2011 8:22 pm

I've got a question about the return value of httprequest.

I'm running the command:

httprequest>http:\\client_machine:6666\D:\macro\script.scp,,GET,,client_result

which will run script.scp on client_machine - if script.scp works correctly, its MACRO_RESULT is set to PASS

So - after running HTTP request I have an if statement to see if client_result=PASS - but it doesn't. If I print it out with macroscheduler it looks like it has a value of PASS followed possibly by a carraige return? But I've tried comparing it to PASS%CR% and it doesn't equal that either.

The help file for httprequest says "If LocalFileName is not specified and the operation is successful this will contain the HTML returned." - Do I need to do something to convert this value from .html to text? Is it adding some invisible tag to it? Is there a way to print out what the actual value is (so if the value was PASS%CR% it would print that?)

User avatar
Marcus Tettmar
Site Admin
Posts: 7391
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Fri Apr 08, 2011 11:50 am

Why don't you do this:

Position>PASS,client_result,1,p
If>p=1
...
Endif
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

Post Reply
cron
Sign up to our newsletter for free automation tips, tricks & discounts