Jump to content

Parse through csv file and fill out form


Recommended Posts

Hey Everyone, I am new to auto-it and I am attempting to automate a task for our organization. I currently have my program connecting to citrix and logging into an EMR. Once it is there, I need it to open a CSV file and loop through the data. IE: take the first two fields plug them into a form hit submit, then take the next two fields plug them into the form hit submit...I currently have the program opening the csv, but from there I am currently lost, any thoughts? I'll attach what I found on the forum for READCSV.

Thanks for any thoughts!

testing2_get_csv.au3

Link to comment
Share on other sites

Thanks Danp2 and I have thought of using _FileReadtoArray as well. I want to take the data from the CSV and fill out a form within the Electronic Medical Record. It is web-based through a connection with CItrix. Once the program logs into the EMR it will need to pull the csv file, the first column in the csv file is a patient number, take that number and fill out the first field in the form. Then it needs to go back to the csv, take the second field and fill out the next field in the form. Below is snippet of what I am doing prior to needing to access the csv.

 ; **** Launch the Citrix CaseTracking ICA Application ****
   LogToFile("Citrix_Launch.  Launching Powerchart.")
   ;MsgBox(64, "BoardInfo_1", "Launching Powerchart", 5)
   Run("C:\Program Files\Citrix\ICA Client\wfcrun32.exe " & $ICAFile)
   CountDown(35,"Waiting 35 Sec. for Citrix to Launch") ; Sleep 35 seconds so Citrix has time to launch

   ; Check for a disconnected Citrix session that opens in the task bar. If found, kill it and start fresh.
   LogToFile("Check_Disconnect.  Checking for disconnected session.")
   ;MsgBox(64, "BoardInfo_2", "Checking for Disconnected Session", 3)

   $DisConTest = WinActivate($username, "")    ; Bring to focus the Secured Session
   if $DisConTest <> 0 then        ; WinActivate Returns 0 if window is not found or cannot be activated
    Sleep(2000)          ; Sleep 2 seconds
    LogToFile("Found_disconnect.  Found disconnected session.")
    MsgBox(64, "Found_disconnect", "Found Disconnected Session", 3)

    If WinExists("Millennium Unsecure Session") Then  ; Window name changes to "Millennium Unsecure Session" when it's made active
     WinActivate("Millennium Unsecure Session", "")
     Sleep(2000)         ; Sleep 2 seconds
     Send($password & "{ENTER}")
     Sleep(2000)         ; Sleep 2 seconds
     WinKill($WinName1,"")
     LogToFile("BoardInfo_4.  Ended the old tracking board session.")
     MsgBox(64, "BoardInfo_4", "Ended the old tracking board session", 3)
     Sleep(6000)         ; Sleep 6 seconds

     ; Re-launch Citrix so we can start a new session
     LogToFile("BoardInfo_5.  Starting new tracking board session.")
     MsgBox(64, "BoardInfo_5", "Starting new tracking board session", 3)
     Run("C:\Program Files\Citrix\ICA Client\wfcrun32.exe " & $ICAFile)
     CountDown(35,"Waiting 35 Sec. for Citrix to re-Launch") ; Sleep 35 seconds so Citrix has time to launch
    Endif ; WinExists("Millennium Unsecure Session")
   Endif ; $DisConTest <> 0
   ; ---------- End of section for disconnected Citrix session ---------


   ; **** Millennium sign-on and Displayi Tracking Board ****
   $PChartTest = WinActivate("Millennium Logon - \\Remote","")    ;
   if $PChartTest <> 0 then          ; WinActivate Returns 0 if window is not found or cannot be activated
    WinActivate("Millennium Logon - \\Remote","")    ; Make sure the window has the focus
    sleep(1000)           ; Sleep 1 second
    Send("{ALTDOWN}u{ALTUP}" & $username & "{TAB}" & $password & "{ENTER}") ; Send userid and password
    WinWait($WinName1,"",60)      ; Wait for Powerchart Organizer

Link to comment
Share on other sites

Citrix licenses their stuff to MS, which uses it to provide RDP. Automating Citrix, therefore, I would imagine it like RDP and you would probably need junkew's IUIAutomation most likely. FAQ 31, it's under there. If you are trying to do this via Citrix remote session you may need to have installed your script that reads the CSV of course. See if this helps to run your AutoIT script (compiled as exe)

https://docs.microsoft.com/en-us/sysinternals/downloads/psexec

 

to test you can develop on your own system or a VM 

Edited by Earthshine

My resources are limited. You must ask the right questions

 

Link to comment
Share on other sites

I have worked with Citrix a lot, and it's a giant PITA.  You won't be able to interact with it from outside, so if your using Citrix Desktops, you have to write your script & run your script from inside a citrix session.

If your launching a published app, your pretty much out of luck, unless you can convince your Citrix team to turn your script into a published app.

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...