randomguy23

Autoit / Autohotkey - not sure where to go.

5 posts in this topic

Autohotkey looks very promising for recording clicks whereas autoit doesn't seem to be that great at this. This is just from searching around and I don't know exactly at this point so I could easily be wrong. I also have an odd situation that is kind of hard to get an idea of where to go with my project. 

Front end - C# (80%-90% built at this time) 

Back end - Autoit or Autohotkey + OCR (optical character recognition) 

#include <AutoItConstants.au3>

WinActivate("Play Now!")
Sleep(2000)
#comments-start
Note: 1203,593 is specific to me only at this time. Needs to allow the user to create their own custom clicks.
#comments-end
MouseClick("left",1203,593)
Sleep (2000)

As you can see I commented out the area that is going to cause problems as I move forward. I need it so the user can create their own custom clicks and it records where they click or they press a key to record a "left click" and "right click". 

What would you recommend for this since I'm using C# and OCR alongside it? From my research C# seems to get along better with autoit, but autohotkey seems to be better for recording mouse clicks. 

 

Share this post


Link to post
Share on other sites



I am not sure what the question is but if you are trying to figure out where the mouse is have a look at MouseGetPos() and then MouseMove() that can be called before your click ...


Build your own poker game with AutoIt: pokerlogic.au3 | Learn To Program Using FREE Tools with AutoIt

Share this post


Link to post
Share on other sites

randomguy23,

Welcome to the AutoIt forums.

AutoIt most certainly can record mouse clicks - but we would consider using them to automate an application is very much the last resort. There are several other ways to action controls which are far more reliable and do not require the user to create "custom clicks". Which app contains this "Play Now!" control?

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______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

 

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

52 minutes ago, Jfish said:

I am not sure what the question is but if you are trying to figure out where the mouse is have a look at MouseGetPos() and then MouseMove() that can be called before your click ...

I want the user to be able to specify the location of a left mouse click or right mouse click by pressing a button. They press 1 on the keyboard it means left mouse click or they press 2 it means right click. Then once they have it all set up they start the run by pressing 3 and it continues searching until told to stop. 

Melba23 - I posted the video below that I am following so far to get a basis of how to work with autoit. When he came up to the position x,y of the left mouse click I decided to take a look at it to get further information. This is when I started using Google and many of the items I found pointed to autohotkey. 

 

Note: This is for gambling and I have never played club penguin before. 

<snip>

Edited by Melba23
Video removed

Share this post


Link to post
Share on other sites

randomguy23,

Quote

This is for gambling

Then your choice is pretty clear - as the Forum rules make clear, we do not support game bots here. Thread locked.

M23

 


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______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

 

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.