NightCrawler86 Posted September 14, 2011 Share Posted September 14, 2011 So its hard tryign to figure out where exactly you want the mouse to click. Is there a way to make a program, and log where exactly you clicked, so that you can get the cords for "YYY" and "ZZZ" MouseClick("left", YYY, ZZZ, 2) Link to comment Share on other sites More sharing options...
sebgg Posted September 14, 2011 Share Posted September 14, 2011 (edited) try this, open up note pad and click away works for left and right clikcks and types out the code for you in notepad expandcollapse popup#cs ---------------------------------------------------------------------------- AutoIt Version: 3.3.6.1 Author: myName Script Function: Template AutoIt script. #ce ---------------------------------------------------------------------------- ; open note pad then this then start clicking and it will write it all down for you. #Include <Misc.au3> #include <GUIConstantsEx.au3> #include <SliderConstants.au3> #include <Array.au3> #include <File.au3> $f = chr(0x22) $string = "left" $string8 = "right" do if _ispressed(01) Then $array = mousegetpos() $color = hex(pixelgetcolor($array[0],$array[1])) $string1 = "Mouseclick("&$f& "x" &$f& ","& $array[0] & "," & $array[1] & ",1,0)" $string2 = stringreplace($string1,"x",$string) ;msgbox(1,"test",$string2) ControlSend("[CLASS:Notepad]", "", "Edit1", $string2 & "{ENTER}") ControlSend("[CLASS:Notepad]", "", "Edit1", "Pixelsearch(" &$array[0]-1&","&$array[1]-1&","&$array[0]+1&","&$array[1]+1&",0x"&$color&",10)"& "{ENTER}") endif if _ispressed(02) Then $array1 = mousegetpos() $color1 = hex(pixelgetcolor($array1[0],$array1[1])) $string3 = "Mouseclick("&$f& "x" &$f& ","& $array1[0] & "," & $array1[1] & ",1,0)" $string4 = stringreplace($string3,"x",$string8) ;msgbox(1,"test",$string2) ControlSend("[CLASS:Notepad]", "", "Edit1", $string4 & "{ENTER}") ControlSend("[CLASS:Notepad]", "", "Edit1", "Pixelsearch(" &$array1[0]-1&","&$array1[1]-1&","&$array1[0]+1&","&$array1[1]+1&","&$color1&",10)"& "{ENTER}") endif until 1=2 $array = mousegetpos() $color = hex(pixelgetcolor($array[0],$array[1])) msgbox(1,"color is", $color) on a side note i belive there are better ways to do this, this is just something i wrote a while ago, also i i think the pixels search bit is wrong but it wouldnt take much to change sebs Edited September 14, 2011 by sebgg GC - Program to rapidly manipulate DNA SequencesRotaMol - Program to measure Protein Size Link to comment Share on other sites More sharing options...
water Posted September 14, 2011 Share Posted September 14, 2011 You could use AU3Recorder (part of SciTE) to record the Mousclicks. 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...
NightCrawler86 Posted September 14, 2011 Author Share Posted September 14, 2011 Im gonna try out the code above, but i just also read while searching about the AU3 Recorder. Looks like this should work great also. Thanks to both of you. Link to comment Share on other sites More sharing options...
Blue_Drache Posted September 14, 2011 Share Posted September 14, 2011 (edited) The problem with using coordinates in the manner you described, is that the coordinates change when screen resolution changes. Especially if you intend to your program in a window. Edited September 14, 2011 by Blue_Drache Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache Link to comment Share on other sites More sharing options...
quickercarter Posted August 23, 2013 Share Posted August 23, 2013 (edited) Im gonna try out the code above, but i just also read while searching about the AU3 Recorder Keystrokes. Looks like this should work great also. Thanks to both of you. I know that keylogger can record all keystrokes typed into your computer. Edited August 23, 2013 by quickercarter Link to comment Share on other sites More sharing options...
water Posted August 23, 2013 Share Posted August 23, 2013 Welcome to AutoIt and the forum! I hope you've read the forum rules. Keyloggers aren't allowed here. The link to the rules is in the lower right corner of every page. And please don't necro a thread that is 2 years old. 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...
Moderators Melba23 Posted August 23, 2013 Moderators Share Posted August 23, 2013 quickercarter,Please do not post merely to tell us that you know about keyloggers. I have deleted the others - do it again and you go away. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
Recommended Posts