Jump to content

Link8

Members
  • Posts

    5
  • Joined

  • Last visited

Link8's Achievements

Seeker

Seeker (1/7)

0

Reputation

  1. Hi, Sorry for noob question, but it seems that I can not find the answer by myself. I work as a system administrator for company with 2000 employees. Every employee has his own bank account. Bank system is accessible through web-page. The problem is that passwords for bank accounts expire after 1 year. So I need to change password for every employee. We can not delegate this to employees themselves, as we need to know the passwords, because Finance department is using these bank accounts to pay taxes. Now the question: I need the script that will copy passwords from ini file, that I will prepare beforehand, and paste them into required fields on web-page. Also this script must move mouse and make some clicks on the screen to navigate though web page. After script will change password for employee it must move to the next employee. The ini file will be something like this: [Employee1] ID=KLL-111111 OldPassword=bLf8$HVnJ3aK NewPassword=5GJUJuoYP$o0 [Employee2] ID=KLL-111112 OldPassword=0pWJoECgPZz2 NewPassword=TSH3e4lj24x1 [Employee3] ID=KLL-111113 OldPassword=nN55UiTBgFkq NewPassword=cX7oFOJBIHAM I will open web browser and enter web-site of my bank Then I will start the script The script will enter data from ini file. It will enter ID and OldPassword to login. Then the script must move mouse according to coordinates that I will write so that it will navigate to the page, where the password must be changed. Then the script must paste OldPassword and NewPassword twice and press OK Then the script should logout from bank account of that employee and move to step 1 to proceed with changing of password for the next employee. I know how to move mouse and make clicks with autoit script. But I cannot figure out how to paste data from ini file. Also I cannot figure out how to make script move to next employee after it will change password for the first. I will appreciate your help, as if I do not make this script we will need to change 2000 accounts by hands.
  2. I figure out that we do not need ALT+SHIFT+TAB, but we need ALT+TAB, because first is return to the oldest window, second is to return to newest window. ALT+TAB = ("!{TAB}") Now the script looks like this: Local $AnnoyingForm = "Внимание!" While 1 WinWaitActive($AnnoyingForm) Send("{Enter}") Send("!{TAB}") WEnd Please help me to figure out how to use several parameters to determine window on which action needed to be done. I need not only use windows name, but text in window and executable name.
  3. Solution with not pressing Enter doesn't work, because I can not activate this window when script is running to press OK manually. The script return me to previous window. So I need to figure out how to use a couple of parameters to identify window, for example: executable name, the text in this window, the size of the window. I think "the text in the window" and executable name will be enough.
  4. Thank you for reply. I think it's better to use key combination ALT+SHIFT-TAB to return you to previous window than MainForm variable, because you can work in different programs, while annoying window will appear. ALT+SHIFT-TAB = Send("!+{TAB}") I has written this script based on yours Local $AnnoyingForm = "Attention!" While 1 WinWaitActive($AnnoyingForm) Send("{Enter}") Send("!+{TAB}") WEnd But there are 2 problems. First that defining the window by name might be dangerous. It might be dangerous to press Enter on any window called Attention!. So is there some way to more closely define the window? Can we use for example a couple of parameters, for example: executable name, the text in this windows, the size of the window. I think "the text in the window" and executable name will be enough. Another problem is if you write something in web form the script will not return to web form, because there can be many forms on 1 page. So if you write some text in the web form and the window Attention! appear while your are typing something - and the script returns you to main page you will not be able to continue to type in the same web form. P.S. However we can not press Enter, just press Alt-Shift-Tab. We can always press enter on all Attention! window later. So I think I will remove pressing Enter from script.
  5. Is there any way to prevent annoying application from stealing focus from user? I have searched many forums and didn't find solution. I have the application in which I need to make 1 operation each 30 minutes. The operation takes 5 minutes. After it's completed it display OK window which states that operation was completed successfully. I do not care about this and do not want to steal focus from me. Since Windows is unable to do this the only one solution for me is that some script will check active window every 0.1 second and if it see that the active window became the window with OK button it press Alt+Shift+Tab to revert to my application. May be there are some more clever solutions and that will be very good. I use Windows 7.
×
×
  • Create New...