Jump to content
Sign in to follow this  

Need some GUI help and will PayPal $50 to whoever can do this

Recommended Posts


Howdy all,

First off let me say I LOVE AutoIt, I can't imagine my life without it! But I am not a GUI guy, and I am pressed for time, so I have a proposal for anyone willing to help me out. If you can make what I need I'll send you $50 via PayPal (or mail if you prefer).

The script I am trying to get would do the following:

A) Open a GUI that would have a drop-down menu that is populated with the names of clients. I actually have this done already but there are two things about it I would like to change. #1 is, it has an odd behavior now in that I can select a name from the drop-down menu, but afterwards I cannot click on the Submit button; I have to TAB to the Submit button, then I can click it or hit Enter. I would like to be able to just hit Enter while focused on the drop-down menu or at least be able to mouse-click on the Submit button without having to TAB off the drop-down menu. #2 is, I want to be able to call the function to add a new client from the GUI. So if I open the GUI and the client isn't in the drop-down list, I'd like to either have the first option in the drop-down list say "Add a new client" that when selected and submitted would recreate the GUI with a text box where the client's name could be entered OR just have a text box somewhere on the GUI the whole time that would have the same effect. It would be good to have a confirmation pop-up that allows the user to start over when entering a new client name in case someone mistypes the name. Here is the function as it sits right now:

Func _clientMenu($aFiltered)
Local $dlr
Local $GUIWidth = 470, $GUIHeight = 300
$trmi = GUICreate(" Select Dealer:", $GUIWidth, $GUIHeight, -1, -1, BitOR($WS_CAPTION, $WS_SYSMENU), BitOR($WS_EX_TOPMOST, $DS_SETFOREGROUND))
$hCombo = GUICtrlCreateCombo("", 10, 10, 200, 20)
$hLabel = GUICtrlCreateLabel("", 10, 50, 200, 200)
$OK_Btn = GUICtrlCreateButton("Submit", 35, 45, 100, 20)
$aFiltered[0] = "Add new dealer"

    For $i = 0 To UBound($aFiltered) -1
        $aSplit = StringSplit($aFiltered[$i], "|")
        $sList &= $aSplit[1] & "|"

    GUICtrlSetData($hCombo, $sList)
    GUISetState(@SW_SHOW, $trmi)
    $sCurrSel = ""

    While 1
        $msg = GUIGetMsg()
            Case $msg = $GUI_EVENT_CLOSE
            Case $msg = $OK_Btn
                If GUICtrlRead($hCombo) <> $sCurrSel Then
                    $sCurrSel = GUICtrlRead($hCombo)

                    If $sCurrSel = $aFiltered[0] Then
                        Return -1
                        Return $sCurrSel

B ) When the client's name is selected or created and I hit Enter, I would like it to verify that a particular file exists. The file would be "C:\Autotron\CLIENTS\[the client's name]\Advertisements\Service\Ad_Campaigns_Available [the client's name].xlsx" where of course [the client's name] is replaced with...the client's name lol. If the file exists, then there should be three buttons available to click on: "Print Letters", "Send Emails", and "Run Ad List". There should also be three other buttons setup with return values but the buttons should either be grayed-out or not visible. Those three buttons should be "FUTURE", "FUTURE", "FUTURE".

If either the "Print Letters" or "Send Emails" button was clicked, a pop-up would need to appear asking for the quantity to print/send. The value would be no more than 4 digits in length. It would be good to have a confirmation pop-up that says...



...and allows the user to start over or Submit.

Clicking on the Submit button would Return an array where [1] would be the button's task value (1 to Print Letters, 2 to Send Emails, 3 to Run Ad List, etc.), [2] would be the client's name, and [3] would be the quantity to run (if applicable or else just blank)

For "Print Letters" or "Send Emails", the return value would be:

$array[1] = [task value]

$array[2] = [client name]

$array[3] = [quantity]

For "Run Ad List" and the "FUTURE" options, the return value would be:

$array[1] = [task value]

$array[2] = [client name]

$array[3] = ""

C) If "C:\Autotron\CLIENTS\[the client's name]\Advertisements\Service\Ad_Campaigns_Available [the client's name].xlsx" does NOT exist, either the "Print Letters" and "Send Emails" buttons should be grayed out or not shown, or if left as selectable, then a pop-up should come up saying that the option is unavailable because file: "C:\Autotron\CLIENTS\[the client's name]\Advertisements\Service\Ad_Campaigns_Available [the client's name].xlsx" could not be found.

D) The future buttons are just placeholders for future options and can be grayed out or not shown but should still be set to return values so I can use them later with less potential for me screwing it up.

That's it. If this sounds like something any of you would be interested in doing, I would be hugely appreciative!

Share this post

Link to post
Share on other sites

Don't do this in the support forum. You might try the Chat forum, or see the Rent-A-Coder link in my sig.


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post

Link to post
Share on other sites

Don't do this in the support forum. You might try the Chat forum, or see the Rent-A-Coder link in my sig.


Thanks Psalty, I think that link is just what I needed!

EDIT: Could you close this one? I think posting it in Chat may give me better results and I don't want to have 2 threads open for the same thing.

Edited by drapdv

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