andrewcrawford Posted June 28, 2008 Share Posted June 28, 2008 Hi all i have made a autoit script to run a program that has no silent switchs. problem is it is very much dependant on screen postition so when it installing if the screen is slightly different postition it fails i dnt know if there a way to remove teh depndancy on teh screen postition but if there is here is the codeOpt("WinWaitDelay",100)Opt("WinTitleMatchMode",4)Opt("WinDetectHiddenText",1)Opt("MouseCoordMode",0)Run('Y:\apps\digiguide\digiguide.exe')WinWait("DigiGuide Setup - Terms and Conditions","")If Not WinActive("DigiGuide Setup - Terms and Conditions","") Then WinActivate("DigiGuide Setup - Terms and Conditions","")WinWaitActive("DigiGuide Setup - Terms and Conditions","")MouseMove(350,341)MouseDown("left")MouseUp("left")WinWait("DigiGuide Setup - Destination","")If Not WinActive("DigiGuide Setup - Destination","") Then WinActivate("DigiGuide Setup - Destination","")WinWaitActive("DigiGuide Setup - Destination","")MouseDown("left")MouseUp("left")WinWait("DigiGuide Setup Wizard","")If Not WinActive("DigiGuide Setup Wizard","") Then WinActivate("DigiGuide Setup Wizard","")WinWaitActive("DigiGuide Setup Wizard","")MouseMove(367,329)MouseDown("left")MouseUp("left")the program is digiguide so if anyone has got something workign for this that would do fine to Link to comment Share on other sites More sharing options...
damian666 Posted June 28, 2008 Share Posted June 28, 2008 you should use control click mantha is a much better way to do itcheck the helpfile for itDamian666 Link to comment Share on other sites More sharing options...
andrewcrawford Posted June 29, 2008 Author Share Posted June 29, 2008 you should use control click mantha is a much better way to do itcheck the helpfile for itDamian666how would i do that? pretty new to this type of install Link to comment Share on other sites More sharing options...
iuli_kyle Posted June 29, 2008 Share Posted June 29, 2008 You should run it with @SW_HIDE flag, which hides installers window. Also, ControlClick () is way more better. Take a look in the help file or provide me with the installer and i'll write a script Link to comment Share on other sites More sharing options...
andrewcrawford Posted June 29, 2008 Author Share Posted June 29, 2008 You should run it with @SW_HIDE flag, which hides installers window. Also, ControlClick () is way more better. Take a look in the help file or provide me with the installer and i'll write a script unfortnally i cant provide the installe rbecuase it is register to me. but you can regster at the site www.digiguide.com and download a copy i ust need it to install when it ask for settings to i just want ti canceled as i copy over a setting file to make it the way i want. Link to comment Share on other sites More sharing options...
andrewcrawford Posted June 29, 2008 Author Share Posted June 29, 2008 (edited) You should run it with @SW_HIDE flag, which hides installers window. Also, ControlClick () is way more better. Take a look in the help file or provide me with the installer and i'll write a script does this seem about right?@SW_HIDERun('Y:\apps\digiguide\digiguide.exe')WinWait("DigiGuide Setup - Terms and Conditions","")If Not WinActive("DigiGuide Setup - Terms and Conditions","") Then WinActivate("DigiGuide Setup - Terms and Conditions","")WinWaitActive("DigiGuide Setup - Terms and Conditions","")ControlClick("DigiGuide Setup - Terms and Conditions", "", "controlID [, middle [, 350 [, 341 ]]]")WinWait("DigiGuide Setup - Destination","")If Not WinActive("DigiGuide Setup - Destination","") Then WinActivate("DigiGuide Setup - Destination","")WinWaitActive("DigiGuide Setup - Destination","")ControlClick("DigiGuide Setup - Destination", "", "controlID [, middle [, 350 [, 341 ]]]")WinWait("DigiGuide Setup Wizard","")If Not WinActive("DigiGuide Setup Wizard","") Then WinActivate("DigiGuide Setup Wizard","")WinWaitActive("DigiGuide Setup Wizard","")ControlClick("DigiGuide Setup Wizard", "", "controlID [, right [, 367 [, 329 ]]]")it is givign me a edit at line one so iu am guessing i have doen the hide windwo wrong Edited June 29, 2008 by andrewcrawford Link to comment Share on other sites More sharing options...
iuli_kyle Posted June 29, 2008 Share Posted June 29, 2008 (edited) Here is the fixed code >Run('Y:\apps\digiguide\digiguide.exe','',@SW_HIDE)WinWait("DigiGuide Setup - Terms and Conditions","")$process=WinGetProcess("DigiGuide Setup - Terms and Conditions")If Not WinActive("DigiGuide Setup - Terms and Conditions","") Then WinActivate("DigiGuide Setup - Terms and Conditions","")WinWaitActive("DigiGuide Setup - Terms and Conditions","")ControlClick("DigiGuide Setup - Terms and Conditions", "", "controlID [, middle [, 350 [, 341 ]]]")WinWait("DigiGuide Setup - Destination","")If Not WinActive("DigiGuide Setup - Destination","") Then WinActivate("DigiGuide Setup - Destination","")WinWaitActive("DigiGuide Setup - Destination","")ControlClick("DigiGuide Setup - Destination", "", "controlID [, middle [, 350 [, 341 ]]]")WinWait("DigiGuide Setup Wizard","")If Not WinActive("DigiGuide Setup Wizard","") Then WinActivate("DigiGuide Setup Wizard","")WinWaitActive("DigiGuide Setup Wizard","")ControlClick("DigiGuide Setup Wizard", "", "controlID [, right [, 367 [, 329 ]]]")While ProcessExists($process)Sleep(100)WEndExitHope will work now. Also, "next" or "install" buttons are identified by a class and a instance. You can get this info by using AutoIT Window Info tool. For example, a button identified by class "Button" and instance "3" you'll run this, in order for that button to be clicked :ControlClick("DigiGuide Setup - Terms and Conditions","","Button3")Hope it helps ! Edited June 29, 2008 by iuli_kyle Link to comment Share on other sites More sharing options...
andrewcrawford Posted June 29, 2008 Author Share Posted June 29, 2008 Here is the fixed code >Run('Y:\apps\digiguide\digiguide.exe','',@SW_HIDE)WinWait("DigiGuide Setup - Terms and Conditions","")$process=WinGetProcess("DigiGuide Setup - Terms and Conditions")If Not WinActive("DigiGuide Setup - Terms and Conditions","") Then WinActivate("DigiGuide Setup - Terms and Conditions","")WinWaitActive("DigiGuide Setup - Terms and Conditions","")ControlClick("DigiGuide Setup - Terms and Conditions", "", "controlID [, middle [, 350 [, 341 ]]]")WinWait("DigiGuide Setup - Destination","")If Not WinActive("DigiGuide Setup - Destination","") Then WinActivate("DigiGuide Setup - Destination","")WinWaitActive("DigiGuide Setup - Destination","")ControlClick("DigiGuide Setup - Destination", "", "controlID [, middle [, 350 [, 341 ]]]")WinWait("DigiGuide Setup Wizard","")If Not WinActive("DigiGuide Setup Wizard","") Then WinActivate("DigiGuide Setup Wizard","")WinWaitActive("DigiGuide Setup Wizard","")ControlClick("DigiGuide Setup Wizard", "", "controlID [, right [, 367 [, 329 ]]]")While ProcessExists($process)Sleep(100)WEndExitHope will work now. Also, "next" or "install" buttons are identified by a class and a instance. You can get this info by using AutoIT Window Info tool. For example, a button identified by class "Button" and instance "3" you'll run this, in order for that button to be clicked :ControlClick("DigiGuide Setup - Terms and Conditions","","Button3")Hope it helps !it is still failing the install program jsut doesnt seem to start up at all, (i mean i am checking task manager for it starting) i have used that program and now idenitifd as class #32770 first screen, and second. the final bit is sectionwindow061popupbtw thank you for all your help so far at the very least i am learning more about the control clicks Link to comment Share on other sites More sharing options...
iuli_kyle Posted June 29, 2008 Share Posted June 29, 2008 It's impossible. Nothing is modified, but the parameter so it'll run with no window. Check that again Link to comment Share on other sites More sharing options...
andrewcrawford Posted June 29, 2008 Author Share Posted June 29, 2008 It's impossible. Nothing is modified, but the parameter so it'll run with no window. Check that again i found the error'Y:\apps\digiguide\digiguide.exe' that was my bad because i was making the scritp from network share on virtual pc but that share doesnt exist in my network so i modified it to just the program name and it seems to be working fine Link to comment Share on other sites More sharing options...
andrewcrawford Posted June 29, 2008 Author Share Posted June 29, 2008 It's impossible. Nothing is modified, but the parameter so it'll run with no window. Check that again Finall got it workingthanks for oyur help Link to comment Share on other sites More sharing options...
iuli_kyle Posted June 29, 2008 Share Posted June 29, 2008 It's impossible. Nothing is modified, but the parameter so it'll run with no window. Check that again Finall got it workingthanks for oyur helpNah, np . Anytime . Glad i could be helpful 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