koenp

Extracting content for a text file

12 posts in this topic

Hello everybody,

I am currently working on a script where the goal is to  extract certain content out of a txt will and put this in a other file

EXAMPLE OF TXT FILE

CHU LIEGE                                                                               SART TILMAN - LIEGE
Name: ABC CDE                   Patient ID: 20120831
Sample ID: 200604003705              Sample Type:Serum                      Dilution Factor: 1
Priority: Routine                    Rack Position: QK000137-6              Completed On: 2013-06-05 15:35:54
Operator: C135669REGI                Instrument ID: DV330681                Aliquot Creation Time: 2013-06-05 14:40:37
Comment:
   Method           Result   Units   RefRange        Flag                Comment                          Reagent
   IGG3             0.389    g/L     0.11 - 0.85                                                          12292MA
   IGG4                              0.03 - 2.01     Below Assay Range                                    12324MA
   IGG2                              1.69 - 7.86     Below Assay Range                                    12310MA
   IGG4             0.009    g/L     0.03 - 2.01                         Diluted                          12324MA
                                                                         Below Reference
                                                                         Range
   IGG2             0.368    g/L     1.69 - 7.86                         Diluted                          12310MA
                                                                         Below Reference
                                                                         Range
NON-STANDARD CONFIGURATION                                                                   Printed 2013-06-05 15:35:57

I am only interested starting from line 9 (IGG3...)

My goal is to have following structure:
IGG3;0.389;g/L;0.11-.085;;;12292MA
IGG4;;;0.03-2.01;Below Assay Range;;12324MA
IGG2;;;1.69-7.86:Below Assasy Range;;12310MA
IGG4;.009;g/L;0.03-2.01;;Diluted;12324MA

Here is the code that I currently have created:

Global $SampleID = StringRegExp(FileRead($file), "Sample ID:" & '\s+(\S+)', 3)
Global $instr = StringRegExp(FileRead($file), "Instrument ID:" & '\s+(\S+)', 3)
Global $type = StringRegExp(FileRead($file), "Type:" & '\S+', 3)


Global $end = StringRegExp(FileRead($file), "Reagent" & '\s+(\S+)', 3)
Global $result1 = StringRegExp(FileRead($file), $end[0] & '\s+(\S+)', 3)
Global $unit1 = StringRegExp(FileRead($file), $result1[0] & '\s+(\S+)', 3)
Global $normals1a = StringRegExp(FileRead($file), $unit1[0] & '\n+', 3)
Global $normals1b = StringRegExp(FileRead($file), $normals1a[0] & '\s+(\S+)', 3)
Global $normals1c = StringRegExp(FileRead($file), $normals1b[0] & '\s+(\S+)', 3)

Local $hFileOpen = FileOpen($patientresult, $FO_APPEND)
    FileWriteLine($hFileOpen, $date & " ; " & $SampleID[0] & " ; " & $instr[0] & " ; " & $type[0] & " ; " & $end[0] & " ; " & $result1[0] & " ; " & $unit1[0] & $normals1a[0] & " ; " & $normals1b[0] & " ; " & @CRLF)
 FileClose($hFileOpen)

 

Can anybody help me with this or give me some advice how to complete this task?

 

Many thanks in advanced and for having a look in to it

 

 

 

Share this post


Link to post
Share on other sites



koenp,

My effort:

$sText = "CHU LIEGE                                                                               SART TILMAN - LIEGE" & @CRLF & _
        "Name: ABC CDE                   Patient ID: 20120831" & @CRLF & _
        "Sample ID: 200604003705              Sample Type:Serum                      Dilution Factor: 1" & @CRLF & _
        "Priority: Routine                    Rack Position: QK000137-6              Completed On: 2013-06-05 15:35:54" & @CRLF & _
        "Operator: C135669REGI                Instrument ID: DV330681                Aliquot Creation Time: 2013-06-05 14:40:37" & @CRLF & _
        "Comment:" & @CRLF & _
        "   Method           Result   Units   RefRange        Flag                Comment                          Reagent" & @CRLF & _
        "   IGG3             0.389    g/L     0.11 - 0.85                                                          12292MA" & @CRLF & _
        "   IGG4                              0.03 - 2.01     Below Assay Range                                    12324MA" & @CRLF & _
        "   IGG2                              1.69 - 7.86     Below Assay Range                                    12310MA" & @CRLF & _
        "   IGG4             0.009    g/L     0.03 - 2.01                         Diluted                          12324MA" & @CRLF & _
        "                                                                        Below Reference" & @CRLF & _
        "                                                                        Range" & @CRLF & _
        "   IGG2             0.368    g/L     1.69 - 7.86                         Diluted                          12310MA" & @CRLF & _
        "                                                                        Below Reference" & @CRLF & _
        "                                                                        Range" & @CRLF & _
        "NON-STANDARD CONFIGURATION                                                                   Printed 2013-06-05 15:35:57"

