3min3m Posted August 7, 2014 Share Posted August 7, 2014 (edited) Hello Guys I love AutoIT, but i was only a user until now. Since i need a script, i'm trying to create it with AutoIT, but i didn't had success yet. What i want to do: In Firefox: If Image is on homepage, click on it If Image is not on homepage, press F5 I'm aware of Imagesearch but i don't get how to make this if else operation above. I would also pay for help Thanks in advance 3. Edited August 7, 2014 by 3min3m Link to comment Share on other sites More sharing options...
JohnOne Posted August 7, 2014 Share Posted August 7, 2014 Your first port of call should be to look through this thread. '?do=embed' frameborder='0' data-embedContent>> AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
3min3m Posted August 7, 2014 Author Share Posted August 7, 2014 Your first port of call should be to look through this thread. '?do=embed' frameborder='0' data-embedContent>> Ok i looked at this tread and installed the addon for FireFox. Now theres still no explanation how to do what i need Link to comment Share on other sites More sharing options...
3min3m Posted August 7, 2014 Author Share Posted August 7, 2014 Ok what i found out till now: #Include <FF.au3> _FFSTART("thehomepageiwanttoclickonimage") _FFImageClick("theimageiwanttoclick.jpg") now i have to include a function which makes F5 when the image is not on the page. Link to comment Share on other sites More sharing options...
JohnOne Posted August 7, 2014 Share Posted August 7, 2014 I've not used the library but I imagine it would be something like the following. _FFImageClick("theimageiwanttoclick.jpg") If :@error Then Send("{F5}") EndIf AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
3min3m Posted August 7, 2014 Author Share Posted August 7, 2014 (edited) Thanks a lot for your help, i really appreciate it! When i try this i get: my code: #Include <FF.au3> _FFSTART("homepagee....") _FFImageClick("pic on homepage...") If :@error Then Send("{F5}") EndIf Edited August 7, 2014 by 3min3m Link to comment Share on other sites More sharing options...
JohnOne Posted August 7, 2014 Share Posted August 7, 2014 Typo If @error AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
3min3m Posted August 7, 2014 Author Share Posted August 7, 2014 (edited) Ok now it works, but it only refreshs the page 1 time. What i want to do it now: refresh the page until the pic is on the page ot: i have fun like a kid, this is the first script and it looks like i'll get it to work with you ) Edited August 7, 2014 by 3min3m Link to comment Share on other sites More sharing options...
JohnOne Posted August 7, 2014 Share Posted August 7, 2014 Look in help file at loop statements. Also be sure to look at Sleep() function. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
3min3m Posted August 7, 2014 Author Share Posted August 7, 2014 ok i tried this now: #Include <FF.au3> _FFSTART("homepagee....") _FFImageClick("pic on homepage...") If @error Then Send("{F5}") EndIf Do Send("{F5}") Until _FFImageClick("thepicutre.jpg") he now makes very fast f5 (have to add the sleep function i see) but wont click image Link to comment Share on other sites More sharing options...
3min3m Posted August 7, 2014 Author Share Posted August 7, 2014 (edited) I wont get it to click the image... for _FFImageClick("src of image ex: blabla.jpg") Edited August 7, 2014 by 3min3m Link to comment Share on other sites More sharing options...
mikell Posted August 7, 2014 Share Posted August 7, 2014 ? While 1 _FFImageClick("theimageiwanttoclick.jpg") If not @error Then Exitloop Send("{F5}") Sleep(1000) ; time to define Wend Link to comment Share on other sites More sharing options...
JohnOne Posted August 7, 2014 Share Posted August 7, 2014 I somehow don't think that function takes a local image as a parameter. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
3min3m Posted August 7, 2014 Author Share Posted August 7, 2014 it wont work with the full http:// url and also wont work with src=url Link to comment Share on other sites More sharing options...
3min3m Posted August 8, 2014 Author Share Posted August 8, 2014 should i try the imagesearch function instead of FF_Imageclick? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now