scriptshark Posted September 20, 2015 Share Posted September 20, 2015 (edited) i don't know what conditions i need to use, to be honest i don't know where to starti want something like: if image is the same for 60 seconds = click that image.i have this code but it click when the image is foundWhile (1) $result111 = _ImageSearch("flower.png",1,$x1,$y1,10) if $result111=1 Then MouseClick("left",$x1,$y1,1,3) Sleep(1000) EndIf WEnd Edited September 20, 2015 by scriptshark Link to comment Share on other sites More sharing options...
water Posted September 20, 2015 Share Posted September 20, 2015 You have to check it twice. After you found the image, wait for 60 seconds and check again.Out of curiosity: Which program do you try to automate? My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
scriptshark Posted September 20, 2015 Author Share Posted September 20, 2015 (edited) the one we have on work, we're trying to test the routers if it's working. i need to check the icon on the internet if it's on or not.can you give me an example please? Edited September 20, 2015 by scriptshark Link to comment Share on other sites More sharing options...
water Posted September 20, 2015 Share Posted September 20, 2015 Something like this:If _ImageSearch("flower.png",1,$x1,$y1,10) = 1 Then Sleep(60000) If _ImageSearch("flower.png",1,$x1,$y1,10) = 1 Then MouseClick("left", $x1, $y1, 1, 3) EndIf EndIfBut to check routers etc. I would suggest to use something more reliable like Nagios. My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
scriptshark Posted September 20, 2015 Author Share Posted September 20, 2015 the one you gave is already good enough i think, let me try. thank you! Link to comment Share on other sites More sharing options...
water Posted September 21, 2015 Share Posted September 21, 2015 My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
ViciousXUSMC Posted September 21, 2015 Share Posted September 21, 2015 All these new fancy Cisco routers we have around here with flowers in the GUI If I needed to see if something was online or not my first thoughts go to Ping()P.S. We have Nagios and Solarwinds they work, but still always like to write my own stuff. 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