GersonSevero Posted March 8, 2015 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
Developers Jos Posted March 8, 2015 Developers 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.
GersonSevero Posted March 8, 2015 Author 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) =)
water Posted March 8, 2015 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 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki
GersonSevero Posted March 8, 2015 Author 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. =)
Solution water Posted March 8, 2015 Solution 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 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki
GersonSevero Posted March 8, 2015 Author 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.
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