need some tips on a problem im having

05/27/2010 22:33 nico91nico#1
here i leave you a post i made on the auto it forums:

*
*

hi everyone, im quite new at autoit but i still now some basics.

im playing a game called redstone and i wanted auto it to right click or send the button "A" on it
i play the game with sandboxie so i can open multiple clients(window mode).
the three clients are open (not minimized) and i wanted autoit to send the key "A" to each of them every 2min.

here i leave you a screenshot:
[Only registered and activated users can see links. Click Here To Register...]


[Only registered and activated users can see links. Click Here To Register...]



as you can see, sandboxie gives the extra windows some strange names.
is it possible to send a key to each window without them popping up?

in the game if you dont click or write anything for 2min you get afk (no exp)
so my idea is to play on an account, while the other 2 leech the exp. so i will need autoit to click/write on the other windows without them interrupting my gameplay.

extra info:
the process is called Red Stone.exe and there are 3 of them (one for each client)

*
*

well im not really looking for a solution to that post in this topic.

im just looking for some inspiration of how may i make an anti afk bot without auto it as it doesnt work.

maybe i could send packages on each window?

help will be apreaciated
05/28/2010 01:29 AllesVergeben#2
Ehm...with autoit? Use Controlsend or Controlclick.
05/28/2010 03:08 nico91nico#3
what does that do? a situation example would be awsome.

im quite new sry, still learning
05/28/2010 13:56 Cholik#4
#moved
05/28/2010 17:42 nico91nico#5
sry for the wrong section

back to the topic, with controlsend i need the control id and other stuff which i dont have.
i use the "AutoIt window info" to check for the control details and they dont appear, as if there is no control in the whole window.

i just want to send a "Q" in any part of the window.
05/28/2010 21:03 Σternαl.#6
PHP Code:
ControlSend(WinGetHandle("Red Stone - The Lunatic Story"), ""0"{Q}"
05/28/2010 21:58 nico91nico#7
ill try that, what does that do?
05/28/2010 23:23 Σternαl.#8
It sends "Q" to the window of Red Stone :facepalm:
05/29/2010 14:33 nico91nico#9
well its not working, seems a bit complicated that command.

any more simplier?
05/29/2010 15:08 | Moep |#10
U need the Class attribut of the window, u will get this attribute from the Autoit window info tool (Autoit Dir).

U can using this Parameter like this:

Code:
ControlSend(("[CLASS:[COLOR="Red"]PutYourClassAttributeHere[/COLOR]]"), "", 0, "{Q}")
if it doesnt work, only try a little bit. I know that it working, because with other games i running with sandboxie, i can use that method. ;)

Press thx if i helped u ;)
05/29/2010 15:13 Σternαl.#11
PHP Code:
#include <GUIConstantsEx.au3>

GUICreate("Q-send Bot"20050)
GUISetState(@sw_show)

sleep(500)
WinActivate("Red Stone - The Lunatic Story")
ControlSend("Red Stone - The Lunatic Story"""0"{Q}")

while 
1
    
Do
        
sleep(10)
    
Until GUIGetMsg() = $GUI_EVENT_CLOSE
    
Exit
WEnd 
€: Moep is thx geil :p
Ich bezweifle, dass nico überhaupt weiß, wie man ne GUI macht (auch wenns nicht nötig ist).
Deswegen hab ich ihm mal den ganzen code gepostet.

@nico
Wenn das nicht klappt, mach:
PHP Code:
#include <GUIConstantsEx.au3>

GUICreate("Q-send Bot"20050)
GUISetState(@sw_show)

sleep(500)
$wh WinGetHandle("Red Stone - The Lunatic Story")
WinActivate($wh)
ControlSend($wh""0"{Q}")

while 
1
    
Do
        
sleep(10)
    
Until GUIGetMsg() = $GUI_EVENT_CLOSE
    
Exit
WEnd 
05/29/2010 15:57 | Moep |#12
Quote:
Originally Posted by FooFightah View Post
[php]
€: Moep is thx geil :p
Ich bezweifle, dass nico überhaupt weiß, wie man ne GUI macht (auch wenns nicht nötig ist).
Wo hab ich was von ner GUI stehen? o.O