Sign in to follow this  
Followers 0
bigassmuffin

Simle help with list GUI

8 posts in this topic

#1 ·  Posted (edited)

I have a script

#include <GuiConstants.au3>

Opt("WinTitleMatchMode",2)
WinWaitActive("[Conquer2.0]")

$game = 0
HotKeySet("+q", "Play")
HotKeySet("{ESC}", "quit")

$My_GUI = GuiCreate("MyGUI", 320, 342,-1, -1 , BitOR($WS_OVERLAPPEDWINDOW, $WS_CLIPSIBLINGS))


GUICreate("GUI", 320, 342)

$List_17 = GuiCtrlCreateList("", 50, 250, 50, 58.5)
GUICtrlSetData(-1,"90%|80%|70%|60%|50%|40%|30%|20%|10%|.X.", ".X.")

GuiSetState()


While 1
    $msg = GuiGetMsg()
    Select
        Case $msg = $GUI_EVENT_CLOSE
            Exit
    EndSelect
Func Play()
    If $game < 1 Then
        $game = $game + 1
    Else
        $game = 0
    EndIf
EndFunc

Func quit()
    Exit
EndFunc

How can I get it to be if I select 20%, it will play this functions...

; - 20%  :P
        If $game = 1 then
            $coord1 = PixelSearch( 37, 693, 37, 693, $color5, 1, 40)
            If IsArray($coord1) = 1 Then
                Send ("{F1}")
                Sleep(3000)
            EndIf
        Endif
    EndIf

And if I select 30%, it will play this

; - 30%
        If $game = 1 then
            $coord1 = PixelSearch( 37, 700, 37, 700, $color6, 1, 40)
            If IsArray($coord1) = 1 Then
                Send ("{F1}")
                Sleep(3000)
            EndIf
        Endif
    EndIf
    

    
WEnd

And so frht, obviously after i get one or two parts of thism I can figure out rest on own..

THANKS!

Edited by bigassmuffin

Share this post


Link to post
Share on other sites



Make a button or hotkey that you want set for when you are going to do a pixelsearch.

Then use GuiCtrlRead($List_17). Setup a series of If statements to check if it is "%20", "%30" or whatever, and if it is.. do the corresponding series of commands.


AutoIt Scripts:Aimbot: Proof of Concept - PixelSearching Aimbot with several search/autoshoot/lock-on techniques.Sliding Toolbar - Add a nice Sliding Toolbar to your next script. Click the link to see an animation of it in action!FontInfo UDF - Get list of system fonts, or search to see if a particular font is installed.Get Extended Property UDF - Retrieve a files extended properties (e.g., video/image dimensions, file version, bitrate of song/video, etc)

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

Have you tried:

If $game = 1 And GUICtrlRead($List_17) = "20%" Then
?

P.S.

While 1
    $msg = GuiGetMsg()
    Select
        Case $msg = $GUI_EVENT_CLOSE
            Exit
    EndSelect
Func Play()
    If $game < 1 Then
        $game = $game + 1
    Else
        $game = 0
    EndIf
EndFunc
Where is the WEnd? Did you delete alot of stuff before you submitted this? You do know you can't have a function inside another function right? Edited by SmOke_N

[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

Make a button or hotkey that you want set for when you are going to do a pixelsearch.

Then use GuiCtrlRead($List_17). Setup a series of If statements to check if it is "%20", "%30" or whatever, and if it is.. do the corresponding series of commands.

tym, ill try this now

Share this post


Link to post
Share on other sites

Have you tried:

If $game = 1 And GUICtrlRead($List_17) = "20%" Then
?

P.S.

While 1
    $msg = GuiGetMsg()
    Select
        Case $msg = $GUI_EVENT_CLOSE
            Exit
    EndSelect
Func Play()
    If $game < 1 Then
        $game = $game + 1
    Else
        $game = 0
    EndIf
EndFunc
Where is the WEnd? Did you delete alot of stuff before you submitted this? You do know you can't have a function inside another function right?

the script is past 800 lines, so no point of me posting it all ...

Share this post


Link to post
Share on other sites

the script is past 800 lines, so no point of me posting it all ...

I agree, but wouldn't it make sense to make a working example? Or is that the person that helps you job?

[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

Now I have for the list part:

; - 20%  :P
    If GUICtrlRead($List_17) = "20%" Then
        If $game = 1 then
            $coord1 = PixelSearch( 37, 693, 37, 693, $color5, 1, 80)
            If IsArray($coord1) = 1 Then
                Send ("{F1}")
                Sleep(3000)
            EndIf
        Endif
    EndIf
    
; - 30%
    If GUICtrlRead($List_17) = "30%" Then
        If $game = 1 then
            $coord1 = PixelSearch( 37, 700, 37, 700, $color6, 1, 80)
            If IsArray($coord1) = 1 Then
                Send ("{F1}")
                Sleep(3000)
            EndIf
        Endif
    EndIf

This does not work and everything seems right, maybe Im missing something?

Any help???

Share this post


Link to post
Share on other sites

Sorry for reeat, but I gotta bump this..

Help is APPRECIATED ALOT!

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