AC130 Posted May 26, 2011 Share Posted May 26, 2011 (edited) Nevermind... Edited May 28, 2011 by AC130 Link to comment Share on other sites More sharing options...
ahmet Posted May 26, 2011 Share Posted May 26, 2011 (edited) GUIctrlCreateInput returns ID of input control. To get value from input control use GUICtrlRead() . Edited May 26, 2011 by ahmet Link to comment Share on other sites More sharing options...
BrewManNH Posted May 26, 2011 Share Posted May 26, 2011 WinSetTitle($wincurtitle, "", GUICtrlRead($ChangeWindowTitle)) If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag GudeHow to ask questions the smart way! I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from. Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays. - ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script. - Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label. - _FileGetProperty - Retrieve the properties of a file - SciTE Toolbar - A toolbar demo for use with the SciTE editor - GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI. - Latin Square password generator Link to comment Share on other sites More sharing options...
smartee Posted May 26, 2011 Share Posted May 26, 2011 hi AC130 , With respect to the password thing, try this:$Input1 = GUICtrlCreateInput("Input1", 10, 10, 100, 21, BitOR($ES_CENTER, $ES_PASSWORD, $ES_AUTOHSCROLL)) -smartee Link to comment Share on other sites More sharing options...
ahmet Posted May 26, 2011 Share Posted May 26, 2011 If you want to reset the window title store the last title in a variable and then use WinSeTitle($last_title,"","Calculator") or you can use class of window in first parameter. Link to comment Share on other sites More sharing options...
BrewManNH Posted May 26, 2011 Share Posted May 26, 2011 If you changed the window title to something, your script would have to know what it was changed to. You need to store the new name in a variable before you change it, then look for that title when you want to change it again. If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag GudeHow to ask questions the smart way! I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from. Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays. - ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script. - Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label. - _FileGetProperty - Retrieve the properties of a file - SciTE Toolbar - A toolbar demo for use with the SciTE editor - GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI. - Latin Square password generator Link to comment Share on other sites More sharing options...
smartee Posted May 26, 2011 Share Posted May 26, 2011 Try this: Opt("MouseCoordMode", 2) ;1=absolute, 0=relative, 2=client Link to comment Share on other sites More sharing options...
smartee Posted May 26, 2011 Share Posted May 26, 2011 Not to clear on your question but here's a quick example of how to store and retrieve some control data #include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <String.au3> $ini = @ScriptDir & "\data.ini" $section = "controls" $defaultInput1 = IniRead($ini, $section, "$Input1", "") If $defaultInput1 <> "" Then $defaultInput1 = _HexToString($defaultInput1) $defaultEdit1 = IniRead($ini, $section, "$Edit1", "") If $defaultEdit1 <> "" Then $defaultEdit1 = _HexToString($defaultEdit1) #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Demo 1", 242, 170) $Input1 = GUICtrlCreateInput($defaultInput1, 12, 12, 217, 21) $Edit1 = GUICtrlCreateEdit($defaultEdit1, 12, 48, 217, 73) $Button1 = GUICtrlCreateButton("Save", 12, 132, 73, 25, $WS_GROUP) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Button1 IniWrite($ini, $section, "$Input1", _StringToHex(GUICtrlRead($Input1))) IniWrite($ini, $section, "$Edit1", _StringToHex(GUICtrlRead($Edit1))) EndSwitch WEnd Hope this helps -smartee Link to comment Share on other sites More sharing options...
BrewManNH Posted May 26, 2011 Share Posted May 26, 2011 AC130, have you EVER read the help files? That's automation 101 as far as the Send command goes. Read the help file before posting such a basic question, and you will probably never have to ask it. If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag GudeHow to ask questions the smart way! I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from. Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays. - ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script. - Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label. - _FileGetProperty - Retrieve the properties of a file - SciTE Toolbar - A toolbar demo for use with the SciTE editor - GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI. - Latin Square password generator Link to comment Share on other sites More sharing options...
smartee Posted May 26, 2011 Share Posted May 26, 2011 hi again AC130 , AC130, have you EVER read the help files? That's automation 101 as far as the Send command goes. Read the help file before posting such a basic question, and you will probably never have to ask it. Umm, a bit straight up, but he's right '!' This tells AutoIt to send an ALT keystroke, therefore Send("This is text!a") would send the keys "This is text" and then press "ALT+a". N.B. Some programs are very choosy about capital letters and ALT keys, i.e. "!A" is different to "!a". The first says ALT+SHIFT+A, the second is ALT+a. If in doubt, use lowercase! '+' This tells AutoIt to send a SHIFT keystroke, therefore Send("Hell+o") would send the text "HellO". Send("!+a") would send "ALT+SHIFT+a". '^' This tells AutoIt to send a CONTROL keystroke, therefore Send("^!a") would send "CTRL+ALT+a".hmm, perhaps this is more like it? If it isn't please explain a bit more, and show your attempts #include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Demo2", 254, 183, 211, 169) $Input1 = GUICtrlCreateInput("", 12, 12, 229, 21) $Button1 = GUICtrlCreateButton("-> Edit", 144, 36, 97, 25, $WS_GROUP) $Edit1 = GUICtrlCreateEdit("", 12, 72, 229, 97) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Button1 GUICtrlSetData($Edit1, GUICtrlRead($Input1)) EndSwitch WEnd Hope this helps -smartee Link to comment Share on other sites More sharing options...
BrewManNH Posted May 27, 2011 Share Posted May 27, 2011 Don't bump your posts until at least 24 hours has passed, it's very bad forum ettiquette. Also, please stop asking questions without at least trying to read the help file. It's plainly obvious that you are just trolling for someone to write the script for you and you're not helping do hardly any of the work yourself. Try searching the forums here, there's at least 1000 examples of how to do what you're asking. Please at least attempt to pretend you're doing some of the work yourself. If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag GudeHow to ask questions the smart way! I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from. Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays. - ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script. - Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label. - _FileGetProperty - Retrieve the properties of a file - SciTE Toolbar - A toolbar demo for use with the SciTE editor - GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI. - Latin Square password generator Link to comment Share on other sites More sharing options...
Developers Jos Posted May 27, 2011 Developers Share Posted May 27, 2011 Hmm does anyone know how to save to edit box? I tried but still no success. I got everything else working though. When are you going to learn to post the code you have tried and isn't working and QUIT bumping threads without showing any effort?Believe we have been over this before...right? SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
autouser2011 Posted May 28, 2011 Share Posted May 28, 2011 I tried but still no success,and my friend too Link to comment Share on other sites More sharing options...
Developers Jos Posted May 28, 2011 Developers Share Posted May 28, 2011 I tried but still no success,and my friend tooCome again? First post doesn't match with this statement. SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. 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