Sign in to follow this  
Followers 0
alinashul

PixelSearch

11 posts in this topic

hello ... well some guyz helped me alot give me script's and all this kind of staff ( thx alot) but now i have problems with the pixelsearch

[/code]
PixelSearch ( left, top, right, bottom, color [, shade-variation] [, step]] )
[code]

the problem is how do i get all this info ? can somebody give me a script or something ? plzzz help

thx alot

Share this post


Link to post
Share on other sites



...the problem is how do i get all this info ? can somebody give me a script or something...

The "or something" would be the "AutoIt Window Info" tool that comes with the AutoIt3 installation.

A "script" to find this info can be found here:

http://www.autoitscript.com/forum/index.ph...showtopic=19722


[size="1"][font="Arial"].[u].[/u][/font][/size]

Share this post


Link to post
Share on other sites

hey ... autoit info window does not give me the sufficient info

Jex i have ur script ... and still does not give me the right info ... i need the left, top, right, bottom, color infos .... it's pixelsearch ( Searches a rectangle of pixels for the pixel color provided ) and i need the

PixelSearch ( left, top, right, bottom, color [, shade-variation] [, step]] )

left pixel , top pixel , right pixel , bottom pixel , and the color ... ur scipt gives me only the coord and the color :P(

What i really need is to make this pixelsearch ... so the script can If WinActive ("blabla:))") Then ... $coord = PixelSearch (( left, top, right, bottom, color [, shade-variation] [, step]] ) ; check if in the chat menu understand ? :))

2nd problem ... i have made a sound.mp3 with a text-to-speech program and save it like .mp3 .... and i have put in script SoundPlay ("location\welcome.mp3) and it works ... but the thing is that u cant understand what there say .... it hears so bad bad .... thx for help

PS : plz 2nd problem is not so important ... my first problem is very very important ... plz help me thx ... and thx again jex for helping me in my other thread .... plzzz helpppp omg thx

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

this scrypt is made by a "friend" and what i really need to do is this colored text :

Dim $stop = 0

HotKeySet( "{F2}", "go" ); HotKey to start the bot
HotKeySet( "{F3}", "stop" ); HotKey to stop the bot
HotKeySet( "{ESC}", "quit" ); HotKey to exit the bot, I think everybody know it

$delay = Inputbox( 0, "LossBot", "Put ur delay here", "" ); set your delay (everytime you start the Bot)

While 1
    If $stop = 1 Then
        If WinActive( "Warcraft III" ) Then
            $coord = [color="#F4A460"]PixelSearch(34, 145, 34, 145, 0xE3E3E3)[/color];checks if in the Chat channel
            If Not @error Then
                Send( "!T" ); will press ALT+T, to go into the Invite Menu
            EndIf
            $coord = [color="#F4A460"]PixelSearch( 324, 367, 324, 367, 0x0A0A13 )[/color];checks if in the AT-menu
            If Not @error Then
                MouseMove()
                MouseClick( "left" ); refreshes the list
                MouseMove()
                MouseClick( "left" ); clicks on the first person in the list
                MouseMove()
                MouseClick( "left" ); clicks on "Invite"
            EndIf
            $coord = [color="#F4A460"]PixelSearch( 977, 643, 977, 643, 0x00063E )[/color]; checks if the Bot can click on "Start Game"
            If Not @error Then
                MouseMove()
                MouseClick( "left" ); clicks on "Start Game"
            EndIf
            $coord = [color="#F4A460"]PixelSearch(217, 590, 217, 590, 0x977B10)[/color]; checks if ingame
            If Not @error Then
                Sleep( $delay )
                Send( "!Q" ); opens leave menu
                Send( "!Q" ); leaves the game
            EndIf
            Sleep( 10 )
        EndIf
    EndIf
WEnd

Func go()
    $stop = 1; start
EndFunc

Func stop()
    $stop = 0; stop
EndFunc

Func quit()
    Exit; Quits the bot
EndFunc

do u see ? that info how do i get it ? the PixelSearch ( left, top, right, bottom, color) ??? thx for help

Edited by alinashul

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

PixelSearch is used to find a pixel that has a certain colour. The first four parameters are the coordinates of the rectangle where to search. If you want to search the whole monitor for a certain colour, use PixelSearch(0, 0, @DesktopWidth, @DesktopHeight, color).

In your case, where you have two coordinates, you can search an area around those coordinates, for example:

PixelSearch($xCoord-10, $yCoord-10, $xCoord+10, $yCoord+10, color)

This would search an area of 20 by 20 pixels around the specified coordinates.

Edited by TomZ

Share this post


Link to post
Share on other sites

hey ... autoit info window does not give me the sufficient info...

Yes it does. You just have to understand how to use it and what "left, top, right, bottom" mean.

"left, top" is one set of X, Y coordinates that you can get from the info tool. Imagine the rectangle or square area that you want to search - then place the mouse in the upper left corner of that rectangle. Get the X, Y coordinates from the info tool.

"right, bottom" is another set of X, Y coordinates that you can get from the info tool. Then place the mouse in the lower right corner of that rectangle or square area. Get the X, Y coordinates from the info tool.

If you have trouble using an imaginary rectangle or square search area, use the visible one generated by the script that I pointed you to in this post. That script will write the PixelSearch line for you - it puts it into your Windows clipboard - you paste it into your script.

If you will let me know what is so hard about running/using that script, then I might be able to improve on how it works (unless it is just too much to read - I cannot help you there - I'm just too wordy at times). :-)

Even if you do not run/use the script that I pointed you to, at least attempt to read it since it there is some info about MouseCoordMode and PixelCoordMode that you need to learn about... and you should know about the different "Coord Mode" settings within the info tool - if you are going to go that route.

/hope this helps\


[size="1"][font="Arial"].[u].[/u][/font][/size]

Share this post


Link to post
Share on other sites

#9 ·  Posted (edited)

hello again guyz .... what i was looking for was the pixelsearch_splashscreen :)) thx u all for helping me

