GersonSevero Posted March 8, 2015 Share Posted March 8, 2015 Sorry if the question it's so easy, but i'm learning recently how AutoIt works =) In my script, I need to show a GUI for the user, after the user insert a number, and then I need to save that number in a variable to use, for example, write that number in a notepad. I'm waiting for answer. Thanks Link to comment Share on other sites More sharing options...
Developers Jos Posted March 8, 2015 Developers Share Posted March 8, 2015 (edited) and then I need to save that number in a variable to use, for example, write that number in a notepad. GuiCtrlRead() should do that, so show what you have that isn't working. Jos Edited March 8, 2015 by Jos 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...
GersonSevero Posted March 8, 2015 Author Share Posted March 8, 2015 GuiCtrlRead() should do that, so show what you have that isn't working. Jos This is an example of my problem. The number that the user inserts, need to be write in the notepad MsgBox(0, "Teste", "Programa de Automação de Simulações") Run("notepad.exe") $Name = InputBox(Default, "Insira o Módulo de Resiliência[1]: MPa", "","", Default, Default, Default, Default, 10) =) Link to comment Share on other sites More sharing options...
water Posted March 8, 2015 Share Posted March 8, 2015 Why do you need to write the number to Notepad? Couldn't you simply write the number into a file and then call Notepad to display the file? My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
GersonSevero Posted March 8, 2015 Author Share Posted March 8, 2015 Why do you need to write the number to Notepad? Couldn't you simply write the number into a file and then call Notepad to display the file? In fact, I have to imput that number in another program used in civil engineering, but the value have to be the number that the user inserts =) I thought to create this imput box, and after the user insert that number, write that number in the program, using MouseClick informing coordinates etc. I really apreciate your answer, you will help me to make my completion of course work. =) Link to comment Share on other sites More sharing options...
Solution water Posted March 8, 2015 Solution Share Posted March 8, 2015 More reliable than to use MouseClick is to use ControlSend. This is not always possible so you should run the AutoIt Window Info tool to see if it returns any information about the control in the other program. My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
GersonSevero Posted March 8, 2015 Author Share Posted March 8, 2015 More reliable than to use MouseClick is to use ControlSend. This is not always possible so you should run the AutoIt Window Info tool to see if it returns any information about the control in the other program. Thanks, you help me a lot. 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