$aRet = StringRegExp($sText, "(IGG\d|\d\.\d{3}|\d.\d\d\s-\s\d\.\d\d|\d{5}MA)", 3)

$sRet = ""
For $i = 0 To UBound($aRet) - 1
    If StringInStr($aRet[$i], "IGG") Then
        $sRet &= $aRet[$i] & ";"
        $i += 1
        If Stringinstr($aRet[$i], "-") Then
            $sRet &= ";;" & $aRet[$i] & ";Below Assay Range;;"
            $i += 1
        Else
            $sRet &= $aRet[$i] & ";g/L;" & $aRet[$i + 1] & ";;;"
            $i += 2
        EndIf
        $sRet &= $aRet[$i] & @CRLF
    EndIf
Next

ConsoleWrite($sRet & @CRLF)

Now wait for real RegEx guru to do it in one line!

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites

Thanks a lot Melba23,

this looks very close to what I am looking for, just maybe some small adaptations:

The IGG (testcode)  is variable can be anything the same for the g/L (unit).

Is this possible to adapt?

for the rest this looks exactly what I am looking for

 

Many thanks for your effort !!

Koen

 

Share this post


Link to post
Share on other sites

koenp,

Quote

The IGG (testcode)  is variable can be anything the same for the g/L (unit).

Once again we find that example in the original question does not actually reflect the real world case - and so once again we waste time coming up with a solution which does not fit the actual requirement. Point taken?

A different approach is needed if there is no obvious pattern to some of the elements - perhaps this:

#include <Array.au3>
#include <StringConstants.au3>

$sText = "CHU LIEGE                                                                               SART TILMAN - LIEGE" & @CRLF & _
        "Name: ABC CDE                   Patient ID: 20120831" & @CRLF & _
        "Sample ID: 200604003705              Sample Type:Serum                      Dilution Factor: 1" & @CRLF & _
        "Priority: Routine                    Rack Position: QK000137-6              Completed On: 2013-06-05 15:35:54" & @CRLF & _
        "Operator: C135669REGI                Instrument ID: DV330681                Aliquot Creation Time: 2013-06-05 14:40:37" & @CRLF & _
        "Comment:" & @CRLF & _
        "   Method           Result   Units   RefRange        Flag                Comment                          Reagent" & @CRLF & _
        "   IGG3             0.389    g/L     0.11 - 0.85                                                          12292MA" & @CRLF & _
        "   Random                            0.03 - 2.01     Below Assay Range                                    12324MA" & @CRLF & _
        "   IGG2                              1.69 - 7.86     Below Assay Range                                    12310MA" & @CRLF & _
        "   ABC4             0.009    random  0.03 - 2.01                         Diluted                          12324MA" & @CRLF & _
        "                                                                        Below Reference" & @CRLF & _
        "                                                                        Range" & @CRLF & _
        "   IGG2             0.368    g/L     1.69 - 7.86                         Diluted                          12310MA" & @CRLF & _
        "                                                                        Below Reference" & @CRLF & _
        "                                                                        Range" & @CRLF & _
        "NON-STANDARD CONFIGURATION                                                                   Printed 2013-06-05 15:35:57"

; Simulate reading file into an array
$aLines = StringSplit($stext, @CRLF, $STR_ENTIRESPLIT)
; Find "Method" line
$iStart = _ArraySearch($aLines, "Method", 0, 0, 0, 1) + 1
; Find "NON-STANDARD" line
$iEnd = _ArraySearch($aLines, "NON-STANDARD", 0, 0, 0, 1) - 1
; Construct return
$sRet = ""
For $i = $iStart To $iEnd
    ; Replace spaces in line with "|"
    $sLine = StringRegExpReplace($aLines[$i], "\s+", "|")
    ; Count instances
    StringReplace($sLine, "|", "")
    ; Valid line if at least 3
    If @extended > 2 Then
        $aSplit = StringSplit($sLine, "|")
        ; See which form line takes and contruct accordingly
        If $aSplit[6] = "-" Then
            $sRet &= $aSplit[2] & ";" & $aSplit[3] & ";" & $aSplit[4] & ";" & $aSplit[5] & "-" & $aSplit[7] & ";;;" & $aSplit[$aSplit[0]] & @CRLF
        Else
            $sRet &= $aSplit[2] & ";;;" & $aSplit[3] & "-" & $aSplit[5] & ";Below Assay Range;;" & $aSplit[$aSplit[0]] & @CRLF
        EndIf
    EndIf
