Jump to content
Sign in to follow this  
k66any

User initals from input box

Recommended Posts

k66any

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

Share this post


Link to post
Share on other sites
water

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 by water

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (2018-06-01 - Version 1.4.9.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2018-09-01 - Version 1.3.4.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Share this post


Link to post
Share on other sites
k66any

$sFirstname = GUICtrlread($Firstname)

$sSurname = GUICtrlRead($Surname)

$sInitials = Stringleft($sFirstname,1) & Stringleft($sSurname,1)

WOW!!! how fast -------- Cheers Water much appreciated

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×