now i have a new problem that i have mentionated upper but no one see it :P) np :P lal

ok my problem is : (now is the point where u guyz say ... omg omfg fu** this noob BAAAAAAAANNNEEEEDDDD ) but i admit that i am noob ... but i am willing to TEECH :blink:) so .. we come back to the real world :wub:

my problem is : ... i have made a sound.mp3 with a text-to-speech program and save it like .mp3 .... and i have put in script SoundPlay ("location\sound.mp3) and it works ... but the thing is that u cant understand what that man talk's .... it hears so bad bad ....

what did i do wrong ?

2ND . problem ... : i wanna make a menu for the main script... with a background picture + this upper sound (3 .mp3 sounds ) how do i pack it into 1 .exe ?

my menu i have made it in another script ... how do i stick it with the pricipal script ? ( packing into .exe ... i think that u have to include in pack the sound's and the background picture no ?, i mean the .mp3 files and the .jpg picture !!! )

Edited by alinashul

Share this post


Link to post
Share on other sites

i have made a sound.mp3 with a text-to-speech program and save it like .mp3 .... and i have put in script SoundPlay ("location\sound.mp3) and it works ... but the thing is that u cant understand what that man talk's .... it hears so bad bad ....

Use that instead mp3 :

$Obj = ObjCreate("Sapi.SpVoice")
$Obj.Speak("Hello!")

2ND . problem ... : i wanna make a menu for the main script... with a background picture + this upper sound (3 .mp3 sounds ) how do i pack it into 1 .exe ?

my menu i have made it in another script ... how do i stick it with the pricipal script ? ( packing into .exe ... i think that u have to include in pack the sound's and the background picture no ?, i mean the .mp3 files and the .jpg picture !!! )

FileInstall

--------------------------------------------------------------------------------

Include and install a file with the compiled script.

FileInstall ( "source", "dest" [, flag] )

Parameters :

source : The source path of the file to compile. This must be a literal string; it cannot be a variable.

dest : The destination path of the file with trailing backslash if only the directory is used. This can be a variable.

flag [optional] : this flag determines whether to overwrite files if they already exist:

0 = (default) do not overwrite existing files

1 = overwrite existing files

Share this post


Link to post
Share on other sites

#11 ·  Posted (edited)

Jex if i do what u said there the script will speak ? like text-to-speech incorporated ?omg nice i will try it !!! EDIT : thx alot :)) it works :P)))) muhahahha

that

FileInstall ( "source", "dest" [, flag] )

it means for example ... i have the script with the name : buhahah and the sound with the name ... muhahah.mp3 picture with name imao.jpg

and i what to put the sound in the buhahah.au3 file i go : FileInstall ("dest of the .mp3 " , "dest where to compile them")

btw what is dest : cuz i cant understand :blink:)

Edited by alinashul

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