[Asm] 纯文本查看 复制代码
#include <String.au3>
#include <String.au3>
#include <Array.au3>
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
Opt("GUIOnEventMode", 1)
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 943, 508, 192, 124)
GUISetOnEvent($GUI_EVENT_CLOSE, "Form1Close")
$Edit1 = GUICtrlCreateEdit("", 10, 20, 255, 479)
$Input1 = GUICtrlCreateInput("1", 290, 50, 121, 21)
$Input2 = GUICtrlCreateInput("3", 290, 110, 121, 21)
$Button1 = GUICtrlCreateButton("Button1", 320, 170, 75, 25)
GUICtrlSetOnEvent(-1, "Button1Click")
$Edit2 = GUICtrlCreateEdit("", 450, 20, 275, 479)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
Sleep(100)
WEnd
Func Button1Click()
$b = StringRegExp(GUICtrlRead($Edit1), '\V+', 3)
$D = ''
For $i = 0 To UBound($b) - 1
$a = _StringBetweentemp($b[$i], GUICtrlRead($Input1), GUICtrlRead($Input2))
If $a <> '' Then
$D &= $a & @CRLF
Else
$D &= $b[$i] & @CRLF
EndIf
Next
GUICtrlSetData($Edit2, $D)
EndFunc ;==>Button1Click
Func Form1Close()
Exit
EndFunc ;==>Form1Close
Func _StringBetweentemp($a, $b, $C)
$textarray = StringSplit($a, '')
_ArrayDelete($textarray, 0)
$iKeyIndex = _ArraySearch($textarray, $b)
$text = ''
If Not [url=home.php?mod=space&uid=209627]@Error[/url] Then
For $i = 0 To $iKeyIndex
_ArrayDelete($textarray, 0)
Next
$iKeyIndex1 = _ArraySearch($textarray, $C)
If Not @error Then
If $iKeyIndex1 > 0 Then
For $j = 0 To $iKeyIndex1 - 1
$text &= $textarray[$j]
Next
Else
$text1 = $textarray[0]
_ArrayDelete($textarray, 0)
$iKeyIndex2 = _ArraySearch($textarray, $C)
If Not @error Then
$text &= $text1
For $j = 0 To $iKeyIndex2 - 1
$text &= $textarray[$j]
Next
EndIf
EndIf
EndIf
EndIf
Return $text
EndFunc ;==>_StringBetweentemp