Jump to content

Can autoit make an invisible bot?


Recommended Posts

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

  • 3 weeks later...

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

  • Developers

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

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

  • Recently Browsing   0 members

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