Next

ConsoleWrite($sRet & @CRLF)

That works on my self-modified data - does it on the real world case? If not then please post some representative data.

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

I highly suspect a tab delimitation in this txt file. In this case it would obviously make brain-storming less painful  :)
Could you post the real file ? 

Edit
Without more infos, and empirically assuming that *4 or more spaces* will work as delimiter, here are my 2 cents
[btw Melba, your code skips the "diluted" :) ]

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

$sText = "CHU LIEGE                                                                               SART TILMAN - LIEGE" & @CRLF & _
        "Name: ABC CDE                   Patient ID: 20120831" & @CRLF & _
        "Sample ID: 200604003705              Sample Type:Serum                      Dilution Factor: 1" & @CRLF & _
        "Priority: Routine                    Rack Position: QK000137-6              Completed On: 2013-06-05 15:35:54" & @CRLF & _
        "Operator: C135669REGI                Instrument ID: DV330681                Aliquot Creation Time: 2013-06-05 14:40:37" & @CRLF & _
        "Comment:" & @CRLF & _
        "   Method           Result   Units   RefRange        Flag                Comment                          Reagent" & @CRLF & _
        "   IGG3             0.389    g/L     0.11 - 0.85                                                          12292MA" & @CRLF & _
        "   Random                            0.03 - 2.01     Below Assay Range                                    12324MA" & @CRLF & _
        "   IGG2                              1.69 - 7.86     Below Assay Range                                    12310MA" & @CRLF & _
        "   ABC4             0.009     random     0.03 - 2.01                         Diluted                          12324MA" & @CRLF & _
        "                                                                        Below Reference" & @CRLF & _
        "                                                                        Range" & @CRLF & _
        "   IGG2             0.368    g/L     1.69 - 7.86                         Diluted                          12310MA" & @CRLF & _
        "                                                                        Below Reference" & @CRLF & _
        "                                                                        Range" & @CRLF & _
        "NON-STANDARD CONFIGURATION                                                                   Printed 2013-06-05 15:35:57"


; $sText = FileRead ... etc
$sText = StringRegExpReplace($sText, '(?s).*Reagent\s*(.*?)NON-STANDARD.*', "$1")
;Msgbox(0,"", $sText)
$res = StringRegExp($sText, '(?m)^(?!\s+Below|\s+Range)\s*(\N+)\R?', 3)
;_ArrayDisplay($res)

For $i = 0 to UBound($res)-1
   $tmp = StringRegExp($res[$i], '\s*(.*?\S)(?=\s{4,}|$)', 3)
;_ArrayDisplay($tmp)
   If $tmp[2] = "Below Assay Range" Then 
          $res[$i] = $tmp[0] & ";;;" & $tmp[1] & ";Below Assay Range;;" & $tmp[3]
   ElseIf $tmp[4] = "Diluted" Then 
          $res[$i] = $tmp[0] & ";" & $tmp[1] & ";" & $tmp[2] & ";" & $tmp[3] & ";;Diluted;" & $tmp[5]
   Else
          $res[$i] = $tmp[0] & ";" & $tmp[1] & ";" & $tmp[2] & ";" & $tmp[3] & ";;;" & $tmp[4]
   EndIf
Next

FileDelete("output.txt")
_FileWriteFromArray("output.txt", $res) 

; verification
Sleep(100)
Local $aOutput
_FileReadToArray("output.txt", $aOutput, 0, ";")
_ArrayDisplay($aOutput)

 

Edited by mikell
1 person likes this

Share this post


Link to post
Share on other sites

Hi,

Many thanks for helping me out.

I have attached 2 example files.

Just to make it clear/easier:

I only need Method; Result; Units ;;;Reagent

RefRange and Flags and comments can be ignored

Many thanks,
Koen

 

pat_layout_1.txt

pat_layout_2.txt

Share this post


Link to post
Share on other sites

koenp,

No tabs, so what I posted above works nicely on the real files:

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

