Jump to content

I need some help im new :(


Guest BANG!
 Share

Recommended Posts

Guest BANG!

hi every1, im new to this forum because i got a problem with something i try to do.

1. im french so sorry for my english

now let's see what's my problem, here is my script(the beggening)

#include <GUIConstants.au3>

GUICreate("ZeusMax Tactics Arena Freewin Bot version 1.0", 500, 500,)


GUICtrlCreatePic ("zeusmax.jpg", 109, 136, 200, 195)
GUICtrlCreatePic ("zeusmax3.jpg", 135, 14, 350, 30)

GUICtrlCreateGroup ("Server", 8, 14, 130, 105)
$radio_1 = GUICtrlCreateRadio ("Great Lakes", 15, 35, 100, 20)
$radio_2 = GUICtrlCreateRadio ("Banff", 15, 55, 100, 20)
$radio_3 = GUICtrlCreateRadio ("Armageddon", 15, 75, 100, 20)
$radio_4 = GUICtrlCreateRadio ("Revolution", 15, 95, 100, 20)


GUICtrlCreateGroup ("Floor", 8, 130, 90, 205)
$radio_5 = GUICtrlCreateRadio ("Floor 1", 15, 146, 70, 20)
$radio_6 = GUICtrlCreateRadio ("Floor 2", 15, 166, 70, 20)
$radio_7 = GUICtrlCreateRadio ("Floor 3", 15, 186, 70, 20)
$radio_8 = GUICtrlCreateRadio ("Floor 4", 15, 206, 70, 20)
$radio_9 = GUICtrlCreateRadio ("Floor 5", 15, 226, 70, 20)
$radio_10 = GUICtrlCreateRadio ("Floor 6", 15, 246, 70, 20)
$radio_11 = GUICtrlCreateRadio ("Floor 7", 15, 266, 70, 20)
$radio_12 = GUICtrlCreateRadio ("Floor 8", 15, 286, 70, 20)
$radio_13 = GUICtrlCreateRadio ("Floor 9", 15, 306, 70, 20)


GUICtrlCreateGroup ("Game emplacement", 8, 346, 200, 111)
$radio_14 = GUICtrlCreateRadio ("1", 15, 362, 23, 20)
$radio_15 = GUICtrlCreateRadio ("2", 15, 392, 23, 20)
$radio_16 = GUICtrlCreateRadio ("3", 15, 422, 23, 20)
$radio_17 = GUICtrlCreateRadio ("4", 50, 362, 23, 20)
$radio_18 = GUICtrlCreateRadio ("5", 50, 392, 23, 20)
$radio_19 = GUICtrlCreateRadio ("6", 50, 422, 23, 20)
$radio_20 = GUICtrlCreateRadio ("7", 85, 362, 23, 20)
$radio_21 = GUICtrlCreateRadio ("8", 85, 392, 23, 20)
$radio_22 = GUICtrlCreateRadio ("9", 85, 422, 23, 20)
$radio_23 = GUICtrlCreateRadio ("10", 120, 362, 28, 20)
$radio_24 = GUICtrlCreateRadio ("11", 120, 392, 28, 20)
$radio_25 = GUICtrlCreateRadio ("12", 120, 422, 28, 20)
$radio_26 = GUICtrlCreateRadio ("13", 155, 362, 28, 20)
$radio_27 = GUICtrlCreateRadio ("14", 155, 392, 28, 20)

GUICtrlCreateGroup ("Account Name", 219, 346, 150, 50)

$file_1 = GUICtrlCreateInput ( "Account Name Here", 230,  366, 120, 20)

GUICtrlCreateGroup ("Password", 219, 407, 150, 50)

$file_2 = GUICtrlCreateInput ( "Password Here", 230,  427, 120, 20)

GUICtrlCreateGroup ("Bot Action", 380, 346, 90, 64)
$radio_28 = GUICtrlCreateRadio ("Win", 391, 366, 70, 20)
$radio_29 = GUICtrlCreateRadio ("Lose", 391, 386, 70, 20)

$Button_1 = GUICtrlCreateButton ("Start Bot",  435, 470)

GuiSetState()
While 1
    $MSG = GUIGetMsg()
    $MSG = $GUI_EVENT_CLOSE
         
    If $MSG = $Button_1 Then
        Sleep(4500)
        MouseClick("left", 510, 372, 1, 1)
        Sleep(1000)

         If GuiCtrlRead($Radio_1) = 1 Then
                MouseClick("left", 123, 372, 1, 1)
         Else
            If GuiCtrlRead($Radio_2) = 1 Then
        MouseClick("left", 678, 372, 1, 1)
wend
GUIDelete()

the part with the WHILE 1 d'ont work.. i have a problem, i dont know how to use what the guy chose between some radio, here is what i want:

1. After the Sleep(1000), if the guy choose the radio_1, then mouseclick somewhere, and if he choose radio_2 then click at another place and so on... can you help me please!!! THX!!!!!!!!

Link to comment
Share on other sites

1. After the Sleep(1000), if the guy choose the radio_1, then mouseclick somewhere, and if he choose radio_2 then click at another place and so on... can you help me please!!! THX!!!!!!!!

<{POST_SNAPBACK}>

Is this what you want?

While 1
    $MSG = GUIGetMsg()
    If $MSG = $GUI_EVENT_CLOSE Then
        Exit
    EndIf
         
    If $MSG = $Button_1 Then
       ;Sleep(4500)
        MouseClick("left", 510, 372, 1, 1)
       ;Sleep(1000)
        If GuiCtrlRead($Radio_1) = 1 Then
            MouseClick("left", 123, 372, 1, 1)
            MsgBox(0, "1", "Radio_1");Debug
        ElseIf GuiCtrlRead($Radio_2) = 1 Then
            MouseClick("left", 678, 372, 1, 1)
            MsgBox(0, "2", "Radio_2");Debug
        EndIf
    EndIf
wend

Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl

MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model

Automate input type=file (Related)

Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded  Better Better?

IE.au3 issues with Vista - Workarounds

SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y

Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead?

Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble

Link to comment
Share on other sites

Guest BANG!

MAN THX A LOT!!! can i ask you something else???

im doing this bot for a flash game on the internet, and i think there's an option like

winwaitactive but with pixel color behind the mouse is that right?? cause i want the bot wait the page change on the flash game change before it is doing the action??

thx again man!

Link to comment
Share on other sites

winwaitactive but with pixel color behind the mouse is that right?? cause i want the bot wait the page change on the flash game change before it is doing the action??

<{POST_SNAPBACK}>

I don't understand what you are asking for, but you may want to check out MouseGetPos and PixelGetColor and perhaps WinGetPos. You can also sample across a rectangular range of pixels with PixelChecksum. Search for Pixel in the help file for all of the related functions.

Dale

Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl

MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model

Automate input type=file (Related)

Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded  Better Better?

IE.au3 issues with Vista - Workarounds

SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y

Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead?

Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble

Link to comment
Share on other sites

Guest BANG!

I don't understand what you are asking for, but you may want to check out MouseGetPos and PixelGetColor and perhaps WinGetPos.  You can also sample across a rectangular range of pixels with PixelChecksum.  Search for Pixel in the help file for all of the related functions.

Dale

<{POST_SNAPBACK}>

yea i found that:

If PixelSearch(796, 499, 798, 501, 0xFFFFFF) = 1 then

but... i dont know how to use it... i want that:

Send("{ENTER}")

Send("{ENTERDOWN}")

If PixelSearch(796, 499, 798, 501, 0xFFFFFF) = 1 then ; but its not working, can u tell me how to use it??

Send("{ENTERUP}")

Link to comment
Share on other sites

Please read the documentation more carefully and try some of the samples. All I'm doing is cleaning up syntax for you and pointing out what is clearly in the help file function reference.

Send("{ENTER}")
Send("{ENTER DOWN}")
$coord = PixelSearch(796, 499, 798, 501, 0xFFFFFF)
If @error = 1 then
    ConsoleWrite("Not Found")
Else
    ConsoleWrite($coord[0] & ", " & $coord[1])
EndIf
Send("{ENTER UP}")
Edited by DaleHohm

Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl

MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model

Automate input type=file (Related)

Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded  Better Better?

IE.au3 issues with Vista - Workarounds

SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y

Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead?

Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble

Link to comment
Share on other sites

Guest BANG!

man i dont understand the file help, do u understand what i want to do with the pixel search??

edit: ok i got it:

sleep(2500)
    $coord = PixelSearch(867, 368, 869, 370, 0xFFFFFF)
    If @error = 1 then
            ConsoleWrite("Not Found")
    Else
            Send("{ENTER UP}")
        MouseClick("left", 509, 354, 2, 1)
    EndIf

but if the pixel is not found, is there a command to resend ENTER until the pixel is found?

Edited by BANG!
Link to comment
Share on other sites

You're right, I really have no idea what you are trying to accomplish. I'll guess this may be what you are looking for... this is just basic looping and flow control. This will send an ENTER DOWN, check your pixel range for the value you requested, if not found will send an ENTER UP, loop back to the top and repeat starting with the ENTER DOWN. If pixel value is found will send an ENTER UP, do the MouseClick, set $Found to 1 and exit the loop.

$Found = 0
While $Found = 0
    Send("{ENTER DOWN}")
    Sleep(2500)
    $coord = PixelSearch(867, 368, 869, 370, 0xFFFFFF)
    If @error = 0 then;Pixel was found
            Send("{ENTER UP}")
            MouseClick("left", 509, 354, 2, 1)
            $Found = 1;On this condition we exit the While Loop
    Else;Pixel NOT found
            Send("{ENTER UP}") 
    EndIf
Wend

Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl

MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model

Automate input type=file (Related)

Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded  Better Better?

IE.au3 issues with Vista - Workarounds

SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y

Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead?

Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble

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...