ericg32 Posted October 12, 2007 Share Posted October 12, 2007 WHen I have the following: $user = GUICtrlCreateInput ("User Name", 10, 10, 60, 20) $radio1 = GUICtrlCreateRadio ("Data Tracking", 10, 40, 120, 20) $radio2 = GUICtrlCreateRadio ("User Profile ", 10, 70, 120, 20) I get the following ---------------- ___________ |__________| Data Tracking 0 User Profile X (box filleed in) Where is the text for the INPUT ? Shouldn;'t User Name be displayed >? Link to comment Share on other sites More sharing options...
aslani Posted October 12, 2007 Share Posted October 12, 2007 You might have other things going on in your code that changes the value of $user. [font="Georgia"]Chances are, I'm wrong.[/font]HotKey trouble?Stringregexp GuideAutoIT Current Version Link to comment Share on other sites More sharing options...
ericg32 Posted October 12, 2007 Author Share Posted October 12, 2007 Sometimes it's hard to be clear.. I get the box to enter the value for "USer Name" but I don't get the text "User Name" next to it..so the user knows what to enter. I DO see "Dta Tracking" and "User Profile: on the left side of the radio buttons. Link to comment Share on other sites More sharing options...
ericg32 Posted October 13, 2007 Author Share Posted October 13, 2007 If it helps.. here is the entire code.. #include <GUIConstants.au3> $CFile = FileOpen ( "c:\autoit\config.fil", 0 ) $Username = FileReadLine($CFile) $PW = FileReadline($CFile) FileClose($CFile) $TODO = 0 GUICreate("Get RUN Info") ; will create a dialog box that when displayed is centered $user = GUICtrlCreateInput ("User Number", 10, 10, 60, 20) $radio1 = GUICtrlCreateRadio ("Data Tracking", 10, 40, 120, 20) $radio2 = GUICtrlCreateRadio ("User Profile ", 10, 70, 120, 20) GUICtrlSetState ($radio1, $GUI_CHECKED) GUISetState () ; will display a dialog box with 1 checkbox ; Run the GUI until the dialog is closed While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE Exit Case $msg = $radio1 And BitAND(GUICtrlRead($radio1), $GUI_CHECKED) = $GUI_CHECKED $TODO = 1 $userno = GUICtrlRead($user) ExitLoop Case $msg = $radio2 And BitAND(GUICtrlRead($radio2), $GUI_CHECKED) = $GUI_CHECKED $TODO = 2 $userno = GUICtrlRead($user) ExitLoop EndSelect Wend GUIDelete() run ("C:\Program Files\Internet Explorer\IEXPLORE.EXE mysite") sleep(1000) opt("WinTitleMatchMode",2) WinWaitActive("Interchange Services") sleep(1000) send($Username) send("{tab}") send($PW) send("{enter}") SLEEP(2000) IF $TODO = 1 Then Mouseclick("left",9,227) mouseclick("left",38,271) EndIf IF $TODO = 2 Then mouseclick("left",9,291) MouseClick("LEFT",47,316) EndIf sleep(1000) send($userno) SEND("{ENTER}") Link to comment Share on other sites More sharing options...
aslani Posted October 13, 2007 Share Posted October 13, 2007 I see the "User Number" inside the input box, so... [font="Georgia"]Chances are, I'm wrong.[/font]HotKey trouble?Stringregexp GuideAutoIT Current Version Link to comment Share on other sites More sharing options...
Nahuel Posted October 13, 2007 Share Posted October 13, 2007 (edited) GUICtrlCreateInput("Text",left,top...)It won't show "User Name" by the inputbox, it will show it inside the inputbox.Use labels.expandcollapse popup#include <GUIConstants.au3> $CFile = FileOpen ( "c:\autoit\config.fil", 0 ) $Username = FileReadLine($CFile) $PW = FileReadline($CFile) FileClose($CFile) $TODO = 0 GUICreate("Get RUN Info") ; will create a dialog box that when displayed is centered GUICtrlCreateLabel("User Name", 10, 10, 60, 20) $user = GUICtrlCreateInput ("", 70, 10, 60, 20) $radio1 = GUICtrlCreateRadio ("Data Tracking", 10, 40, 120, 20) $radio2 = GUICtrlCreateRadio ("User Profile ", 10, 70, 120, 20) GUICtrlSetState ($radio1, $GUI_CHECKED) GUISetState () ; will display a dialog box with 1 checkbox ; Run the GUI until the dialog is closed While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE Exit Case $msg = $radio1 And BitAND(GUICtrlRead($radio1), $GUI_CHECKED) = $GUI_CHECKED $TODO = 1 $userno = GUICtrlRead($user) ExitLoop Case $msg = $radio2 And BitAND(GUICtrlRead($radio2), $GUI_CHECKED) = $GUI_CHECKED $TODO = 2 $userno = GUICtrlRead($user) ExitLoop EndSelect Wend GUIDelete() run ("C:\Program Files\Internet Explorer\IEXPLORE.EXE mysite") sleep(1000) opt("WinTitleMatchMode",2) WinWaitActive("Interchange Services") sleep(1000) send($Username) send("{tab}") send($PW) send("{enter}") SLEEP(2000) IF $TODO = 1 Then Mouseclick("left",9,227) mouseclick("left",38,271) EndIf IF $TODO = 2 Then mouseclick("left",9,291) MouseClick("LEFT",47,316) EndIf sleep(1000) send($userno) SEND("{ENTER}") Edited October 13, 2007 by Nahuel Link to comment Share on other sites More sharing options...
aslani Posted October 13, 2007 Share Posted October 13, 2007 Oh, he wants to label the input box. Sorry for not so helpful, didn't get what you wanted to do. [font="Georgia"]Chances are, I'm wrong.[/font]HotKey trouble?Stringregexp GuideAutoIT Current Version Link to comment Share on other sites More sharing options...
ericg32 Posted October 13, 2007 Author Share Posted October 13, 2007 Always the simple things. I searched for a lot of words... "labels" didn't come to mind. THNX Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now