Jump to content

Even more questions =D


Recommended Posts

Mmk, I (kinda) mashed together two sample codes that Jasio and PsaltyDS had shown me, and then edited a little bit of it.

Here's my script right now:

HotKeySet("{END}", "TogglePause")
HotKeySet("{PAUSE}", "ToggleResume")
$Paused = 1
While 1
    Sleep(100)
WEnd
Func TogglePause()
    $Paused = 0
    While $Paused = 0
        
        Send("e")
        MouseClick ("right")
    ;Waiting a second for the animation to finish and make the color available on-screen
        Sleep(1000)
    ;Looking for the right color...
        $aPixel = PixelSearch( 374, 206, 658, 440, 0x484848 )
    ;Color found, now to click it...
If @error Then
     MsgBox(16, "Error", "Can't find the TP.")
 Else
     
     MouseClick("Left", $aPixel[0], $aPixel[1])
EndIf
    ;Can't take this part out, or I get an error.
        Sleep(10000)
    ;^
    WEnd
EndFunc
Func ToggleResume()
    $Paused = 1
EndFunc

Basically, what it does is perform everything up to finding the color correctly and then either clicks somewhere kinda near the color or doesn't get anywhere close. Is there something wrong with the way that's set up?

I should probably note that the thing I'm clicking is constantly animated, although the color is always available.

For anyone who cares, it's actually an app for a video game (Diablo II) that opens a 'portal' to town and then clicks it automatically with one keystroke - useful for avoiding Player Killers and massive latency.

Any help in fixing what I've got above would be great =D

Some unrelated questions -

How is it that people post the code along with color in their [*CODE] boxes?

What do the blue X's under someone's forum name mean?

I've searched the AutoIt help (Although usually very helpful) for 'Array', and only got a few not-so-helpful topics. Where's all the information about what an Array is? Should I research it somewhere else?

Link to comment
Share on other sites

Some unrelated questions -

How is it that people post the code along with color in their [*CODE] boxes?

What do the blue X's under someone's forum name mean?

I've searched the AutoIt help (Although usually very helpful) for 'Array', and only got a few not-so-helpful topics. Where's all the information about what an Array is? Should I research it somewhere else?

Color in code boxes:

Use AutoIt tags or simply click on button on toolbar.

Blue X's: It is level of users. It goes like this:

If you have less than 10 posts, you are newbie.

More than ten means you are member.

More that 100 means you are advanced member

More than 200 means you are spammer

More than 300 means you are mass spamer

Arrays: Arrays are seperated places in variable, as:

Dim $array[3] = ["I am first place", "I am place too"]
MsgBox(64,$array[1],$array[2])

i542

Edit: Code update

Edited by i542

I can do signature me.

Link to comment
Share on other sites

Arrays: Arrays are seperated places in variable, as:

Aha, I see. I'll have to look at that a little more...

So in order to specify that it's AutoIt code, I'd need to type this without the *'s:

[*CODE=AutoIt];Code here[/*CODE]

?

Still need help on my other question, if someone's willing =p

Edited by Wrench
Link to comment
Share on other sites

Aha, I see. I'll have to look at that a little more...

So in order to specify that it's AutoIt code, I'd need to type this without the *'s:

[*CODE=AutoIt];Code here[/*CODE]

?

Still need help on my other question, if someone's willing =p

No, no... You need write this without stars (*):

[autoit*] ;code here [/autoit*]

i542

I can do signature me.

Link to comment
Share on other sites

Hi,

have a look here http://www.autoitscript.com/forum/index.ph...c=29062&hl=

These are the code tags .

 

So long,

Mega

Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Link to comment
Share on other sites

Hi,

:whistle: what problem do you still have?

So long,

Mega

Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Link to comment
Share on other sites

Basically, what it does is perform everything up to finding the color correctly and then either clicks somewhere kinda near the color or doesn't get anywhere close

:whistle:

Here's my script in easier-to-read, newly learned, color format:

HotKeySet("{END}", "TogglePause")
HotKeySet("{PAUSE}", "ToggleResume")
$Paused = 1
While 1
    Sleep(100)
WEnd
Func TogglePause()
    $Paused = 0
    While $Paused = 0
        
        Send("e")
        MouseClick ("right")
    ;Waiting a second for the animation to finish and make the color available on-screen
        Sleep(1000)
    ;Looking for the right color...
        $aPixel = PixelSearch( 374, 206, 658, 440, 0x484848 )
    ;Color found, now to click it...
If @error Then
     MsgBox(16, "Error", "Can't find the TP.")
Else
    
     MouseClick("Left", $aPixel[0], $aPixel[1])
EndIf
    ;Can't take this part out, or I get an error.
        Sleep(10000)
    ;^
    WEnd
EndFunc
Func ToggleResume()
    $Paused = 1
EndFunc

Any idea why it won't click the color?

I must have something screwed up in there x_x

Link to comment
Share on other sites

$Pixel = PixelGetColor ( x, y )
msgbox (0, "color", "the color is: " + $Pixel)

i dont no what your x and y are or else i would put it there for you.

use this 2 get the true color u want..

you color is wroung.. i no what u did.. u got the color from the autoitinfo.. it dont work. use want i said then it will tell u what color is there. then change the color value

Link to comment
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
 Share

  • Recently Browsing   0 members

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