miketh2005 Posted May 10, 2010 Posted May 10, 2010 I'm wondering how to make an invisible bot that doesn't move your mouse. Anyway to do that in autoit? Thanks.
muzle6074 Posted May 10, 2010 Posted May 10, 2010 What game is this for? You can use ControlSend() and ControlMouseClick() to control windows that are not currently active
miketh2005 Posted May 10, 2010 Author Posted May 10, 2010 Hmm. I wanna highlight something with ControlClick or ControlSend or Control anything. Anyway to do this? Thanks. As there is no ControlClickDrag xD
JohnOne Posted May 10, 2010 Posted May 10, 2010 (edited) 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 May 10, 2010 by JohnOne AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans.
somdcomputerguy Posted May 10, 2010 Posted May 10, 2010 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.
miketh2005 Posted May 10, 2010 Author Posted May 10, 2010 ohhh, nice. i think double clicking the text would work. since it highlights the text when you double click.
nicoshot Posted May 28, 2010 Posted May 28, 2010 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 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
JohnOne Posted May 28, 2010 Posted May 28, 2010 Helpfile > Controls It offers all the information you ask for. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans.
nicoshot Posted May 28, 2010 Posted May 28, 2010 ControlsOne 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
JohnOne Posted May 28, 2010 Posted May 28, 2010 There are multiple examples in the helpfilesheres a hint from your quoted textThis 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 IDTEXT - The text on a control, for example "&Next" on a buttonCLASS - 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 expressionX \ 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.
nicoshot Posted May 28, 2010 Posted May 28, 2010 dont know how that can help me. how may i write it with the coords?
JohnOne Posted May 28, 2010 Posted May 28, 2010 (edited) 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 May 28, 2010 by JohnOne AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans.
nicoshot Posted May 28, 2010 Posted May 28, 2010 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
Developers Jos Posted May 28, 2010 Developers Posted May 28, 2010 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 onewhat 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.
Recommended Posts