Jump to content

select part of the text


Recommended Posts

Try this:

If @OSArch = "X64" Then
    $au3dir = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\AutoIt v3\AutoIt", "InstallDir")
Else
    $au3dir = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\AutoIt v3\AutoIt", "InstallDir")
EndIf
$sFile = FileRead($au3dir & "\Examples\_ReadMe_.txt")
$sSearch = "installed."
$sLen = StringLen($sSearch) - 1
$sNew = StringLeft($sFile, StringInStr($sFile, $sSearch) + $sLen)
MsgBox(0, "New Text", "Before: " & @LF & $sFile & @LF & @LF & "After: " & @LF & $sNew)

It will load the _ReadMe_.txt from AutoIt\Examples dir, search for "installed." and copy the text from start until "installed.".

Br,

UEZ

Edited by UEZ

Please don't send me any personal message and ask for support! I will not reply!

Selection of finest graphical examples at Codepen.io

The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯  ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ

Link to comment
Share on other sites

Try this:

If @OSArch = "X64" Then
    $au3dir = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\AutoIt v3\AutoIt", "InstallDir")
Else
    $au3dir = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\AutoIt v3\AutoIt", "InstallDir")
EndIf
$sFile = FileRead($au3dir & "\Examples\_ReadMe_.txt")
$sSearch = "installed."
$sLen = StringLen($sSearch) - 1
$sNew = StringLeft($sFile, StringInStr($sFile, $sSearch) + $sLen)
MsgBox(0, "New Text", "Before: " & @LF & $sFile & @LF & @LF & "After: " & @LF & $sNew)

It will load the _ReadMe_.txt from AutoIt\Examples dir, search for "installed." and copy the text from start until "installed.".

Br,

UEZ

thanks very much

that was a lot of help

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...