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

    • sree161
      By sree161
      Hi,
      i have a code which generates two numeric outputs.i have to save them in excel.
      Is there any way to export them to specific cells in excel???
    • TotalAuto
      By TotalAuto
      Howdy All
      I've gone around and around in circles wasting hours trying to fix this problem to no avail so I thought I would try posting for help given there are some real smart people in this forum.
      Background
      I have 5 separate .au3 scripts that all do different basic tasks. For example:
      1.au3 = opens Chrome browser to obtain information from a specific website then closes
      2.au3 = opens an Excel workbook to run a macro then saves and closes
      3.au3 = Open two seperate workbooks and transfers data from one to the other then saves and closes
      4.au3 = .......etc
      5.au3 = .......etc
      These 5 separate scripts, doing completely different tasks, need to each run once per day at 5 different designated times within a day and then close. For example:
      1.au3 = 10am
      2.au3 = 12pm
      3.au3 = 2pm
      4.au3 = 4pm
      5.au3 = 5pm
      Problem
      I can not get these different scripts to reliably run at their designated times. When I manually run these scripts individually by using 'Go F5' they work perfectly. If I convert these scripts to an .exe and manually run each one they work about 98% of time.
      How can I schedule these different .au3 files or associated .exe files to reliably run each day at different times?
      Attempts To Fix The Issue
      1. I have tried converting each .au3 script into their own .exe file and use Window's Task Scheduler to run these .exe files at their designated time but the success rate  of running each .exe in full, to completion, without error is very low at about 30%. Things that commonly go wrong include a browser not opening but movement still continues on the desk top. Other times things just do not happen at all.
      2. I have Windows 7 64 bit and have tried creating and running both (x86) and (x64) .exe files but again reliability problems exist;
      3. I have also tried moving each .exe file to the My Documents folder as I read someone that keeping your files on your desktop ties your files to individual Windows user profiles which can cause AutoIt operating errors. Not sure if this is correct but thought I would try it anyway. It did not fix my issue.
      4. I installed a program called AlwaysUp which supposedly always reliably runs in the background and will reliably execute your AutoIt script or .exe files. Still have significant reliability issues.
      Therefore, can someone please provide advice on how I can get my 5 different .au3 files to run at 5 designated times through the day, every day, without fail? Overtime I will be creating more and more different .au3 files to run certain tasks throughout the day and do not want to create one large AutoIt file that continually runs and attempts to do all the different tasks itself.
      Any help is very appreciated.
      Thanks
      Dan
       
       
    • hugomito
      By hugomito
      Hi all,
      I built an AutoIt application that interacts with several other applications/software. Now, it's turn to interfact with Visual Studio Team Services (VSTS).
      Does anyone has a blog, demo, script to share?
      Thanks!
    • Viki
      By Viki
      This is my first time here so please dont bombard me that what a silly question I am asking!!
      I have 500 rows (A1:A500) in a spreadsheet and I just want to copy one by one row and then paste into another application and then press enter, loop should repeat this until finishes all 500 rows.
      I have looked at clipget(), clip(put() but dont know how to select next row in next turn. I also looked at Array to store but again no luck. Can some guide me please..
    • DineshPawar
      By DineshPawar
      0down votefavorite   In my current project, Excel macro open AutoIt script using a function Call Shell("location of autoit script").
      For proper functioning of AutoIt script it's need to be close parent Excel workbook, so this closing Excel action is written in AutoIt script itself.
      But as soon as AutoIt script close parent Excel workbook then script get pause and it do nothing.
      How open the AutoIt script from Excel workbook and after that parent Workbook get close?