Sign in to follow this  
Followers 0
strate

Eliminate Parts of a File

22 posts in this topic

#1 ·  Posted (edited)

I'm not sure how to state this but here we go....

I've almost finished creating a script that will eliminate most of my job. In my position I take data out of a program and place it back into the same program until I get all of the info I need.

Our production schedule is sorted by work centers. My script displays each work center in a different tab. Attached is the file that I need help with. The file is our production schedule. If I was to have been printed out each work center would have started on a new page. This is also how I want the tabs. So for instance all of the pages that are "APKG" are on the "APKG" tab. For instance, here is the APKG work center:

reworp04.p b+                                   18.4.8 Work Center Dispatch Report                                 Date: 08/16/06
Page:   1                                           KELSEY-HAYES COMPANY PROD                                      Time: 15:31:45

Site: 12       Work Center: APKG     Machine:         Packaging at Auburn

Start   Due Date Item Number        Description               Op T ID          Open Qty Std Setup  Std Run Time St
-------- -------- ------------------ ------------------------ ------ - -------- ------------ --------- ------------- --
08/06/06 08/06/06 148054             CALIPER - LH                10 S 3274780         14.0     0.0      0.3332
                                     05102107AA  AB  MY03
08/09/06 08/09/06 142915             BRAKE BOOSTER              10 S 3276071           2.0     0.0      0.0476
                                     05080887AA  DR  MYO02
08/09/06 08/09/06 165325             ECU - EBC340                10 S 3277337         25.0     0.0       1.075
                                     68003754AB  DH  MYO07
reworp04.p b+                                   18.4.8 Work Center Dispatch Report                                 Date: 08/16/06
Page:   2                                           KELSEY-HAYES COMPANY PROD                                      Time: 15:31:45

Site: 12       Work Center: APKG     Machine:         Packaging at Auburn

Start   Due Date Item Number        Description               Op T ID          Open Qty Std Setup  Std Run Time St
-------- -------- ------------------ ------------------------ ------ - -------- ------------ --------- ------------- --
08/15/06 08/15/06 143676             ECU - EBC325                10 S 3281191          3.0     0.0      0.0714
                                     05080587AD  DN  MYO02
08/15/06 08/15/06 144889             ECU - EBC325                10 S 3281957          8.0     0.0      0.1904
                                     05017757AE  BR2  MYO02
08/15/06 08/15/06 15398809         ECU - EBC340              10 S 3281451         12.0     0.0       0.516
                                     6C3Z2C219DC  P131  MYO06
reworp04.p b+                                   18.4.8 Work Center Dispatch Report                                 Date: 08/16/06
Page:   3                                           KELSEY-HAYES COMPANY PROD                                      Time: 15:31:45

Site: 12       Work Center: APKG     Machine:         Packaging at Auburn

Start   Due Date Item Number        Description               Op T ID          Open Qty Std Setup  Std Run Time St
-------- -------- ------------------ ------------------------ ------ - -------- ------------ --------- ------------- --
08/15/06 08/15/06 157709             CONTROL ARM                  10 S 3279897        25.0     0.0       0.595
                                     6L1Z5A649AA  U222  MYO06
08/15/06 08/15/06 157992             KNUCKLE - LH                10 S 3279898         25.0     0.0       0.925
                                     5C2Z3106AA  VN127
08/15/06 08/15/06 157993             KNUCKLE - RH                10 S 3279899         11.0     0.0       0.407
                                     5C2Z3105AA  VN127
reworp04.p b+                                   18.4.8 Work Center Dispatch Report                                 Date: 08/16/06
Page:   4                                           KELSEY-HAYES COMPANY PROD                                      Time: 15:31:45

Site: 12       Work Center: APKG     Machine:         Packaging at Auburn

Start   Due Date Item Number        Description               Op T ID          Open Qty Std Setup  Std Run Time St
-------- -------- ------------------ ------------------------ ------ - -------- ------------ --------- ------------- --
08/16/06 08/16/06 143627             ECU - EBC325                10 S 3280144          6.0     0.0      0.1428
                                     88982298  T  MY02
08/16/06 08/16/06 143652             WHEEL CYLINDER - 13/16"      10 S 3281425       197.0     0.0      4.6886
                                     05093236AA  RS  MY02
08/16/06 08/16/06 145012             ECU - EBC325                10 S 3281678         30.0     0.0       0.714
                                     88982200  K30  MY02

I need it to look like:

08/06/06 08/06/06 148054             CALIPER - LH                10 S 3274780         14.0     0.0      0.3332
                                     05102107AA  AB  MY03
