ravenp Posted August 16, 2005 Posted August 16, 2005 Howdy folks... long time WISE user, new to Autoit but i like what I see so far! I am trying to script an install for an IE certificate and a few of the buttons dont' have ALT + key operations so i've reverted to mouse clicks. I have captured the clicks and the playback works fine on several machines with similar resolution, but I've noticed that a jump from 1024x768 to 1600x1200 for example seems to break the script. Are there any tricks here that would save me from having to write a different script for each res and then check before running? thanks!! ps... if I can program keystrokes to replace the mouse clicks, i'd be all over that too
seandisanti Posted August 16, 2005 Posted August 16, 2005 Howdy folks... long time WISE user, new to Autoit but i like what I see so far! I am trying to script an install for an IE certificate and a few of the buttons dont' have ALT + key operations so i've reverted to mouse clicks. I have captured the clicks and the playback works fine on several machines with similar resolution, but I've noticed that a jump from 1024x768 to 1600x1200 for example seems to break the script.Are there any tricks here that would save me from having to write a different script for each res and then check before running?thanks!!ps... if I can program keystrokes to replace the mouse clicks, i'd be all over that too <{POST_SNAPBACK}>check out ControlSend() and ControlClick() in the help file, that should take care of it...
ravenp Posted August 16, 2005 Author Posted August 16, 2005 check out ControlSend() and ControlClick() in the help file, that should take care of it...<{POST_SNAPBACK}>Hey, thanks.So instead of this...WinWait("Certificate","&Install Certificate")If Not WinActive("Certificate","&Install Certificate") Then WinActivate("Certificate","&Install Certificate")WinWaitActive("Certificate","&Install Certificate")MouseMove(224,422)MouseDown("left")MouseUp("left")Sleep(1000)I could have something like...ControlClick ( "Certificate", "&Install Certificate", 108 [, left] [, 1]] )???
seandisanti Posted August 16, 2005 Posted August 16, 2005 Hey, thanks.So instead of this...WinWait("Certificate","&Install Certificate")If Not WinActive("Certificate","&Install Certificate") Then WinActivate("Certificate","&Install Certificate")WinWaitActive("Certificate","&Install Certificate")MouseMove(224,422)MouseDown("left")MouseUp("left")Sleep(1000)I could have something like...ControlClick ( "Certificate", "&Install Certificate", 108 [, left] [, 1]] )???<{POST_SNAPBACK}>yes but take out the ]['s those are to designate optional parameters, you don't have to have them around your arguments in the actual call
ravenp Posted August 16, 2005 Author Posted August 16, 2005 yes but take out the ]['s those are to designate optional parameters, you don't have to have them around your arguments in the actual call<{POST_SNAPBACK}>It seemed to require a bit extra to work... but i got it.WinWait("Security Warning","You are about to ins")If Not WinActive("Security Warning","You are about to ins") Then WinActivate("Security Warning","You are about to ins")WinWaitActive("Security Warning","You are about to ins")ControlClick ( "Security Warning", "You are about to ins", 6 )MouseClick("left")Now to test more resolutions.Thanks for the help!!!
Guest tygran Posted August 16, 2005 Posted August 16, 2005 If this does not work and the window has in each resolution the same size(pixel), you can use the option "MouseCoordMode". Then the coordinates are relative to the active window. e.g.: Opt("MouseCoordMode", 0) ;; Mouse coordinates relative to active window MouseClick($primary, 191, 185, 1, 1) java script:emoticon('') smilie
ravenp Posted August 16, 2005 Author Posted August 16, 2005 So now I have a working script... works on 800x600 as well as 1600x1200. Some of the buttons don't have control numbers, so i've had to leave in the mouse captures for those parts. Is there another way to click those buttons where the control is hidden? Thanks a bunch!
ravenp Posted August 16, 2005 Author Posted August 16, 2005 Hopefully 1 last question I'm trying to figure out logic for IF statements pertaining to active windows. One of the factors that changes in my script depends on whether the certificate has been installed or not already. If it has, there is one less dialogue that pops up. So it would be very helpful if I could use... If Not WinActive("Security Warning","You are about to ins") Then WinActivate("Security Warning","You are about to ins") A bit differently to launch a different key combination depending on whether that dialogue box appears or a different one does. Any ideas? Thanks!
seandisanti Posted August 16, 2005 Posted August 16, 2005 Hopefully 1 last question I'm trying to figure out logic for IF statements pertaining to active windows. One of the factors that changes in my script depends on whether the certificate has been installed or not already. If it has, there is one less dialogue that pops up.So it would be very helpful if I could use...If Not WinActive("Security Warning","You are about to ins") Then WinActivate("Security Warning","You are about to ins")A bit differently to launch a different key combination depending on whether that dialogue box appears or a different one does.Any ideas?Thanks!<{POST_SNAPBACK}>you could do a little loop to check which window pops up and react accordingly.here's a samplewhile 1 if WinExists("Window1") then ...;your code here for one window ExitLoop EndIf if WinExists("Window2") then ...;your code here for next ExitLoop EndIf WEnd
ravenp Posted August 16, 2005 Author Posted August 16, 2005 Hopefully 1 last question I'm trying to figure out logic for IF statements pertaining to active windows. One of the factors that changes in my script depends on whether the certificate has been installed or not already. If it has, there is one less dialogue that pops up.So it would be very helpful if I could use...If Not WinActive("Security Warning","You are about to ins") Then WinActivate("Security Warning","You are about to ins")A bit differently to launch a different key combination depending on whether that dialogue box appears or a different one does.Any ideas?Thanks!<{POST_SNAPBACK}>Nevermind, I figured out the if logic If WinActive("Security Warning","You are about to ins") ThenWinWait("Security Warning","You are about to ins")If Not WinActive("Security Warning","You are about to ins") Then WinActivate("Security Warning","You are about to ins")WinWaitActive("Security Warning","You are about to ins")ControlClick ( "Security Warning", "You are about to ins", 6 )MouseClick("left")Sleep(1000)ElseIf WinActive("Certificate Import Wizard","The import was succe") ThenWinWait("Certificate Import Wizard","The import was succe")If Not WinActive("Certificate Import Wizard","The import was succe") Then WinActivate("Certificate Import Wizard","The import was succe")WinWaitActive("Certificate Import Wizard","The import was succe")ControlClick ( "Certificate Import Wizard", "The import was succe", 2 )MouseClick("left")Sleep(1000)EndIfThat worked great... If someone could help eliminate my mouse capture that would be amazing!Thanks for everyone's help!
ravenp Posted August 16, 2005 Author Posted August 16, 2005 you could do a little loop to check which window pops up and react accordingly.here's a samplewhile 1 if WinExists("Window1") then ...;your code here for one window ExitLoop EndIf if WinExists("Window2") then ...;your code here for next ExitLoop EndIf WEnd<{POST_SNAPBACK}>Wow, thanks...that's cleaner than mine
seandisanti Posted August 16, 2005 Posted August 16, 2005 Wow, thanks...that's cleaner than mine <{POST_SNAPBACK}>glad i could help... for your mouse issue, did you see the post by Tygran? that may help, if not, there are alot of posts on the forum about identifying and manipulating controls (and overcoming issues doing so)
LynnS Posted July 6, 2009 Posted July 6, 2009 http://home.fnal.gov/~jklemenc/importpfx.html provides a tool that will automatically do the import into the personal or root store on a system. This works great for Internet Explorer.However, I'm trying to now do the equivelant for Firefox. I've found http://www.mozilla.org/projects/security/pki/nss/tools/ but they do not look simple to use at all. Any suggestions?
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now