Jump to content

Short User-Creation script for Oracle?


Recommended Posts

Hello Smart People!

I have a multi-column .CSV that I would like to draw information from, in order to populate (send) that info to some fields in an Oracle form.  This would be for account-creation in Oracle.

I have the basic script to navigate (tab) through the fields in the Oracle form, but I am SUPER-new to AutoIT and don’t quite see how to get the script to import and use variables from a .CSV

For example:



Ticket Number  Logon    Name                    Email

Tx12345                jsmith   John Smith          john.smith@anyco.com

Tx12346                ljones    Leo Jones            leo.jones@anyco.com

Tx12347                mblue   Mary Blue           mary.blue@anyco.com


My script just waits for the page to be active, then enters data and tabs between fields like this:

; Wait for the window to be active

WinWaitActive("Oracle is Cool - E-Business is the Best")


; User Name




; Password






; Description

 Send("John Smith")


(etc. etc. etc.…)

The winning solution would take one row at a time, feed it into fields on the Oracle form, save, and then start in on the next row

It looks like I’d need a combination of “FileReadToArray” ( or“FileReadLine”?) and “StringSplit” to loop through the values and set them to variables, which would then replace my current "hard-coded" values to be typed them into the form?

I found the following example in the “Help” snippets for stringsplit()… this seems like it’s in the ballpark but I’m having some trouble wrapping this around what I’ve put together, since each entry in the array would have multiple elements per line instead of just “Day”:

Func Example()
    Local $aDays = StringSplit("Mon,Tues,Wed,Thur,Fri,Sat,Sun", ",") ;Split the string of days using the delimiter "," and the default flag value.
        The array returned will contain the following values:
        $aDays[1] = "Mon"
        $aDays[2] = "Tues"
        $aDays[3] = "Wed"
        $aDays[7] = "Sun"

    For $i = 1 To $aDays[0] ; Loop through the array returned by StringSplit to display the individual values.
        MsgBox($MB_SYSTEMMODAL, "", "$aDays[" & $i & "] - " & $aDays[$i])
EndFunc   ;==>Example

This post also seems like a similar example, but I don’t need it to be so selective RE: one specific column:


Any advice would be appreciated!  Thanks for taking a minute to look!


Link to comment
Share on other sites

why would you not use SQL Developer for this? Oracle can already import Excel files. manipulating Oracle Forms is going to probably require you use UIAutomation UDFs in AutoIt.


there are ADO and other database UDFs as well on this Forum

Edited by Earthshine

My resources are limited. You must ask the right questions


Link to comment
Share on other sites

I haven't looked into using that resource yet; I'm aware that there are other options out there that may also bear fruit, but I was also looking to expand my understanding of AutoIT, and thought that this would be a good intro.

But thanks for the link, I can check that out as well.

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

  • Create New...