Jump to content

Maggotus

Members
  • Posts

    11
  • Joined

  • Last visited

Profile Information

  • Location
    Washington

Maggotus's Achievements

Seeker

Seeker (1/7)

0

Reputation

  1. I think you probably just didn't read the whole thread. My problem is deeper, and is no longer directed at the login screen.
  2. So, the good news is that your method appears partially to do what I need it to, and pops up the dialog box. The downside is that the script halts execution until i manually click OK or Cancel. I've tried using AdLibRegister- but that doesn't appear to fire when this is used... it appears that even it is halted after calling the command. Due to the fact that AutoIt is not multi-threaded, i'm not sure how i can proceed with this method.
  3. I found this in the source - may confirm that the button triggers a javascript event? <script src="../JavaScript/RecalculateCompany.js" type="text/javascript"></script> The button <input type="button" id="RecalculateCompanyButton" class="ButtonBasic" value="GeneralForm.RecalculateEmployeeListText" onclick="recalCompany('63','This will remove all verifications for all employees during this pay period, and could take over 30 minutes to complete.\n\rAre you sure you wish to continue?')" /> appears to call this command(?): function CreateCommand(id, elementId){ switch(id){ case '63': var command = new Ajax.Commands.RecalculateCompany(elementId,id,counter); net.Base.addCommand(command); } The only other items i found in the source relating to recalculate company was a progress bar, and didn't seem to be helpful.
  4. @MrMitchell - Tried what you provided, and still got no results. i also changed the last line of code to ControlSend($hWinIE, "", "", "{Enter}") to see if it would make a difference and still nothing. There is no visible change when I use the _IEAction($oButton, "focus")command - shouldn't there be a visual cue that the button has obtained focus - similar to when you tab to the button? Also, yes - it appears to be Javascript - but i'm no developer, just a project manager with some experience with scripting and automating. Also - @jdelaney I'm not very experienced with HTML and don't know how to find whether a button has "sub elements". If you could point me in a direction that will tell me how to discover the sub elements, I'd be more than happy to provide. I'm not comfortable with posting the entire HTML of this particular page, but I will provide whatever will help if i can peel out the right pieces. More than likely this button has the same basic structure as the button found on the main http://www.gotimeforce2.com web page. That may provide us with some insight on what i could be missing here.
  5. Yes - but the confirmation box doesn't even pop up when I use the above methods.
  6. I'm only having trouble with the button clicks - everything else is fine. I'll rescind my earlier request for help with pushing the 'login' button - and I'm hoping someone can help me with clicking this new button.(I'm new to posting in this forum, and not sure whether this would warrant a new topic) <input type="button" id="RecalculateCompanyButton" class="ButtonBasic" value="GeneralForm.RecalculateEmployeeListText" onclick="recalCompany('63','This will remove all verifications for all employees during this pay period, and could take over 30 minutes to complete.\n\rAre you sure you wish to continue?')" /> Here is the code I am currently using to press the button: Send("+{TAB}") Sleep(500) Send("+{TAB}") Sleep(500) Send("+{TAB}") Sleep(500) Send("+{TAB}") Sleep(500) Send("+{TAB}") Sleep(500) Send("+{TAB}") Sleep(500) Send("{Enter}") Before when i tried to Send("+{TAB 6}") it wouldn't always land on the button. This method is very visible and takes a long time, and i'm still not confident in the results. I've also tried using the following: $oButton = _IEGetObjById ($oIE, "RecalculateCompanyButton") if @error = 0 Then msgbox(0,"",$oButton.value) EndIf _IEAction($oButton, "click") And this actually pops up the msgbox with the label of the button (which makes me think i've got the right object) - but alas, it still doesn't actually click the button. Using a similar method, I tried using the "focus" action, then sending ENTER, and got the same results. As to whether the developers made it difficult to automate - it is possible, but I don't think so. They were the ones that approached me to create a band-aid for a client while a permanent solution goes through the long haul of the development queue. I really appreciate help anybody could provide.
  7. I'm having the same trouble. Trying to automate a process for a client - but can't get the forms to submit, nor buttons to click. I'm not sure how long it's been against the rules to discuss such things, as there are numerous posts and even snippets with this data.
  8. Hmm - i see your point. My problem isn't really the login process, it's the maintenance i have to do within our software once i get in, this just happens to be the only public page that others could see the source. I was going to assume that whatever methods i could use to press this button, could also be used to press the buttons that will allow me to run maintenance within the site. Is there another way to pose the question where it doesn't appear to violate the rules?
  9. Hey Everyone - I'm somewhat new to AutoIT and very new to using it to interact with IE. I'm working with a website where I cannot simulate a mouseclick on the login button. I've been searching the forums for a few days, and have tried every possibility that i can understand to do. I'm somewhat of a novice at scripting, but i do have a little experience. So far, the only method I've found to press 'Login' is to tab and send ENTER - but i know that's unreliable. When I've tried _IEAction($oLoginButton, "click") - it does nothing, but also doesn't return any error. I've also tried obtaining focus using _IEAction and sending ENTER, but that never appears to obtain focus. I even tried a copy/paste of code along these lines: $hwnd = _IEPropertyGet($oIE, "hwnd") ControlSend($hwnd, "", "[CLASS:Internet Explorer_Server; INSTANCE:1]", "{Enter}") but truthfully, i don't fully understand this method, and likely never appropriately massaged it for this page. I'm hoping someone can help me in the right direction. The credentials provided should throw an invalid login error - which would be great if I could even get it that far. Thanks in advance! #AutoIt3Wrapper_run_debug_mode=Y #include <IE.au3> ;~ Dim $sUsername = $CmdLine[1] ;~ Dim $sPassword = $CmdLine[2] ;~ Dim $sCompanyCode = $CmdLine[3] $sURL = "https://www.gotimeforce2.com/tfiiredirector" $sUsername = "test" $sPassword = "test" $sCompanyCode = "test" $oIE = _IECreate($sURL) WinSetState("[ACTIVE]", "", @SW_MAXIMIZE) $oForm = _IEFormGetCollection($oIE, 0) $oUsername = _IEFormElementGetObjByName($oForm, "usernamex") $oPassword = _IEFormElementGetObjByName($oForm, "passwordx") $oCompanyCode = _IEFormElementGetObjByName($oForm, "companycodex") $oLoginButton = _IEGetObjById($oIE,"submit") _IEFormElementSetValue($oUsername, $sUsername) _IEFormElementSetValue($oPassword, $sPassword) _IEFormElementSetValue($oCompanyCode, $sCompanyCode) Send("{TAB 9}") Send("{Enter}") _IELoadWait($oIE)
  10. Excellent - Let me give this a shot and see what I can do with it. Thank you.
  11. My first post - please forgive me as I couldn't find anything as I dug for answers. I've written simple scripts in the past to place visible or hidden text to clipboard, but this one has me stumped. I know that certain applications just can't be read from, but I'm curious whether the text is in a control that is behind another control, and not accessible from the Window Info tool. Is anyone able to help me write a script that can loop through all available controls within a window, and output any visible or hidden text to a text file? It seems this is the only way to confirm that the text is truly unavailable to AutoIt. OCR is unfortunately not an option for me in this particular implementation. Thanks in advance.
×
×
  • Create New...