k66any Posted August 17, 2010 Posted August 17, 2010 Hi All, I am new to the Autoit software and just trying to find my feet. I am using this toolset to automate creation of systems web bases, AS400 and AD LAN creates. One of the systems requires a users initals of there name (Tom Jones) so would require TJ to be extracted from a guictrl input box and just been reading through the forum which usually gives me the answers but cant find anything. Can someone point me in the right direction $Firstname = GUIctrlcreateInput("", 388,275,130,20) $Surname = GUIctrlcreateInput("", 388,275,130,20) i presume its a guictrlread but that only gives me the users full name not the initals Thanks peeps
water Posted August 17, 2010 Posted August 17, 2010 (edited) Hi All, I am new to the Autoit software and just trying to find my feet. I am using this toolset to automate creation of systems web bases, AS400 and AD LAN creates. One of the systems requires a users initals of there name (Tom Jones) so would require TJ to be extracted from a guictrl input box and just been reading through the forum which usually gives me the answers but cant find anything. Can someone point me in the right direction $Firstname = GUIctrlcreateInput("", 388,275,130,20) $Surname = GUIctrlcreateInput("", 388,275,130,20) i presume its a guictrlread but that only gives me the users full name not the initals Thanks peeps Quite simple: $sFirstname = GUICtrlread($Firstname) $sSurname = GUICtrlRead($Surname) $sInitials = Stringleft($sFirstname,1) & Stringleft($sSurname,1) BTW: You have to change the coords of $Surname in the GUI otherwise you overlay $Firstname. Edited August 17, 2010 by water 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
k66any Posted August 17, 2010 Author Posted August 17, 2010 $sFirstname = GUICtrlread($Firstname)$sSurname = GUICtrlRead($Surname)$sInitials = Stringleft($sFirstname,1) & Stringleft($sSurname,1)WOW!!! how fast -------- Cheers Water much appreciated
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