$aList = _FileListToArray(@ScriptDir, "pat_layout*.txt", 1)

For $i = 1 To $aList[0]

    $sRet = _ParseFile($aList[$i])
    ConsoleWrite($sRet & @CRLF)

Next

Func _ParseFile($sFile)

    ; Read file into an array
    Local $aLines
    _FileReadToArray($sFile, $aLines)
    ; Find "Method" line
    $iStart = _ArraySearch($aLines, "Method", 0, 0, 0, 1) + 1
    ; Find "NON-STANDARD" line
    $iEnd = _ArraySearch($aLines, "NON-STANDARD", 0, 0, 0, 1) - 1
    ; Construct return
    $sExtract = ""
    For $i = $iStart To $iEnd
        ; Replace spaces in line with "|"
        $sLine = StringRegExpReplace($aLines[$i], "\s+", "|")
        ; Count instances
        StringReplace($sLine, "|", "")
        ; Valid line if at least 3
        If @extended > 2 Then
            $aSplit = StringSplit($sLine, "|")
            ; See which form line takes and contruct accordingly
            If $aSplit[6] = "-" Then
                $sExtract &= $aSplit[2] & ";" & $aSplit[3] & ";" & $aSplit[4] & ";" & $aSplit[5] & "-" & $aSplit[7] & ";;;" & $aSplit[$aSplit[0]] & @CRLF
            Else
                $sExtract &= $aSplit[2] & ";;;" & $aSplit[3] & "-" & $aSplit[5] & ";Below Assay Range;;" & $aSplit[$aSplit[0]] & @CRLF
            EndIf
        EndIf
    Next

    Return $sExtract

EndFunc   ;==>_ParseFile

Results:

RF;431;IU/mL;0.0-15.0;;;13049MA

IGG3;0.389;g/L;0.11-0.85;;;12292MA
IGG4;;;0.03-2.01;Below Assay Range;;12324MA
IGG2;;;1.69-7.86;Below Assay Range;;12310MA
IGG4;0.009;g/L;0.03-2.01;;;12324MA
IGG2;0.368;g/L;1.69-7.86;;;12310MA

M23

1 person likes this

Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites

Thanska a lot @Melba23

 I tested it as well and indeed works fine..

Once the rest of the coding is done I will publish it here so that you  can see the result

@mikell, I like the way you displayed the tables, but is there a easy way to close it popup automaticly like you can do with msgbox ?

 

Many thanks for all your help !!

Koen

Share this post


Link to post
Share on other sites

koenp,

Glad I could help.

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites

koenp,
_ArrayDisplay is a debug function with no timeout, I used it only for checking
To get a similar display you need to build a gui and a listview

Share this post


Link to post
Share on other sites

koenp,

If you give your _ArrayDisplay dialog a suitably unique title then you can easily close it programmatically:

#include <MsgBoxConstants.au3>
#include <Array.au3>

$sTitle = "Unique Title"

Global $aArray[][] = [[0, 1, 2, 3, 4, 5], [0, 1, 2, 3, 4, 5], [0, 1, 2, 3, 4, 5], [0, 1, 2, 3, 4, 5], [0, 1, 2, 3, 4, 5]]

; Run a function every 5 secs
AdlibRegister("_Close_Array_Dialog", 5000)

; Open the dialog
_ArrayDisplay($aArray, $sTitle, Default, 8)

MsgBox($MB_SYSTEMMODAL, "Hi", "The array dialog has closed", 2)

Func _Close_Array_Dialog()

    ; Cancel future calls
    AdlibUnRegister("_Close_Array_Dialog")
    ; Close the dialog
    WinClose($sTitle)

EndFunc

M23

1 person likes this

Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites

