Jump to content

Search the Community

Showing results for tags 'stringleft'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General
    • Announcements and Site News
    • Administration
  • AutoIt v3
    • AutoIt Help and Support
    • AutoIt Technical Discussion
    • AutoIt Example Scripts
  • Scripting and Development
    • Developer General Discussion
    • Language Specific Discussion
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Categories

  • AutoIt Team
    • Beta
    • MVP
  • AutoIt
    • Automation
    • Databases and web connections
    • Data compression
    • Encryption and hash
    • Games
    • GUI Additions
    • Hardware
    • Information gathering
    • Internet protocol suite
    • Maths
    • Media
    • PDF
    • Security
    • Social Media and other Website API
    • Windows
  • Scripting and Development
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Location


WWW


Interests

Found 3 results

  1. Hello, I have a problem with getting first 10 characters with a big txt file, about 50k lines. I only want 10 characters of each line and save it into another file. I tried to use Stringleft every line and save it into another file but it was really slow to do it. I tried to save it into a variation like $var=$var&stringleft($file,10)&@CRLF. It's faster but still really slow. Can anybody help me with this Thank you so much
  2. May I know how to copy the first 10 characters in excel and paste it in the file explorer textbox? How to do? I know that you show use the StringLeft() function but I am not sure how to do. Please help me. Thank you!
  3. Hello good friends of Autoit, so I am making a chatbot using Autoit but I got stuck on this part: I already have stringright($var,stringlen($var) - stringlen(" = ") - StringInStr($var," = ") + 1) the program is made to read a text file and extract from a specific line the text after = and before =, for example: example line of text file: something = okay this is a text and I needed to extract the right part (which I already have done) and the left part (which I need help with) so how can you make stringleft to get all text before "="? Thanks in advance. Here's my code if you need it: #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <File.au3> #include <Misc.au3> #Include <Array.au3> Global $BrainLocation = @ScriptDir & "\brain.txt" Global $FormName = "Project Lisa" Global $ReatInput = "null" Global $Memory[100] Global $BrainLineCount = 1 Global $Random[100] Global $RandomCount = 0 Global $SplitInput[100] Global $BrainCount = 0 Loader() Func Loader() Global $Form = GUICreate($FormName, 417, 279, 192, 124) Global $Output = GUICtrlCreateEdit("", 8, 8, 401, 225, BitOR($ES_AUTOVSCROLL,$ES_AUTOHSCROLL,$ES_WANTRETURN,$WS_HSCROLL),0) Global $Input = GUICtrlCreateInput("", 104, 240, 209, 21) GUISetState(@SW_SHOW) ControlFocus($FormName,"",$input) HotKeySet("{ENTER}","SendText") Main() EndFunc func Main() While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd EndFunc Func SendText() $ReatInput = GUICtrlRead($Input) GUICtrlSetData($Output,@CRLF & "You > " & $ReatInput,1) CreateRandoms() EndFunc Func CreateRandoms() While $RandomCount <> 100 $Random[$RandomCount] = Random(1,$RandomCount,1) $RandomCount += 1 WEnd $RandomCount = 0 BrainLoader() EndFunc Func BrainLoader() $ReatBrain = FileReadLine($Brainlocation,$BrainLineCount) $BrainStringRight = stringright($ReatBrain,stringlen($ReatBrain) - stringlen(" = ") - StringInStr($ReatBrain," = ") + 1) MsgBox(0,"",$Brainstringright) $BrainStringLenRight = Stringlen($brainstringright) MsgBox(0,"",$Brainstringright) $BrainActualString = 0 + $BrainStringLenRight - 10 MsgBox(0,"",$BrainActualString) $test = StringLeft($ReatBrain,$brainactualstring) MsgBox(0,"",$test) $BrainSplitedStrings = StringSplit($BrainStringRight,",") If $BrainSplitedStrings[1] <> "" Then $_1 = "true" $BrainCount += 1 EndIf If $ReatInput = $BrainActualString Then $BrainRan = Random(1,$braincount) GUICtrlSetData($output,@CRLF & "Lisa > " & $BrainSplitedStrings[$BrainRan],1) $BrainLineCount = 1 Main() Else main() EndIf $BrainLineCount += 1 BrainLoader() EndFunc
×
×
  • Create New...