08/09/06 08/09/06 142915             BRAKE BOOSTER              10 S 3276071           2.0     0.0      0.0476
                                     05080887AA  DR  MYO02
08/09/06 08/09/06 165325             ECU - EBC340                10 S 3277337         25.0     0.0       1.075
                                     68003754AB  DH  MYO07
08/10/06 08/10/06 161695             HUB/BRG KIT - FRONT          10 S 3279122       108.0     0.0      2.5704
                                     6C3Z1104BA  P131  MYO06
08/11/06 08/11/06 13143103         ROTOR                        10 S 3280170         380.0     0.0       9.044
                                     JBR574
08/13/06 08/13/06 131165             PISTON                    10 S 3278368       44.0     0.0      1.0472
                                     F75Z2194BA
08/13/06 08/13/06 136140             ECU - EBC325                10 S 3279629         24.0     0.0      0.5712
                                     YL1Z2C065AA  UN93/173
08/13/06 08/13/06 148054             CALIPER - LH                10 S 3279398          6.0     0.0      0.1428
                                     05102107AA  AB  MY03
08/13/06 08/13/06 163758             CALIPER - 54MM LH REAR    10 S 3279934       55.0     0.0       1.309
                                     5C3Z2553B  P131  MYO06
08/14/06 08/14/06 135498             ECU - EBC2                10 S 3281177       10.0     0.0       0.238
                                     05015525AA  BR1  MYO01
08/14/06 08/14/06 151072             SENSOR - LH FRONT 2WD      10 S 3279643          61.0     0.0      1.4518
                                     F81Z2C205AD  P131  MY004
08/14/06 08/14/06 15397009         ECU - EBC340              10 S 3279676         40.0     0.0        1.48
                                     6C3Z2C219AC  P131  MYO06
08/14/06 08/14/06 157251             BALL JOINT - UPPER        10 S 3278387    3,424.0     0.0     20.8864
                                     5C2Z3049AA  F150  MYO06
08/14/06 08/14/06 161135             BOOSTER ASSEMBLY            10 S 3280950          1.0     0.0      0.0238
                                     05183870AA  DR  MYO07
08/14/06 08/14/06 161136             BOOSTER ASSY see 161135      10 S 3280951        16.0     0.0      0.3808
                                     05183885AA  DR  MYO07
The script needs to know what section is what. How is this done?? Edited by strate

INI TreeViewA bus station is where a bus stops, a train station is where a train stops. Onmy desk I have a work station...

Share this post


Link to post
Share on other sites



I'm not sure how to state this but here we go....

I've almost finished creating a script that will eliminate most of my job. In my position I take data out of a program and place it back into the same program until I get all of the info I need.

Our production schedule is sorted by work centers. My script displays each work center in a different tab. Attached is the file that I need help with. The file is our production schedule. If I was to have been printed out each work center would have started on a new page. This is also how I want the tabs. So for instance all of the pages that are "APKG" are on the "APKG" tab. For instance, here is the APKG work center:

reworp04.p b+                                   18.4.8 Work Center Dispatch Report                                 Date: 08/16/06
Page:   1                                           KELSEY-HAYES COMPANY PROD                                      Time: 15:31:45

Site: 12       Work Center: APKG     Machine:         Packaging at Auburn

Start   Due Date Item Number        Description               Op T ID          Open Qty Std Setup  Std Run Time St
-------- -------- ------------------ ------------------------ ------ - -------- ------------ --------- ------------- --
08/06/06 08/06/06 148054             CALIPER - LH                10 S 3274780         14.0     0.0      0.3332
                                     05102107AA  AB  MY03
08/09/06 08/09/06 142915             BRAKE BOOSTER              10 S 3276071           2.0     0.0      0.0476
                                     05080887AA  DR  MYO02
08/09/06 08/09/06 165325             ECU - EBC340                10 S 3277337         25.0     0.0       1.075
                                     68003754AB  DH  MYO07
08/10/06 08/10/06 161695             HUB/BRG KIT - FRONT          10 S 3279122       108.0     0.0      2.5704
                                     6C3Z1104BA  P131  MYO06
08/11/06 08/11/06 13143103         ROTOR                        10 S 3280170         380.0     0.0       9.044
                                     JBR574
08/13/06 08/13/06 131165             PISTON                    10 S 3278368       44.0     0.0      1.0472
                                     F75Z2194BA