Nice workaround  :)

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

  • Similar Content

    • JSmith312
      By JSmith312
      Hello Everyone! 
      I'm attempting to create a checklist app that performs other functions. For performance, I would like to check the box, then have the button to the right enabled. After that button is pressed, the second checkbox is enabled, and ready to be checked, allowing the second button to be pressed. After the second button is pressed, the completion/exit button is enabled/shown. I have my code that currently creates the GUI, creates the checkbox, but when you check it it enables the button and the next checkbox. Can't seem to figure out a Case for GUISetOnEvent. Any assistance would be appreciated!
      #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <StaticConstants.au3> #include <EditConstants.au3> #include <MsgBoxConstants.au3> ; Below is the GUI interface _DeploymentProcess() Func _DeploymentProcess() $aStep1 = GUICreate("Deployment Process", 475, 345, 500, 175) $CBcStep1 = GUICtrlCreateCheckbox("1. Step 01.", 15, 25, 300, 25) $BTNS1 = GUICtrlCreateButton("Email 01", 365, 25, 90, 20) $CBcStep2 = GUICtrlCreateCheckbox("2. Step 02.", 15, 50, 300, 25) $BTNS2 = GUICtrlCreateButton("Email 02", 365, 50, 90, 20) GUICtrlSetState($CBcStep2, $GUI_DISABLE) GUICtrlSetState($BTNS1, $GUI_DISABLE) $CBcStep3 = GUICtrlCreateButton("Hurray! You're Complete!", 85, 276, 300, 60) GUICtrlSetState($CBcStep3, $GUI_SHOW) ; Below are the button and checkbox enables/disables. GUISetState(@SW_SHOW) While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE GUIDelete($aStep1) Return ; Step 1 Case $CBcStep1 If GUICtrlRead($CBcStep1) = $GUI_CHECKED Then GUICtrlSetState($BTNS1, $GUI_ENABLE) GUICtrlSetState($CBcStep2, $GUI_ENABLE) Else GUICtrlSetState($BTNS1, $GUI_DISABLE) GUICtrlSetState($CBcStep2, $GUI_DISABLE) EndIf ; Step 2 Case $CBcStep2 If GUICtrlRead($CBcStep2) = $GUI_CHECKED Then GUICtrlSetState($BTNS2, $GUI_ENABLE) GUICtrlSetState($CBcStep3, $GUI_ENABLE) Else GUICtrlSetState($BTNS2, $GUI_DISABLE) GUICtrlSetState($CBcStep3, $GUI_DISABLE) EndIf Case $CBcStep3 If GUICtrlRead($CBcStep2) = $GUI_CHECKED Then GUICtrlSetState($BTNS10, $GUI_ENABLE) GUICtrlSetState($CBcStep3, $GUI_SHOW) Else GUICtrlSetState($CBcStep3, $GUI_EVENT_CLOSE) EndIf Case $GUI_EVENT_CLOSE, $CBcStep3 #comments-end Exit EndSwitch WEnd EndFunc  
    • RoundChecker
      By RoundChecker
      Hi everyone,

      Is there a way to determine whether the script that is running, is already running, without using;
       
      If WinExists ?

      Or is there a way to use "If WinExists" to determine the script itself?

      The reason I am asking this is because if I want someone to run the .Exe I have and they rename it to whatever they want, how could I then determine in the script to check if there's already an .Exe open, or the script itself is already open?

      Should I use Class, or how do I achieve this?

      Thanks in advance.
    • svenjatzu
      By svenjatzu
      Id like to build a little helpertool for my boss in office but i dont know how to sart it.
      thats no complicated task. im working for an insurancecenter and have to search the customers in different orders and different tags.
      due to my boss is old and not really commen with pc he saves the customers without system.
      eg, customer andreas statham got an insurenca for his car then i got to search for
      andreas statham car, andreas car statham, car andreas statham, statham andreas car, statham car andreas, car statham andreass etc to find all the files from this customer in the harddrive.
      some customers also are fmiliarnamed in one file like andreas statam and monika rog are married an both got a carinsurance then i got to earch for
      andreas statham monika rog car, andreas statham monika car rog,.... this can take real long to find the right customer if i do it from hand.
      how can i realise this someone in here got an excamlple script or has any sugestion?
       
       
    • X_xkijux_x
      By X_xkijux_x
      Ok so im using this program. clarify for school. I would like to have a program that takes every word i type in microsoft word and searches on it in claryfi. is this possible. I would like to have the program not stopping me from typing more after that word. Like when i type a word it auto search it on clarify without making me stop typing and if i want to change i can do that and if im fine that word i can just keep typing and it will search after the next word. 
    • Miliardsto
      By Miliardsto
      Is this possible to make program works like in diagram? There is so much encryption methods and UDFs are they give security? If the $Address will be crypted with some encryption algorithm could be possible to get the value of $Address in easy way? Of course We know its easy too look into autoit code and get value of variable and so We dont want to anyone see $Address value - there are functions Could func1.au3, func2.au3.. be for example func1.php or other type of file? As we know .php files are unnable to see. For example func1 would be read by FileRead() and then Execute() Is this generally possible to do?
      Will it give secure?
      What do you think about? Maybe there is something wrong in this concept or missed.