Sign in to follow this  
Followers 0
bigassmuffin

Simple help with list GUI

3 posts in this topic

I posted this elseware... so here it is in the correct forum catagory ;P

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 forth, obviously after i get one or two parts of thism I can figure out rest on own..

THANKS!

Then after some help I got this for the list help...but it still does not work:

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

Any help?

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

You just bumped this thread http://www.autoitscript.com/forum/index.ph...ndpost&p=197884 there was no need to double post, more people read the "Support" site than the GUI site anyway, and the same people that can help you here, would help you there if they wanted to.

Edit:

And you still haven't created an example for people to test to help you... !!! :D

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

You just bumped this thread http://www.autoitscript.com/forum/index.ph...ndpost&p=197884 there was no need to double post, more people read the "Support" site than the GUI site anyway, and the same people that can help you here, would help you there if they wanted to.

Edit:

And you still haven't created an example for people to test to help you... !!! :D

well, I realized this was more of a GUI problem...

but all Im asking is a simple list command..

GUI creat list with list options  (Choice 1; Choice 2). . .

If List is Choice 1 Then
   Script

If List is Choice 2 Then
   Scipt

etc...

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