08/13/06 08/13/06 136140             ECU - EBC325                10 S 3279629         24.0     0.0      0.5712
                                     YL1Z2C065AA  UN93/173
08/13/06 08/13/06 148054             CALIPER - LH                10 S 3279398          6.0     0.0      0.1428
                                     05102107AA  AB  MY03

The script needs to know what section is what. How is this done??

Use a While loop with FileReadLine() to step through the file, and test each for StringInStr(), looking for "Work Center: ". You can then extract the work center ID from that line and decide to continue or go to a new work center.

:P


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites

and be sure not to tell your boss, take a free ride :P

Share this post


Link to post
Share on other sites

I've been able to throw this together:

#include <File.au3>
#include <Array.au3>
#include <Date.au3>

Dim $NewArray = ''
Dim $ArrayTest = ''

FileCopy("C:\schedule.prn","C:\schedule.txt")



_FileReadToArray("C:\schedule.txt" , $ArrayTest)

;~ _ArrayDisplay($ArrayTest,'$NewArray')

Dim $WorkCenter[6]

$WorkCenter[1] = 'APKG'
$WorkCenter[2] = 'DOR'
$WorkCenter[3] = 'FOL'
$WorkCenter[4] = 'SUB '
$WorkCenter[5] = 'SUBASY'



Dim $Skip[6]

$Skip[1] = 'NO'
$Skip[2] = 'NO'
$Skip[3] = 'NO'
$Skip[4] = 'NO'
$Skip[5] = 'NO'


For $i = 1 To UBound($ArrayTest) - 1
    If StringInStr($ArrayTest[$i],'Work Center: ' & $WorkCenter[1]) Then
        If $Skip[1] <> 'YES' Then
            _ArrayAdd ( $NewArray, $WorkCenter[1] )
            If @error = 1 Then 
                $NewArray = _ArrayCreate ( $WorkCenter[1] )
            EndIf
            $Skip[1] = 'YES'
        EndIf
    EndIf
    
    If StringInStr($ArrayTest[$i],'Work Center: ' & $WorkCenter[2]) Then
        If $Skip[2] <> 'YES' Then
            _ArrayAdd ( $NewArray, $WorkCenter[2] )
            If @error = 1 Then 
                $NewArray = _ArrayCreate ( $WorkCenter[2] )
            EndIf
            $Skip[2] = 'YES'
        EndIf
    EndIf
    
    If StringInStr($ArrayTest[$i],'Work Center: ' & $WorkCenter[3]) Then
        If $Skip[3] <> 'YES' Then
            _ArrayAdd ( $NewArray, $WorkCenter[3] )
            If @error = 1 Then 
                $NewArray = _ArrayCreate ( $WorkCenter[3] )
            EndIf
            $Skip[3] = 'YES'
        EndIf
    EndIf
    
    If StringInStr($ArrayTest[$i],'Work Center: ' & $WorkCenter[4]) Then
        If $Skip[4] <> 'YES' Then
            _ArrayAdd ( $NewArray, $WorkCenter[4] )
            If @error = 1 Then 
                $NewArray = _ArrayCreate ( $WorkCenter[4] )
            EndIf
            $Skip[4] = 'YES'
        EndIf
    EndIf
    
    If StringInStr($ArrayTest[$i],'Work Center: ' & $WorkCenter[5]) Then
        If $Skip[5] <> 'YES' Then
            _ArrayAdd ( $NewArray, $WorkCenter[5] )
            If @error = 1 Then 
                $NewArray = _ArrayCreate ( $WorkCenter[5] )
            EndIf
            $Skip[5] = 'YES'
        EndIf
    EndIf
    
    
    $Month = StringLeft($ArrayTest[$i],2)
    $Day = StringMid($ArrayTest[$i],4,2)
    $Year = '20' & StringMid($ArrayTest[$i],7,2)
    
    If  _DateIsValid ($Year & '/' & $Month & '/' & $Day) = 1 Then
;~  If StringInStr($ArrayTest[$i],'/') Then
        _ArrayAdd ( $NewArray, $ArrayTest[$i] )
        If @error = 1 Then 
            $NewArray = _ArrayCreate ( $ArrayTest[$i] )
        EndIf
    EndIf
        
Next
_FileWriteFromArray('c:\new schedule.txt',$NewArray,0)  
;~ _ArrayDisplay($NewArray,'$NewArray')
How can I make it loop so that if I add another work center it will still work properly?


INI TreeViewA bus station is where a bus stops, a train station is where a train stops. Onmy desk I have a work station...

Share this post


Link to post
Share on other sites

