Jump to content

help with http request


Recommended Posts

hey everyone im still new in the autoit programming ..and im blocked in a step .. and i dont know how to surpass it ...so please can any one help me with it 

..so my problem is as below

i did send a POST request to a website  and i did success the login  

i did also success to GET  the source code of the web page...

$login.open('POST' ,$url)
   $login.SetRequestHeader('Content-Type' , 'application/x-www-form-urlencoded')
   $login.send($login_packet)
   $login.WaitForResponse()
   $cookies = $login.GetALLResponseHeaders()
 Local $main_url = 'http://blablabla/blabla.php'
  $login.open('GET' ,$main_url)
  $login.Send()
  $login.WaitForResponse()
  $source_code= $login.ResponseText()

 but the problem is .. there is a button in this source code iwanna click it ..

<div class="clear"></div>
<button  type="button" value="Uppgradera till nivå 1" id="button57c2029491e77" class="green build" onclick="window.location.href = 'dorf1.php?a=5&c=f25b30'; return false;">
    <div class="button-container addHoverClick">
        <div class="button-background">
            <div class="buttonStart">
                <div class="buttonEnd">
                    <div class="buttonMiddle"></div>

the button is called " button57c2029491e77 " 

so how i can click this button  ?!!

as a REMARQUE  1- when i click the button manually there is no Post request shown when i use http headers live extension under firefox

                              2- im not using IE.au3 .. im using a GUI and http request 

 

im waiting for  your help guys .. keep in mind im a newbie ..thanks in advance 

Link to comment
Share on other sites

ive been through this same problem myself unless you use ie.au3 there is really only limited options.  if the button is in a static location mouseclick().  I don't usually like to use mouseclick() by itself.  I typically use mousemove() to the spot then check the mouse cursor to make sure its changed from whatever it normally is to a finger or whatever to show that its over something clickable. that way you can code in some kinda contingency if for  whatever reason the button isn't there.  I'm not sure about firefox but in chrome browser you can use like ctrl+f to use screen find and type in the button and it should highlight it with a colored bar that can be found with pixel search.  Or if you're real tricky you could actully save a picture of the actual button and use some type of picture find udf to locate and click on the picture of said button.  

 

its possible that there's other more sophisticated methods but i have yet to find them.  If you come across something else let me know

Link to comment
Share on other sites

10 hours ago, markyrocks said:

ive been through this same problem myself unless you use ie.au3 there is really only limited options.  if the button is in a static location mouseclick().  I don't usually like to use mouseclick() by itself.  I typically use mousemove() to the spot then check the mouse cursor to make sure its changed from whatever it normally is to a finger or whatever to show that its over something clickable. that way you can code in some kinda contingency if for  whatever reason the button isn't there.  I'm not sure about firefox but in chrome browser you can use like ctrl+f to use screen find and type in the button and it should highlight it with a colored bar that can be found with pixel search.  Or if you're real tricky you could actully save a picture of the actual button and use some type of picture find udf to locate and click on the picture of said button.  

 

its possible that there's other more sophisticated methods but i have yet to find them.  If you come across something else let me know

Yeah but i dont wanna use a browser..i wanna do it direct fron a gui.. And yeah.. If i get something i will share it... Thanks 

Link to comment
Share on other sites

15 minutes ago, AutoBert said:

With http you can't click a button. You can only send a answer which is send when button is pressed. Therefor you must know what the the server excpects.
Post whole URL and you will find some willing helping people.

Its a browser game so.. I cant really do that due to the forum rules 

Link to comment
Share on other sites

  • Developers
7 minutes ago, amin0xy said:

Its a browser game so.. I cant really do that due to the forum rules 

Seems you know the rules so: *click*

Edited by Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

  • Jos locked this topic
Guest
This topic is now closed to further replies.
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...