Search the Community
Showing results for tags 'creation'.
-
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: 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 Send("jsmith") Send("{TAB}") ; Password Send("Password1") Send("{TAB}") Send("Password1") Send("{TAB}") ; Description Send("John Smith") Send("{TAB}") (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. #cs The array returned will contain the following values: $aDays[1] = "Mon" $aDays[2] = "Tues" $aDays[3] = "Wed" ... $aDays[7] = "Sun" #ce 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]) Next EndFunc ;==>Example This post also seems like a similar example, but I don’t need it to be so selective RE: one specific column: https://www.autoitscript.com/forum/topic/166261-how-to-read-csv-specific-row-and-columns Any advice would be appreciated! Thanks for taking a minute to look!
- 2 replies
-
- oracle
- user account
-
(and 2 more)
Tagged with:
-
Hello, I need this for a project and I don't find a method for the next problem. I want when I click a button to create a variable ("$variable1") so if I press one more time to create one more ("$variable2") and create more and more how many times you press the button. Do you have an idea ? Thank you for your attention !
-
Hi everyone, I'm facing a little issue here. After creating a GUI coming from a button action, the GUI seems not to work anymore. Here's what I wrote so far: #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <GuiTreeView.au3> #include <TabConstants.au3> #include <EditConstants.au3> #include <AD.au3> #include <GuiTab.au3> #include <Array.au3> #include <ButtonConstants.au3> #include <ColorConstants.au3> #include <ComboConstants.au3> #Include <Constants.au3> #include <Crypt.au3> #include <Date.au3> #include <File.au3> #Include <FontConstants.au3> #include <GuiEdit.au3> #include <GuiListView.au3> #include <GuiMenu.au3> #include <Inet.au3> #include <Misc.au3> #include <MsgBoxConstants.au3> #include <ProgressConstants.au3> #include <ScreenCapture.au3> #include <StaticConstants.au3> #include <WinAPI.au3> Opt("GUIOnEventMode", 1) ; Only needed once Global $sT0_AdminUserName, $sT0_AdminUserPassword, $sT0_DomainName, $sT0_DomainController, $sT0_ConfigurationContext, $iRunning, $aGroup, $sGroup, $i Global $resources = "C:\SAC_IS\AD_Toolbox\Resources\" Global $workingDir = "C:\SAC_IS\AD_Toolbox\" Global $logs = $Resources &"\Logs\" Global $iAlgo = $CALG_RC4 Global $g_hKey = "CryptPassword" Global $sIniFile = $resources & "\AD_Toolbox_" & @UserName & ".ini" DirCreate ($WorkingDir) DirCreate ($resources) DirCreate ($logs) Func chooseComputerTypeGUI() Global $chooseComputerTypeGUI = GUICreate("AD GROUPS", 300, 300, -1, -1) GUICtrlCreatePic ($resources & "\SAClogo.jpg", 30, 10, 240, 80) GUISetFont(8.5, 700, 0) GUISetBkColor ($Color_White) GUICtrlCreateLabel("Active Directory TOOLBOX", 85, 100, 150, 25) GuiCtrlCreateSeperator(0, 10, 120, 2, 280) GUICtrlCreateLabel("Please choose on what you will work on:", 30, 140) $desktopBtn = GUICtrlCreateButton("A DESKTOP", 10, 170, 110, 50) $laptopBtn = GUICtrlCreateButton("A LAPTOP", 180, 170, 110, 50) $userBtn = GUICtrlCreateButton("A USER", 95, 240, 110, 50) ;Buttons Actions GUICtrlSetOnEvent($desktopBtn, "desktopMainGUI") GUICtrlSetOnEvent($laptopBtn, "laptopMainGui") GUICtrlSetOnEvent($userBtn, "userMainGui") GUISetOnEvent($GUI_EVENT_CLOSE, "_Exit", $chooseComputerTypeGUI) GUISetState() $iRunning = 1 While $iRunning = 1 Sleep (10) Wend EndFunc Func userMainGui() Global $addDefaultGroupsGUI = GUICreate("AD GROUPS", 300, 300, -1, -1) GUICtrlCreatePic ($resources & "\SAClogo.jpg", 30, 10, 240, 80) GUISetFont(8.5, 700, 0) GUISetBkColor ($Color_White) GUICtrlCreateLabel("Active Directory TOOLBOX", 85, 100, 150, 25) GUICtrlCreateLabel("Enter a End User Global ID:", 10, 130) GUICtrlSetColor(-1, $COLOR_PURPLE) GUISetOnEvent($GUI_EVENT_CLOSE, "_Exit", $addDefaultGroupsGUI) GUISetState() $iRunning = 1 While $iRunning = 1 Sleep (10) Wend GUIDelete($chooseComputerTypeGUI) userMainGui() EndFuncI think I'm lost here. Thanks for giving a hand