Jump to content

Recommended Posts

Posted

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)

Posted (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

#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 by sebgg
GC - Program to rapidly manipulate DNA SequencesRotaMol - Program to measure Protein Size
Posted

You could use AU3Recorder (part of SciTE) to record the Mousclicks.

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Posted (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 by Blue_Drache

Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache

  • 1 year later...
Posted (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 by quickercarter
Posted

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 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

  • Moderators
Posted

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. :naughty:

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png 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 columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...