Jump to content
Sign in to follow this  
miketh2005

Can autoit make an invisible bot?

Recommended Posts

miketh2005

I'm wondering how to make an invisible bot that doesn't move your mouse. Anyway to do that in autoit? Thanks.

Share this post


Link to post
Share on other sites
muzle6074

What game is this for? You can use ControlSend() and ControlMouseClick() to control windows that are not currently active

Share this post


Link to post
Share on other sites
miketh2005

Thanks alot man, your awesome!

Share this post


Link to post
Share on other sites
miketh2005

Hmm. I wanna highlight something with ControlClick or ControlSend or Control anything. Anyway to do this? Thanks. :idea:

As there is no ControlClickDrag xD

Share this post


Link to post
Share on other sites
JohnOne

Theoretically you can make your own ControlClickDrag function with one of the WinAPI functions, but personally in reality I tried for some time without getting it to cause any event at all.

I hope you have better luck than I

Oops, Its "_WinAPI_Mouse_Event"

Edited by JohnOne

AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

Share this post


Link to post
Share on other sites
somdcomputerguy

Maybe ControlClick at a position at the end of the text to highlight, then ControlSend however many shift left arrows are needed? (or click at the beginning, then use shift right arrows)? Just a shot in the dark.. I have no idea if this will work or not..


- Bruce /*somdcomputerguy */  If you change the way you look at things, the things you look at change.

Share this post


Link to post
Share on other sites
miketh2005

ohhh, nice. i think double clicking the text would work. :idea: since it highlights the text when you double click.

Share this post


Link to post
Share on other sites
nicoshot

how can you use control(something) on a window if you dont have the "ControlID", i check the autoit help file and on all the control commands it says as following.

ControlSend ( "title", "text", controlID, "string" [, flag] )

i understand what to put on all but on the "controlid" i have no idea :mellow:

im using, the window info tool from autoit and doesnt show any control on the window.

is there any chance to use this command without the control? like coord to click or coord to send the key.

tyvm, other alternatives would be nice too

Share this post


Link to post
Share on other sites
nicoshot

Controls

One of the best new features with AutoIt v3 is the ability to work directly with certain types of Window Controls. Almost everything you see on a window is a control of some kind: buttons, listboxes, edit fields, static text are all controls. In fact Notepad is just one big "Edit" control! Because AutoIt works directly with a control they provide a more reliable way to automate than just sending keystrokes.

Note: AutoIt only works with standard Microsoft controls - some applications write their own custom controls which may look like a standard MS control but may resist automation. Experiment!

Using the AutoIt Window Info Tool you can move your mouse around the window you are interested in and you will be given information of the control that is currently under your mouse.

A special description can be used as the controlID parameter used in most of the Control...() functions . This description can be used to identify a control by the following properties:

ID - The internal control ID. The Control ID is the internal numeric identifier that windows gives to each control. It is generally the best method of identifying controls. In addition to the AutoIt Window Info Tool, other applications such as screenreaders for the blind and Microsoft tools/APIs may allow you to get this Control ID

TEXT - The text on a control, for example "&Next" on a button

CLASS - The internal control classname such as "Edit" or "Button"

CLASSNN - The ClassnameNN value as used in previous versions of AutoIt, such as "Edit1"

NAME - The internal .NET Framework WinForms name (if available)

REGEXPCLASS - Control classname using a regular expression

X \ Y \ W \ H - The position and size of a control.

INSTANCE - The 1-based instance when all given properties match.

this is taken from the help files.

and its all about controlid setting. and as i said the window doesnt have a control (or maybe does)

so the only one that may work is the position one?

how do i write it?

ControlSend ( "windowname", "", controlID, "{q}")

what should i put in the controlid part?

if you can give an example with random numbers it would be nice, there is no example of it in the help section.

other solutions would be nice too

Share this post


Link to post
Share on other sites
JohnOne

There are multiple examples in the helpfiles

heres a hint from your quoted text

This description can be used to identify a control by the following properties:

ID - The internal control ID. The Control ID is the internal numeric identifier that windows gives to each control. It is generally the best method of identifying controls. In addition to the AutoIt Window Info Tool, other applications such as screenreaders for the blind and Microsoft tools/APIs may allow you to get this Control ID

TEXT - The text on a control, for example "&Next" on a button

CLASS - The internal control classname such as "Edit" or "Button"

CLASSNN - The ClassnameNN value as used in previous versions of AutoIt, such as "Edit1"

NAME - The internal .NET Framework WinForms name (if available)

REGEXPCLASS - Control classname using a regular expression

X \ Y \ W \ H - The position and size of a control.

INSTANCE - The 1-based instance when all given properties match.


AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

Share this post


Link to post
Share on other sites
nicoshot

dont know how that can help me.

how may i write it with the coords?

Share this post


Link to post
Share on other sites
JohnOne

What type of window and/or control are you trying to use?

This an example straight out of the helpfile

Run("notepad.exe")
WinWait("[CLASS:Notepad]")
ControlSetText("[CLASS:Notepad]", "", "Edit1", "New Text Here" )

run it and use your window info tool to understand what has happened, you will see in the code under the ID param it says Edit1 now recheck your info tool window.

Im sorry bu I cannot think of any other way to explain it.

Edited by JohnOne

AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

Share this post


Link to post
Share on other sites
nicoshot

its for a game (civilization 3)

i got it on windows mode, not on front tho, i want auto it to send a "space"(or any other key) or "rightclick" on the window without it popping up. so i can just skip turns.

its not a multiplayer game, just a turn based war one

Share this post


Link to post
Share on other sites
Jos

its for a game (civilization 3)

i got it on windows mode, not on front tho, i want auto it to send a "space"(or any other key) or "rightclick" on the window without it popping up. so i can just skip turns.

its not a multiplayer game, just a turn based war one

what ever ... go play somewhere else.

click


Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


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

×