RogueSpear Posted July 13, 2005 Share Posted July 13, 2005 I have yet to learn AutoIt because so far I've been able to accomplish everything I need to do through VBscript and repackaging/direct .msi editing. But this one has me stumped:I have repacked SpywareBlaster into an msi file and it has the latest updates that were available at the time I made the custom package, but obviously it would be nice to automate an update at the time of OS installation. I don't want to schedule auto updates to run regularly because I get the feeling this would violate the EULA. Just a one time update so that when my OS install is complete.. it's complete.SpywareBlaster uses a non-standard interface. I believe it is mandatory that you use a pointing device in order to use this application. I have been unable to find any way to navigate via the keyboard. One can only assume this was done on purpose so that they can sell subscriptions to the auto update service. So can AutoIt manipulate this kind of application?I have nothing against AutoIt, but I don't want to spend a day or two checking it out only to find it can't do this one task - which is all I would ever really need it for. So I'm just wondering if anyone knows the answer off the top of their head.Thanks. Link to comment Share on other sites More sharing options...
redfive19 Posted July 14, 2005 Share Posted July 14, 2005 someone posted an auto it scrupt to do exactly what you're asking. I wish I had bookmarked it. it works off of the coord relative to the window *i think*..... Link to comment Share on other sites More sharing options...
Swimming_Bird Posted July 14, 2005 Share Posted July 14, 2005 you can tell autoit to manually send a mouse click to a particular coordinate in a window. the easiset way to generate this would be to use one of the autoitscript generators. Link to comment Share on other sites More sharing options...
RogueSpear Posted July 14, 2005 Author Share Posted July 14, 2005 hmmm.. sounds like it would be dependant upon the screen resolution maybe? Like the coordinates would be different on an 800x600 than on a 1024x768 screen. Or is it coordinates based on the open window itself? If that's the case then maybe I will break down and figure this thing out. Link to comment Share on other sites More sharing options...
Achdine Posted July 14, 2005 Share Posted July 14, 2005 It can do either.CaretCoordMode = 0 - relative coords to the active windowCaretCoordMode = 1 - absolute screen coordinates (default)CaretCoordMode = 2 - relative coords to the client area of the active windowAutoIt is extremely easy to learn, and the help file is excellent. I basically sat down and wrote my own program selection screen (like WPI), complete with .ini file reads, file log, and a purty, customizable interface, without ever having used this language before. Link to comment Share on other sites More sharing options...
RogueSpear Posted July 14, 2005 Author Share Posted July 14, 2005 AutoIt is extremely easy to learn, and the help file is excellent. I basically sat down and wrote my own program selection screen (like WPI), complete with .ini file reads, file log, and a purty, customizable interface, without ever having used this language before.<{POST_SNAPBACK}>Ok you've inspired me Now my wife is really gonna kill me. One more thing to take up my time Link to comment Share on other sites More sharing options...
urie Posted July 14, 2005 Share Posted July 14, 2005 (edited) RogueSpear you could try SciTE4AutoIt3 it has a lot of fuctions for autoit check it out here P.S. you still have to install autoit alsohttp://www.autoitscript.com/autoit3/scite/ Edited July 15, 2005 by urie Link to comment Share on other sites More sharing options...
MHz Posted July 15, 2005 Share Posted July 15, 2005 You maybe right RogueSpear. It is a strange program to navigate. I tried some VBScript sendkeys, but kept getting mixed results. I did not have much like with AutoIt to directly operate the controls. Using the mouse, as you stated, may do this for you.AutoIt can work by screen, window or client window coordinates. So this is could be achieved.urie supplies a link the a customized version of Scite, which has all the onboard tools to help. Check the AU3Recorder in the tools menu.AutoIt Download page (Scite4AutoIt3 link is also on the page, just look down the page)You may want to look at this sometime. If you are good with VBScript, then the Com features would of some interest?AutoIt Beta Download page (this has Com, ActiveX, and latest additions, Scite4AutoIt3 can support both release and beta versions installed, at the same time)You can use VBScript as your primary language, but nothing wrong with a little AutoIt, to fill the gaps. Link to comment Share on other sites More sharing options...
RogueSpear Posted August 25, 2005 Author Share Posted August 25, 2005 Ok I finally decided to sit down and get comfy with AutoIt. What an id*** I am for waiting so long, but you know when you got a million other things on your plate something just has to give. Well I'm on vacation this week so what do I do? Lol, I learn a new scripting language. Still don't quite have this SpywareBlaster down yet. I'm trying the whole CaretCoord thing as mentioned above. I'll post my findings shortly.. Link to comment Share on other sites More sharing options...
MAVERICKS CHOICE Posted August 25, 2005 Share Posted August 25, 2005 (edited) Ok I finally decided to sit down and get comfy with AutoIt. What an id*** I am for waiting so long, but you know when you got a million other things on your plate something just has to give. Well I'm on vacation this week so what do I do? Lol, I learn a new scripting language. Still don't quite have this SpywareBlaster down yet. I'm trying the whole CaretCoord thing as mentioned above. I'll post my findings shortly..<{POST_SNAPBACK}>Think you'll find it to be excellent. I'm certainly sold on usin it on my tricky ua software installs.Good Luck. Edited August 25, 2005 by MAVERICKS CHOICE Link to comment Share on other sites More sharing options...
Nologic Posted August 25, 2005 Share Posted August 25, 2005 Well if I have any advice to give it would be to make sure you don't have WindowBlinds or any other OS skinning app running. A lot of my first scripts ended up using a lot of "Send" commands...which I think is horid and very prone to fail.I'm still just a beginner my self...my coding style changes a lot over time...still need to go back and redo a lot of scripts...if for no other reason than to serve as better examples of how to write install scripts. Link to comment Share on other sites More sharing options...
RogueSpear Posted August 26, 2005 Author Share Posted August 26, 2005 Ok guys.. I'm not getting anywhere with this. The mouse seems to be moving relative to the screen rather than relative to the window even though I've set it for window mode. Mind you, I'm an AutoIt noob, but I've been coding for a while now. Take a look at the code and see if I'm doing something totally wrong. I'd appreciate it. I know there's a redundancy in the beginning of the script, but I was basically flailing in the wind trying anything.AutoItSetOption ("CaretCoordMode", 0)WinMinimizeAll()Run("C:\Program Files\Security\SpywareBlaster\spywareblaster.exe")WinWaitActive("SpywareBlaster")WinActivate("SpywareBlaster")Sleep(5000)MouseClick("left", 65, 371)MouseClick("left", 381, 395)Sleep(10000)MouseClick("left", 65, 131)MouseClick("left", 187, 363)Sleep(5000)WinClose("SpywareBlaster") Link to comment Share on other sites More sharing options...
Nologic Posted August 26, 2005 Share Posted August 26, 2005 AutoItSetOption ("CaretCoordMode", 0)Is used for where the cursor is....Opt ("MouseCoordMode", 0)Is used for where the mouse is. AutoItSetOption or Opt...ether one works. Link to comment Share on other sites More sharing options...
RogueSpear Posted August 26, 2005 Author Share Posted August 26, 2005 yep, that did the trick! Thanks a million. I think I got a bit of tunnel vision and never would have found that line. Link to comment Share on other sites More sharing options...
Nologic Posted August 26, 2005 Share Posted August 26, 2005 (edited) Your welcome...another tip...instead of:MouseClick("left", 65, 371)UseMouseClick("left", 65, 371, 1, 1)Hehe makes the mouse haul a**. AlsoWinWaitActive("SpywareBlaster")WinActivate("SpywareBlaster")Sleep(5000)As you have already said...there is redundancy in the script by activating a window that is already active...so secondline there is not needed....also...if its possible get rid of the sleep statements. Do this by checking to see if there is different visable text some where on the following window thats different from the prior.WinWait("SpywareBlaster", "Bob")...WinWait("SpywareBlaster", "mark")Now the above winwaits are different windows...so long as "mark" wasn't on the winwait that was looking for "bob"If that fails...you could test to see if it refresh's the window title per window...if so...you could rename the first window's title to some thing else, example:WinWait("SpywareBlaster")WinSetTitle ( "SpywareBlaster", "", "Old Window" )....WinWait("SpywareBlaster")....OrWinWait("SpywareBlaster")WinSetTitle ( "SpywareBlaster", "", "Old Window" )....WinWaitClose("Old Window" )...Any ways a few ideas to play with** Update **Also its a good idea not to hard code paths if possible.Run("C:\Program Files\Security\SpywareBlaster\spywareblaster.exe")Would be better written like so:Run( @ProgramFilesDir & "\Security\SpywareBlaster\spywareblaster.exe" )That way should "Program Files" be set else where than C:\ the script would not fail Edited August 26, 2005 by Nologic Link to comment Share on other sites More sharing options...
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