Jump to content



Photo

Getting first letter of text


  • Please log in to reply
6 replies to this topic

#1 Daywap

Daywap

    Seeker

  • Active Members
  • 34 posts

Posted 02 April 2012 - 11:30 AM

I have notepad with random text in it (1line).
I need to get first letter from first word and make it to variable.
How to do it?





#2 Melba23

Melba23

    Yes, me!

  • Moderators
  • 15,374 posts

Posted 02 April 2012 - 11:31 AM

Daywap,

What have you tried that did not work? :oops:

M23
StringSize - Automatically size controls to fit text - ExtMsgBox - A user customisable replacement for MsgBox

Toast - Small GUIs which pop out of the Systray - Marquee - Scrolling tickertape GUIs

Scrollbars - Automatically sized scrollbars with a single command - GUIFrame - Subdivide GUIs into many adjustable frames

GUIExtender - Extend and retract multiple sections within a GUI - NoFocusLines - Remove the dotted focus lines from buttons, sliders, radios and checkboxes

ChooseFileFolder - Single and multiple selections from specified path tree structure - - Notify - Small notifications on the edge of the display

RecFileListToArray - An alternative to _FileListToArray with user-defined include/exclude masks, maximum recursion level, sorting and displayed path options

GUIListViewEx - Insert, delete, move, drag and sort ListView items


#3 Daywap

Daywap

    Seeker

  • Active Members
  • 34 posts

Posted 02 April 2012 - 11:32 AM

I have no idea from where to start. I searched for like 2 hours with no luck.

#4 water

water

    ?

  • MVPs
  • 10,693 posts

Posted 02 April 2012 - 11:44 AM

Hint: Try the AutoIt Window Info tool to geht the control ID of the text area and then use ControlGetText.

UDFs:

Active Directory (2012-10-12 - Version 1.3.0.0 released) - Download - General Help & Support - Example Scripts - Wiki

OutlookEX (2012-10-07 - Version 0.9.0.0 released) - Download - General Help & Support - Example Scripts - Wiki

ExcelChart (2013-01-21 - Version 0.3.1.1 released) - Download - General Help & Support - Example Scripts

WordEX (2012-12-29 - Version 1.3 released) - Download

ExcelEX (2013-05-11 - Alpha 4 released) - Download


#5 somdcomputerguy

somdcomputerguy

  • Active Members
  • PipPipPipPipPipPip
  • 2,383 posts

Posted 02 April 2012 - 01:07 PM

This function, StringSplit, can be used also.
- Bruce /* somdcomputerguy */If you change the way you look at things, the things you look at change.

#6 AlmarM

AlmarM

    Programming my way.

  • Active Members
  • PipPipPipPipPipPip
  • 1,642 posts

Posted 03 April 2012 - 07:48 AM

StringLeft could be interesting here.

#7 MKISH

MKISH

    EXAM Time...

  • Active Members
  • PipPipPipPipPipPip
  • 534 posts

Posted 03 April 2012 - 08:29 AM

As AlmarM suggested, use as:

$FILECONTENTS = FileRead("yourTextfile.txt") Global $VARIABLE = StringLeft($FILECONTENTS, 1)


Hope I can be of some help.

Get DROPBOX - simplify your life...

:::::Dear LOL and Hmmmm... thank you for always being there, when I have nothing else to say... - great words by the author of this post:::::





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users