butji Posted April 8, 2007 Posted April 8, 2007 ok what ever i write in GUICtrlCreateInput the value allways is 4... why? if you dont understand ask. #include <GUIConstants.au3> GUICreate( "butji's msoft iexplorer title changer" ) GUISetState (@SW_SHOW) $string = GUICtrlCreateButton( "Create string", 10,10) $name = GUICtrlCreateInput( "", 100, 10, 100) While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case $msg = $string RegWrite( "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main", "Window Title", "REG_SZ", $name) EndSelect Wend
xcal Posted April 8, 2007 Posted April 8, 2007 $name is just the id of the control. You need to use GUICtrlRead() to get the text. How To Ask Questions The Smart Way
BrettF Posted April 8, 2007 Posted April 8, 2007 xcal said: $name is just the id of the control. You need to use GUICtrlRead() to get the text. So thats like this: #include <GUIConstants.au3> GUICreate( "butji's msoft iexplorer title changer" ) ;Creates the GUI $string = GUICtrlCreateButton( "Create string", 10,10) ;Creates the button $name = GUICtrlCreateInput( "", 100, 10, 100) ; Creates the input GUISetState (@SW_SHOW) ; Shows the GUI should probably be Here.... While 1 ;While Loop $msg = GUIGetMsg() ;Gets msgs from the GUI Select Case $msg = $GUI_EVENT_CLOSE ; If the exit button is pressed on the GUI, then close. ExitLoop ;Exit the Loop Case $msg = $string $NewName = GUICtrlRead ($name);Reads the input box's data RegWrite( "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main", "Window Title", "REG_SZ", $NewName);Sets the title EndSelect Wend Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version!
xcal Posted April 8, 2007 Posted April 8, 2007 butji said: @xcal u is teh proPro at reading the help file, maybe. How To Ask Questions The Smart Way
BrettF Posted April 8, 2007 Posted April 8, 2007 xcal said: Pro at reading the help file, maybe. heheheh... lol Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version!
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