call it as a function and you can do it over and over

***** Not Tested

#include <File.au3>
#include <Array.au3>
#include <Date.au3>





Func New_Text()
Dim $NewArray = ''
Dim $ArrayTest = ''

FileCopy("C:\schedule.prn","C:\schedule.txt")

_FileReadToArray("C:\schedule.txt" , $ArrayTest)

; _ArrayDisplay($ArrayTest,'$NewArray')

Dim $WorkCenter[6]

$WorkCenter[1] = 'APKG'
$WorkCenter[2] = 'DOR'
$WorkCenter[3] = 'FOL'
$WorkCenter[4] = 'SUB '
$WorkCenter[5] = 'SUBASY'

Dim $Skip[6]

$Skip[1] = 'NO'
$Skip[2] = 'NO'
$Skip[3] = 'NO'
$Skip[4] = 'NO'
$Skip[5] = 'NO'


For $x = 1 To UBound($ArrayTest) - 1
For $i = 1 To UBound($ArrayTest) - 1
    If StringInStr($ArrayTest[$i],'Work Center: ' & $WorkCenter[$x]) Then
        If $Skip[1] <> 'YES' Then
            _ArrayAdd ( $NewArray, $WorkCenter[$x] )
            If @error = 1 Then
                $NewArray = _ArrayCreate ( $WorkCenter[$x] )
            EndIf
            $Skip[1] = 'YES'
        EndIf
    EndIf
Next

    
    $Month = StringLeft($ArrayTest[$i],2)
    $Day = StringMid($ArrayTest[$i],4,2)
    $Year = '20' & StringMid($ArrayTest[$i],7,2)
    
    If    _DateIsValid ($Year & '/' & $Month & '/' & $Day) = 1 Then
;~     If StringInStr($ArrayTest[$i],'/') Then
        _ArrayAdd ( $NewArray, $ArrayTest[$i] )
        If @error = 1 Then
            $NewArray = _ArrayCreate ( $ArrayTest[$i] )
        EndIf
    EndIf
        
Next
_FileWriteFromArray('c:\new schedule.txt',$NewArray,0)    
;  _ArrayDisplay($NewArray,'$NewArray')

EndFunc

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

I tested yours and it combines everything under the each work center. I think the problem is watching for each new work center. Then how it handles when it finds a new one.

EDIT: This is why I cannot think of how to make a function out of it.

Edited by strate

INI TreeViewA bus station is where a bus stops, a train station is where a train stops. Onmy desk I have a work station...

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

maybe this should be

If StringInStr($ArrayTest[$i],'Work Center: ') And StringInStr($ArrayTest[$i],$WorkCenter[$x]) Then

8)

Edited by Valuater

NEWHeader1.png

Share this post


Link to post
Share on other sites

maybe this should be

If StringInStr($ArrayTest[$i],'Work Center: ') And StringInStr($ArrayTest[$i],$WorkCenter[$x]) Then

8)

Sorry, but how would that be any different?

INI TreeViewA bus station is where a bus stops, a train station is where a train stops. Onmy desk I have a work station...

Share this post


Link to post
Share on other sites

Sorry, but how would that be any different?

it was a suggestion in case of spacing or some other un-foreseen problem

we can try it reversed

For $x = 1 To UBound($ArrayTest) - 1
For $i = 1 To UBound($ArrayTest) - 1
    If StringInStr($ArrayTest[$x],'Work Center: ' & $WorkCenter[$i]) Then
        If $Skip[1] <> 'YES' Then
            _ArrayAdd ( $NewArray, $WorkCenter[$i] )
            If @error = 1 Then
                $NewArray = _ArrayCreate ( $WorkCenter[$i] )
            EndIf
            $Skip[1] = 'YES'
        EndIf
    EndIf
Next

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites

#10 ·  Posted (edited)

To answer my own topic I thought I'd post this, maybe someone, some day could use it

#include <File.au3>
#include <Array.au3>
#include <Date.au3>

Dim $NewArray = ''
Dim $ArrayTest = ''

FileCopy("C:\schedule.prn","C:\schedule.txt")

_FileReadToArray("C:\schedule.txt" , $ArrayTest)

;~ _ArrayDisplay($ArrayTest,'$NewArray')

Dim $WorkCenter[6]

$WorkCenter[1] = 'APKG'
$WorkCenter[2] = 'DOR'
$WorkCenter[3] = 'FOL'
$WorkCenter[4] = 'SUB '
$WorkCenter[5] = 'SUBASY'

