httprequest question

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
voltron
Newbie
Posts: 1
Joined: Fri Jul 25, 2008 3:40 pm

httprequest question

Post by voltron » Fri Jul 25, 2008 4:09 pm

First let me say I am a total noob when it comes to this so please keep that in mind, what I am about to ask may not be possible. However if it is great!!!

I am trying to speed up the process of logging into a website: https://webapps.vmtv.com/login/login?

and going to this link multiple times, around x50
http://content.vmtv.com/cgi-bin/purchas ... id=1139989

then logging out w/
http://webapps.vmtv.com/login/login?logout
or just closing the session

First the site only works with IE and not firefox, so I was hopping to try and use httprequest instead of running through IE so that all the graphics and what have you don't have to load.

The idea was to send the request to loggin and then set up a loop to send request for http://content.vmtv.com/cgi-bin/purchas ... id=1139989 multiple times.

The goal is to login and have it send all 50 requests within a minute???

Now the direct link I use to login through IE is:

Code: Select all

Executefile>https://webapps.vmtv.com/login/login?redirect=http://content.vmtv.com&sendAsLoginData=1&avname=voltrontest&password=testpassword

MGuyM
Junior Coder
Posts: 36
Joined: Tue Jul 24, 2007 12:59 am

Post by MGuyM » Fri Jul 25, 2008 5:37 pm

Here's some code that I whipped together using WebRecorder that should accomplish what you are looking to do. Keep in mind that this code is dependent on the IEAUTO.DLL which is apart of the WebRecorder package. I can expand the code to include an encrypted version of the IEAUTO.DLL, but only with Marcus telling me it's OK :)

Here's the Code:

Code: Select all

// Generated by MacroScript WebRecorder 2.04
// Recorded on Friday, July 25, 2008, at 10:35 AM
// Requires IEAUTO.DLL to be in the Script Directory

LibLoad>%Script_Dir%\IEAuto.dll,hIE
If>hIE=0
  MessageModal>Could not load IEAuto.dll, make sure it is in the path or edit the LibLoad line.
  Goto>end_script
EndIf

//Move the mouse cursor out of harm's way to avoid causing mouseover events to interrupt
MouseMove>0,0
Let>delay=1

LibFunc>hIE,CreateIE,IE[0],0

LibFunc>hIE,Navigate,r,%IE[0]%,https://webapps.vmtv.com/login/login?redirect=http://content.vmtv.com&sendAsLoginData=1&avname=voltrontest&password=testpassword
LibFunc>hIE,WaitIE,r,%IE[0]%
Wait>delay

Let>X=0
Repeat>X
  Let>X=X+1
  LibFunc>hIE,Navigate,r,%IE[0]%,https://webapps.vmtv.com/login/login?redirect=http://content.vmtv.com&sendAsLoginData=1&avname=voltrontest&password=testpassword
  LibFunc>hIE,WaitIE,r,%IE[0]%
  Wait>delay
Until>X,X=50

LibFunc>hIE,Navigate,r,%IE[0]%,http://webapps.vmtv.com/login/login?logout 
LibFunc>hIE,WaitIE,r,%IE[0]%
Wait>delay

LibFunc>hIE,KillIE,r,%IE[0]%

LibFree>hIE
Label>end_script

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

Post by Marcus Tettmar » Fri Jul 25, 2008 6:17 pm

I can expand the code to include an encrypted version of the IEAUTO.DLL, but only with Marcus telling me it's OK
Since the license for IEAuto.DLL lets you use it on up to 5 machines and not distribute it, it would NOT be OK to publish it here for all and sundry.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

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

MGuyM
Junior Coder
Posts: 36
Joined: Tue Jul 24, 2007 12:59 am

Post by MGuyM » Fri Jul 25, 2008 6:20 pm

That was kinda what I was thinking.....

Thanks!

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