Sign in to follow this  
Followers 0
caramen

Active Windows Problem Hmmm

13 posts in this topic

hi all i got this code :

Opt("MouseCoordMode", 2) 


Deley ()
Solo ()
Team ()
Stage ()

While (1)
    Outingame ()
WEnd

Func Deley ()
Sleep(10000)
EndFunc

Func Solo ()
;uncoched 1
MouseMove(352, 496)
Sleep(100)
MouseDown("left")
Sleep(50)
MouseUp("left") 
Sleep(100)
EndFunc

Func Team ()
;uncoched 2
MouseMove(419, 495)
Sleep(100)
MouseDown("left")
Sleep(50)
MouseUp("left") 
Sleep(100)
EndFunc

Func Stage ()
;uncoched 3
MouseMove(492, 493)
Sleep(100)
MouseDown("left")
Sleep(50)
MouseUp("left") 
Sleep(100)
EndFunc

Func Outingame ()
;enter in room
MouseClick("left")
Sleep(50)
MouseClick("left")
Sleep(50)
MouseClick("left")
Sleep(50)
Send("{END}")
MouseMove(844, 662)
Sleep(100)
MouseDown("left")
Sleep(1500)
MouseUp("left") 
Sleep(1000)
MouseMove(50, 50)

EndFunc

and i got a problem

the code dont work but i ave see that :

it is coze i lose focus ( or something like that ) on the windows but i see the windows ~~ like if i got the focus but i dont got it !!

dunno why

it is hard to explain coze i got very bad english but i say it here stap after stap

-i lunch my script (with 15 sec pause for w8 get window)

-i lunch my game

-script work great for the first stap

-after one click i got an other screen

-now my script is working but i need to click on the screen manualy for my script continu( i think it is protection of the game)

some one now why :think:(( ?

Share this post


Link to post
Share on other sites



hi all i got this code :

CODE

Opt("MouseCoordMode", 2)

Deley ()

Solo ()

Team ()

Stage ()

While (1)

Outingame ()

WEnd

Func Deley ()

Sleep(10000)

EndFunc

Func Solo ()

;uncoched 1

MouseMove(352, 496)

Sleep(100)

MouseDown("left")

Sleep(50)

MouseUp("left")

Sleep(100)

EndFunc

Func Team ()

;uncoched 2

MouseMove(419, 495)

Sleep(100)

MouseDown("left")

Sleep(50)

MouseUp("left")

Sleep(100)

EndFunc

Func Stage ()

;uncoched 3

MouseMove(492, 493)

Sleep(100)

MouseDown("left")

Sleep(50)

MouseUp("left")

Sleep(100)

EndFunc

Func Outingame ()

;enter in room

MouseClick("left")

Sleep(50)

MouseClick("left")

Sleep(50)

MouseClick("left")

Sleep(50)

Send("{END}")

MouseMove(844, 662)

Sleep(100)

MouseDown("left")

Sleep(1500)

MouseUp("left")

Sleep(1000)

MouseMove(50, 50)

EndFunc

and i got a problem

the code dont work but i ave see that :

it is coze i lose focus ( or something like that ) on the windows but i see the windows ~~ like if i got the focus but i dont got it !!

dunno why

it is hard to explain coze i got very bad english but i say it here stap after stap

-i lunch my script (with 15 sec pause for w8 get window)

-i lunch my game

-script work great for the first stap

-after one click i got an other screen

-now my script is working but i need to click on the screen manualy for my script continu( i think it is protection of the game)

some one now why :((( ?

What I don't see in your script is any use of WinActivate() or WinWaitActive(). Those fuctions would return the focus to the window you want, or wait until it was restored. Have you checked out WinActivate in the help file?

:think:


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites

First tyfor helping

Yes man i ave try

WinActivate("", "")

WinMove("Untitled -", "", 0, 0, 200, 200)

WinSetOnTop("Untitled -", "", 1)

Nothing work after one change screen

foir explain better i got :

****SCREEN 1*****

func 1 to 4 (->working great

****GO TO SREEN 2****

func 5 no work (-> if i click manualy it work

Share this post


Link to post
Share on other sites

ummm are you trying to move notepad? and u arent defining a window to be set as active

Share this post


Link to post
Share on other sites

Try this at the top of your script:

Opt('WinTitleMatchMode', 2)


[center]Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.[/center]

Share this post


Link to post
Share on other sites

Opt('WinTitleMatchMode', 2)

this make the game crash :think:

and no work again :(

Share this post


Link to post
Share on other sites

ummm are you trying to move notepad? and u arent defining a window to be set as active

no man i ave only try move command to take back focus on my game windows but no work i think the game ave protection "antibot" i just whant take back focus but alll thing i try no work lol ty for helping all !!!

my first hard problem :think:

Share this post


Link to post
Share on other sites

what game r u playng?

Share this post


Link to post
Share on other sites

it s rakion game it is free game u can download it for try www.rakion.net

Share this post


Link to post
Share on other sites

no man i ave only try move command to take back focus on my game windows but no work i think the game ave protection "antibot" i just whant take back focus but alll thing i try no work lol ty for helping all !!!

my first hard problem :think:

When you want to take back focus.... you have WinSetOnTop("Untitled -", "", 1) .... when your ready to take back focus use WinSetOnTop("Untitled -", "", 0) then do something somewhere. The '0' releases the window from always having the On Top position.

[center]Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.[/center]

Share this post


Link to post
Share on other sites

HAHAHAHAH r u trying to move windows in the game?

Share this post


Link to post
Share on other sites

#13 ·  Posted (edited)

i know i look like a noob and my english is very sad but hahahah no !!!!!

i only whant keep my focus and my script continu to work zzzzzzzzzzz

but afgter stape 5 my script stop work

Edited by caramen

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0