Sign in to follow this  
Followers 0
phinney

GUICtrlCreateInput Help

3 posts in this topic

#1 ·  Posted (edited)

This is the third Post im making here asking for help(and each time the help I recieved worked and solved the problem, so if anyone who helped me before is reading this, thank you again)

The program I'm writting works fine up until the point it asks you which page you want to start on on a usersearch on the site vampirefreaks.

the code below is the function im using:

Func pagestart()
    Local $page1, $btn, $msg, $pagestart1

    $pagestart1 = GUICreate("Select what page to start on:", 200, 60)
    $pagestart1 = GUISetStyle($WS_THICKFRAME)
    $page1 = GUICtrlCreateInput("1", 0, 0, 200, 20)
    $btn = GUICtrlCreateButton("Ok", 65, 20, 60, 20)

    GUISetState()

    $msg = 0
    While $msg <> $GUI_EVENT_CLOSE
        $msg = GUIGetMsg()
        Select
            Case $msg = $btn
                $page = $page1
            ExitLoop
        EndSelect
    WEnd
    GUIDelete()
EndFunc

$oIE = _IECreate ("http://search.vampirefreaks.com/search_results.php?pg="&$page&"&sex="&$gender&"&search_city=&search_state=&search_state2=&search_country=&range=10&zipcode=&min_age=&max_age=&sexuality=0&sortby="&$sortby&"&only_pics=1&invite=cult&invite_to=Vocal_Violence")

$page is what needs to be changed to whatever the person inputs into the GUI

as you can see $page1 is the variable associated with the input box, and when you click the "ok" button i have $page = $page1

I've written in message boxes to test it by displaying the value of $page.

If i chose 8 for example, and pressed "ok" then a message box would pop up and display the number 8, so i know $page gets changed to 8.

However, when the webpage opens up it will ALWAYS go to page 3, no matter what number i put into the input field.

If i place a message box after it opens up the webpage to view the value of $page it still returns a value of 8.

So how would I go about making it so it would go to the page that the user specifies?

Edited by phinney

Share this post


Link to post
Share on other sites



$page1 is going to be the control ID of the input and not the data inside it.

Tyr using $page = GuiCtrlRead($page1)

This will get the data from control ID $page1 instead of returning the control ID number.

Share this post


Link to post
Share on other sites

thank you for the fast responce!

and that worked out perfectly!! thank you very much!

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