szucsaaron Posted June 29, 2013 Share Posted June 29, 2013 (edited) Hey! I would like to write a script which clicks to a bookmark of mine while it's on the tray. Global $Paused HotKeySet("{F2}", "TogglePause") HotKeySet("{F3}", "Terminate") HotKeySet("{F1}", "Start") $GoogleChrome = 0x9E0E09 ; Youtube icon color MsgBox(4096, "", "Go to DeskTop Before Pressing Home.") While 1 Sleep(10) WEnd Func TogglePause() $Paused = Not $Paused While $Paused Sleep(100) ToolTip('Script is "Paused".To resume press "Pause" again', 0, 0) WEnd ToolTip("") EndFunc ;==>TogglePause Func Terminate() MsgBox(4096, "", "Press ok To close IE opener.") Exit 0 EndFunc ;==>Terminate Func Start() If $t = PixelSearch(@DesktopWidth, @DesktopHeight, 34, 80, $GoogleChrome) Then ControlClick("Facebook - Google Chrome", "", 101973760, "Left", "1",) Else MsgBox(64, "Error", "Not found") EndIf EndFunc ;==>Start I would like to write this script in order to speed up opening a specified page (like youtube) even if i have lagg. +I started writing this script because i have read the help file under PixelSearch and these were it's parameters: left left coordinate of rectangle. top top coordinate of rectangle. right right coordinate of rectangle. bottom bottom coordinate of rectangle. color Colour value of pixel to find (in decimal or hex). shade-variation [optional] A number between 0 and 255 to indicate the allowed number of shades of variation of the red, green, and blue components of the colour. Default is 0 (exact match). step [optional] Instead of searching each pixel use a value larger than 1 to skip pixels (for speed). E.g. A value of 2 will only check every other pixel. Default is 1. hwnd [optional] Window handle to be used. The last one means that you can use this function for Windows which are not on the screen but maybe on the tray. Thanks for help! Edited June 29, 2013 by szucsaaron Link to comment Share on other sites More sharing options...
JohnOne Posted June 29, 2013 Share Posted June 29, 2013 PixelSearch Only searches the visible screen. 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...
water Posted June 29, 2013 Share Posted June 29, 2013 Why don't you directly access the objects you need to click on? 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...
szucsaaron Posted June 29, 2013 Author Share Posted June 29, 2013 #JohnOne But than why hwnd command is there as well? I mean it means that you it handels a specific window. #water How do i do that? Link to comment Share on other sites More sharing options...
water Posted June 29, 2013 Share Posted June 29, 2013 Can you please elaborate on what you mean by "clicks to a bookmark of mine while it's on the tray." Is this a link on the desktop, a bookmark in a browser ...? 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...
szucsaaron Posted June 29, 2013 Author Share Posted June 29, 2013 Bookmark in browser. And btw i would like to do it in a way that when for exmaple I start playing with a game, i click on the script which will in the webbrowser click on the icon (in bookmarks) of build/guides page so it runs meanwhile a start the game. +"clicks to a bookmark of mine while it's on the tray it" means that it operates while the browser is on the tray.Like the example script for ControlSend, but with click. Link to comment Share on other sites More sharing options...
water Posted June 29, 2013 Share Posted June 29, 2013 Which browser do we talk about: Internet Explorer, Firefox ...? 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...
szucsaaron Posted June 29, 2013 Author Share Posted June 29, 2013 Google Chorme. Link to comment Share on other sites More sharing options...
szucsaaron Posted June 29, 2013 Author Share Posted June 29, 2013 (edited) Or, btw it could be any of the ones mentiond by you, if it does the controlClick. Because then you only need to change some pixels. Edited June 29, 2013 by szucsaaron Link to comment Share on other sites More sharing options...
water Posted June 29, 2013 Share Posted June 29, 2013 Google Chorme. I don't think there is a Chrome UDF title="">available. If it were IE or FF then AutoIt could use the available UDFs. 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...
water Posted June 29, 2013 Share Posted June 29, 2013 Sorry, my bad. Should be: ControlGetText 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...
szucsaaron Posted June 29, 2013 Author Share Posted June 29, 2013 Oh. Isn't it possible to do with control send and Pixelsearch? Link to comment Share on other sites More sharing options...
water Posted June 29, 2013 Share Posted June 29, 2013 Not while on the tray as JohnOne stated in his post. 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...
szucsaaron Posted June 29, 2013 Author Share Posted June 29, 2013 What if it wasn't on the tray but it would not be active. By this i mean that the window is not on top but still on the screen? Link to comment Share on other sites More sharing options...
water Posted June 29, 2013 Share Posted June 29, 2013 A Bookmark just contains an URL. Why don't you start the browser with AutoIt and pass the URL? 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...
szucsaaron Posted June 29, 2013 Author Share Posted June 29, 2013 That would be too easy And i could also do that by making a shortcut for that URL. Link to comment Share on other sites More sharing options...
water Posted June 29, 2013 Share Posted June 29, 2013 That's it. If you have a knife that solves your problem in 2 seconds, why use a spoon and try for days? 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...
szucsaaron Posted June 29, 2013 Author Share Posted June 29, 2013 True. Thanks for your help and patience. Best regards, szucsaaron Link to comment Share on other sites More sharing options...
water Posted June 29, 2013 Share Posted June 29, 2013 Sometimes a solution you have in mind is way too complex. But it looks like you can achieve the same goal with just a few lines of code. 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...
szucsaaron Posted June 29, 2013 Author Share Posted June 29, 2013 I totaly agree with that. 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