Dim $Skip[6]

$Skip[1] = 'NO'
$Skip[2] = 'NO'
$Skip[3] = 'NO'
$Skip[4] = 'NO'
$Skip[5] = 'NO'

$WorkCenterNumber = 1
For $i = 1 To UBound($ArrayTest) - 1
    
    If $WorkCenterNumber < UBound($WorkCenter) Then
        If StringInStr($ArrayTest[$i],'Work Center: ' & $WorkCenter[$WorkCenterNumber]) Then
            If $Skip[$WorkCenterNumber] <> 'YES' Then
                _ArrayAdd ( $NewArray, $WorkCenter[$WorkCenterNumber] )
                If @error = 1 Then 
                    $NewArray = _ArrayCreate ( $WorkCenter[$WorkCenterNumber] )
                EndIf
                $Skip[$WorkCenterNumber] = 'YES'
                $WorkCenterNumber = $WorkCenterNumber + 1
            EndIf
        EndIf
    EndIf

    $Month = StringLeft($ArrayTest[$i],2)
    $Day = StringMid($ArrayTest[$i],4,2)
    $Year = '20' & StringMid($ArrayTest[$i],7,2)
    
    If  _DateIsValid ($Year & '/' & $Month & '/' & $Day) = 1 Then
        _ArrayAdd ( $NewArray, $ArrayTest[$i] )
        If @error = 1 Then 
            $NewArray = _ArrayCreate ( $ArrayTest[$i] )
        EndIf
    EndIf
Next
_FileWriteFromArray('c:\new schedule.txt',$NewArray,0)  
;~ _ArrayDisplay($NewArray,'$NewArray')

Edited by strate

INI TreeViewA bus station is where a bus stops, a train station is where a train stops. Onmy desk I have a work station...

Share this post


Link to post
Share on other sites

To answer my own topic I thought I'd post this, maybe someone, some day could use it

Good!!!

since you have been here longer than me.... Joined: 25-October 04

I didn't write your script... i was just trying to give you ideas

actually, it appears you knew what you were after..

that's Great!!

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites

#12 ·  Posted (edited)

Call me crazy, but that sure does look like a lot of work:

$FileLocation = @DesktopDir & '\KELSEY-HAYES.txt'
$OutFile = @DesktopDir & '\KELSEY-HAYES.log'
FileWrite($OutFile, _SplitCombineFile($FileLocation))
Run(@ComSpec & ' /c "' & $OutFile & '"', '', @SW_HIDE)

Func _SplitCombineFile($hFile)
    Local $aFile = StringSplit(StringStripCR(FileRead($hFile)), @LF)
    Local $sHold, $iCount, $hOutLog
    For $iCount = 1 To $aFile[0]
        If StringLeft($aFile[$iCount], 8) = '--------' Then
            While 1
                $iCount += 1
                If StringInStr($aFile[$iCount], 'Date: ') Then ExitLoop
                $sHold &= $aFile[$iCount] & @CRLF
                If $iCount = $aFile[0] Then ExitLoop
            WEnd
        EndIf
    Next
    Return StringTrimRight($sHold, StringLen(@CRLF))
EndFunc
This will compare the "BackUp" file to the "Current" file, if there is a change, it will keep the change ... parse it ... and add it to the regular oupt.log file.

Edited by SmOke_N

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Share this post


Link to post
Share on other sites

Good!!!

since you have been here longer than me.... Joined: 25-October 04

I didn't write your script... i was just trying to give you ideas

actually, it appears you knew what you were after..

that's Great!!

8)

Just because I've been here longer doesn't mean anything. Your much better at this than me.

INI TreeViewA bus station is where a bus stops, a train station is where a train stops. Onmy desk I have a work station...

Share this post


Link to post
Share on other sites

#14 ·  Posted (edited)

@Smoke

What I'm trying to do is set something up that can read in the schedule.txt and tell me which work center each of the production runs is.

I have another script that displays this back to me. In this, each work center has a GUI Tab, then on each tab is a GUI ListView. The listview displays each production run for the appropriate work center.

I'm not at work yet, but if visuals will help I can provide them. So far I think I have what I need it just needs cleaned up.

EDIT: Now I need to set it up so that when a work center that isn't in the list is "found" it treats it like the others.

Dim $WorkCenter[6]

$WorkCenter[1] = 'APKG'
$WorkCenter[2] = 'DOR'
$WorkCenter[3] = 'FOL'
$WorkCenter[4] = 'SUB '
$WorkCenter[5] = 'SUBASY'

