amin0xy Posted August 27, 2016 Share Posted August 27, 2016 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 More sharing options...
markyrocks Posted August 28, 2016 Share Posted August 28, 2016 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 Spoiler "I Believe array math to be potentially fatal, I may be dying from array math poisoning" Link to comment Share on other sites More sharing options...
mikell Posted August 28, 2016 Share Posted August 28, 2016 What game is it for ? Link to comment Share on other sites More sharing options...
AutoBert Posted August 28, 2016 Share Posted August 28, 2016 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. Link to comment Share on other sites More sharing options...
amin0xy Posted August 28, 2016 Author Share Posted August 28, 2016 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 More sharing options...
amin0xy Posted August 28, 2016 Author Share Posted August 28, 2016 2 hours ago, mikell said: What game is it for ? Yeah exactly its a browser game..but yiu know the rules... Link to comment Share on other sites More sharing options...
amin0xy Posted August 28, 2016 Author Share Posted August 28, 2016 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 More sharing options...
Developers Jos Posted August 28, 2016 Developers Share Posted August 28, 2016 (edited) 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 August 28, 2016 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 More sharing options...
Recommended Posts