fleone Posted May 16, 2012 Share Posted May 16, 2012 Our group has been using an exe file created with AutoIT as a tool for grading student assignments in a proprietary 3rd party application. This executable file would take YOUR username and password and pass it along to the internal website that hosted the SSO login page. The application has received an update and now longer provides the grading functionality that we need. The person that created the script and subsequent executable file is regrettably no longer with our company and did not see fit to leave the source code for the script. It has fallen to me to try to create a new executable file that will overcome the changes made in our 3rd party application. I have pretty much figured out the navigation of the web pages, and the links, but what I have not been able to figure out is how to get a username and password from the GUI into the fields on the login page. I can do it easily by putting my username and password in the script file, but then I would need to have the other members of my team do the same thing, and since these usernames and passwords are active directory in nature, leaving them in plain text in a script is not the best course of action.Does it violate the rules of the forum to ask for assistance with this? It is a login, but I don’t think it meets the “SPAM tools including instant messenger or forum auto-posters. This includes forum or site auto-login methods.” criteria, as it requires the user to enter their credentials each time they launch the application.I believe that it has something to do with capturing the username and password that are entered in the GUI form and saving them as variables to pass on to the website.If this does not violate the forum rules, can someone please point me in the appropriate direction?I have viewed dozens of how-to AutoIT videos…some good, some not so good, and really didn’t find an answer there.If this request does in fact violate the forum rules for posting. I sincerely apologize.Thanks!Here is the code for the input box:The usenam field should pass information on to the "UserName" field on the websiteThe passwrd field should pass information on to the "txtPassword" field on the website.#include <IE.au3> #include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form= $Login = GUICreate("Login", 286, 114, 327, 207) GUISetBkColor(0xA6CAF0) $Username = GUICtrlCreateLabel("Username", 5, 9, 59, 19) $Password = GUICtrlCreateLabel("Password", 5, 33, 58, 19) GUICtrlSetFont(-1, 10, 400, 0, "Calibri") $usernam = GUICtrlCreateInput("", 72, 8, 193, 21) $passwor = GUICtrlCreateInput("", 72, 32, 193, 21, BitOR($GUI_SS_DEFAULT_INPUT,$ES_PASSWORD)) $Continue = GUICtrlCreateButton("Continue", 56, 64, 175, 33) GUICtrlSetFont(-1, 10, 400, 0, "Calibri") GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch Wend Link to comment Share on other sites More sharing options...
JohnOne Posted May 16, 2012 Share Posted May 16, 2012 (edited) Heres a pointer Local $UN While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Continue $UN = GUICtrlRead($usernam) MsgBox(0,0,$UN) Exit EndSwitch Wend Edited May 16, 2012 by JohnOne AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted May 16, 2012 Moderators Share Posted May 16, 2012 (edited) fleone,Does it violate the rules of the forum to ask for assistance with this?Unfortunately it does because it has to do with:capturing the username and password that are entered in the GUI form and saving them as variables to pass on to the websiteand so I am going to lock this thread. M23 Edited May 16, 2012 by Melba23 Typo Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
Recommended Posts