Dim $Skip[UBound($WorkCenter)]
For $i = 1 To UBound($WorkCenter) - 1
    $Skip[$i] = 'NO'
Next

$WorkCenterNumber = 1
For $i = 1 To UBound($ArrayTest) - 1
    
    If $WorkCenterNumber < UBound($WorkCenter) Then
        If StringInStr($ArrayTest[$i],'Work Center: ' & $WorkCenter[$WorkCenterNumber]) Then
            If $Skip[$WorkCenterNumber] <> 'YES' Then
                _ArrayAdd ( $NewArray, $WorkCenter[$WorkCenterNumber] )
                If @error = 1 Then 
                    $NewArray = _ArrayCreate ( $WorkCenter[$WorkCenterNumber] )
                EndIf
                $Skip[$WorkCenterNumber] = 'YES'
                $WorkCenterNumber = $WorkCenterNumber + 1
            EndIf
        EndIf
    EndIf

    $Month = StringLeft($ArrayTest[$i],2)
    $Day = StringMid($ArrayTest[$i],4,2)
    $Year = '20' & StringMid($ArrayTest[$i],7,2)
    
    If _DateIsValid ($Year & '/' & $Month & '/' & $Day) = 1 Then
        _ArrayAdd ( $NewArray, $ArrayTest[$i] )
        If @error = 1 Then 
            $NewArray = _ArrayCreate ( $ArrayTest[$i] )
        EndIf
    EndIf
Next
_FileWriteFromArray('c:\new schedule.txt',$NewArray,0)  
;~ _ArrayDisplay($NewArray,'$NewArray')
Edited by strate

INI TreeViewA bus station is where a bus stops, a train station is where a train stops. Onmy desk I have a work station...

Share this post


Link to post
Share on other sites

You're trying to get all the other workstations, and add them to the array? If that's the case, I think you could just start off with the ones that are actually in the document you are reading.

This might work for you, it will quickly read the entire document and give you the workgroups already, if there's only 1 work group there's no sense in looping through 5 times, but if there are more, I'm sure you want them all.

$string = FileRead("C:\schedule.txt")
Dim $WorkCenter = _SRE_BetweenEX($string, 'Work Center:', 'Machine:'), 
If IsArray($aWC) Then
    For $i = 0 To UBound($aWC) - 1
        $WorkCenter[$i] = StringStripWS($WorkCenter[$i], 8)
    Next
EndIf

Func _SRE_BetweenEX($s_String, $s_Start, $s_End, $iCase = 'i')
    If $iCase <> 'i' Then $iCase = ''
    $a_Array = StringRegExp($s_String, '(?' & $iCase & _
                ':' & $s_Start & ')(.*?)(?' & $iCase & _
                ':' & $s_End & ')', 3)
    If @extended & IsArray($a_Array) Then Return $a_Array
    Return SetError(1, 0, 0)    
EndFunc

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Share this post


Link to post
Share on other sites

StringRegExp = Undeclared function, latest beta.


INI TreeViewA bus station is where a bus stops, a train station is where a train stops. Onmy desk I have a work station...

Share this post


Link to post
Share on other sites

StringRegExp = Undeclared function, latest beta.

StringRegExp was not included in the release of 3.2.0, as it still has minor bugs, however is still available from the 3.1.1+ beta

( its the same one )

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites

StringRegExp was not included in the release of 3.2.0, as it still has minor bugs, however is still available from the 3.1.1+ beta

( its the same one )

8)

I'm running beta .133 and it isn't in it.

INI TreeViewA bus station is where a bus stops, a train station is where a train stops. Onmy desk I have a work station...

Share this post


Link to post
Share on other sites

hmmm... i am using .131 and this worked

#include <array.au3>
$test = "Test passed on";
$matchArray = StringRegExp( $test, "(?i)(pass([a-z]?)+[. \-]+[a-z0-9]+)", 1 )
_ArrayDisplay($matchArray,"result")

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites

#20 ·  Posted (edited)

hmmm... i am using .131 and this worked

#include <array.au3>
$test = "Test passed on";
$matchArray = StringRegExp( $test, "(?i)(pass([a-z]?)+[. \-]+[a-z0-9]+)", 1 )
_ArrayDisplay($matchArray,"result")

8)

Figured it out, it's missing from my au3 check file.

EDIT: Could I get a link or something to the old check file?

Edited by strate

INI TreeViewA bus station is where a bus stops, a train station is where a train stops. Onmy desk I have a work station...

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  
Followers 0