HHworkuser Posted January 18, 2018 Share Posted January 18, 2018 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 More sharing options...
Danp2 Posted January 18, 2018 Share Posted January 18, 2018 Another option would be to use _FileReadToArray. Once you have the array, you will need to loop through it and then do something with the data. You haven't told us anything about the involved form (ie: is this a browser?). Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
HHworkuser Posted January 18, 2018 Author Share Posted January 18, 2018 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 More sharing options...
Danp2 Posted January 18, 2018 Share Posted January 18, 2018 I don't have experience working with remote Citrix sessions, so hopefully someone else will jump in here with some thoughts / suggestions. Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
Earthshine Posted January 18, 2018 Share Posted January 18, 2018 (edited) 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 January 18, 2018 by Earthshine My resources are limited. You must ask the right questions Link to comment Share on other sites More sharing options...
BigDaddyO Posted January 18, 2018 Share Posted January 18, 2018 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. Earthshine 1 Link to comment Share on other sites More sharing options...
Earthshine Posted January 18, 2018 Share Posted January 18, 2018 why can't he use PsExec on in the citrix session and run a script on a network drive? they block everything by default then? My resources are limited. You must ask the right questions Link to comment Share on other sites More sharing options...
BigDaddyO Posted January 18, 2018 Share Posted January 18, 2018 he will have to try it. In my experience with companies that Use Citrix, especially Health Care, the security dept is overly controlling and blocks everything possible. In my case, applications have to be launched from a local system drive, not from a network location. Earthshine 1 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now