star2 Posted May 19, 2007 Posted May 19, 2007 (edited) hi there this example is made by the request of floker download the Folder2MyPC.exe file and make your script file in the same dir here is the example script expandcollapse popup;made by Star2 #include <GUIConstants.au3> $main = GUICreate ("example",250,90) GUICtrlCreateLabel ("Automated setup example",10,10) $Accept = GUICtrlCreateCheckbox ("Accept Agreement",15,30) $dont = GUICtrlCreateCheckbox ("Don't Run After Setup",15,55) $go = GUICtrlCreateButton ("Run Setup",170,33,70,40) GUIctrlSetState ($go,$GUI_DISABLE) GUISetState () While 1 $msg = GUIGetMsg() If GUICtrlRead($Accept) = 1 Then If Not BitAND(GUICtrlGetState($go), $GUI_ENABLE) then GUICtrlSetState($go, $GUI_ENABLE) EndIf If GUICtrlRead($Accept) = 4 Then If Not BitAND(GUICtrlGetState($go), $GUI_DISABLE) then GUICtrlSetState($go, $GUI_DISABLE) EndIf If $msg = $go Then Run ("Folder2MyPC.exe") GUISetState (@SW_HIDE , $main) WinWaitActive ("","Please select a language") Send ("{ENTER}") WinWaitActive ("Folder2MyPC 1.8.0.0 Setup","Welcome to the Folder2MyPC 1.8.0.0 Setup Wizard") Send ("[enter]") WinWaitActive ("","Please review the license terms before installing") If GUICtrlRead ($Accept) = 1 Then Send ("{tab}") Sleep (500) Send ("{space}") Sleep (1000) ; to make sure your preset option works Send ("{ENTER}") EndIf WinWaitActive ("Folder2MyPC 1.8.0.0 Setup ","Destination Folder") Send ("{tab 3}") Send ("{space}") WinWaitActive ("","Choose a Start Menu folder") Send ("{ENTER}") WinWaitActive ("","Run Folder2MyPC 1.8.0.0") Select Case GUICtrlRead ($dont) = 1 Send ("{space}") Send ("!f") SplashTextOn ("","ALL DONE",200,90,-1,-1,32,-1,20,600) Sleep (2000) Exit Case GUICtrlRead ($dont) = 4 Send ("!f") SplashTextOn ("","ALL DONE",200,90,-1,-1,32,-1,20,600) Sleep (2000) Exit EndSelect EndIf WEnd see yaFolder2MyPC.exe Edited May 19, 2007 by star2 [quote]Baby you're all that I want, When you're lyin' here in my armsI'm findin' it hard to believe, We're in heavenAnd love is all that I need , And I found it there in your heartIt isn't too hard to see, We're in heaven .Bryan Adams[/quote].............................................................................[u]AUTOIT[/u]
Golbez Posted May 19, 2007 Posted May 19, 2007 (edited) hi there this example is made by the request of floker download the Folder2MyPC.exe file and make your script file in the same dir here is the example script see ya expandcollapse popup;made by Star2 ;fixxed and improved by Golbez Dim $Accept, $dont, $go, $main, $msg, $check #include <GUIConstants.au3> $main = GUICreate ("example",250,90) GUICtrlCreateLabel ("Automated setup example",10,10) $Accept = GUICtrlCreateCheckbox ("Accept Agreement",15,30) $dont = GUICtrlCreateCheckbox ("Don't Run After Setup",15,55) $go = GUICtrlCreateButton ("Run Setup",170,33,70,40) GUIctrlSetState ($go,$GUI_DISABLE) GUISetState () GUISetOnEvent($GUI_EVENT_CLOSE, "Terminate", $main) While 1 $msg = GUIGetMsg() If GUICtrlRead($Accept) = 1 Then Opt("GUIONEVENTMODE", 0) $check = 1 If Not BitAND(GUICtrlGetState($go), $GUI_ENABLE) then GUICtrlSetState($go, $GUI_ENABLE) EndIf If GUICtrlRead($Accept) = 4 Then If Not BitAND(GUICtrlGetState($go), $GUI_DISABLE) then GUICtrlSetState($go, $GUI_DISABLE) endif EndIf If $msg = $go Then Run ("Folder2MyPC.exe") GUISetState (@SW_HIDE , $main) WinWaitActive ("","Please select a language") Send ("{ENTER}") WinWaitActive ("Folder2MyPC 1.8.0.0 Setup","Welcome to the Folder2MyPC 1.8.0.0 Setup Wizard") Send ("[enter]") WinWaitActive ("","Please review the license terms before installing") If GUICtrlRead ($Accept) = 1 Then Send ("{tab}") Sleep (500) Send ("{space}") Sleep (1000) ; to make sure your preset option works Send ("{ENTER}") EndIf WinWaitActive ("Folder2MyPC 1.8.0.0 Setup ","Destination Folder") Send ("{tab 3}") Send ("{space}") WinWaitActive ("","Choose a Start Menu folder") Send ("{ENTER}") WinWaitActive ("","Run Folder2MyPC 1.8.0.0") Select Case GUICtrlRead ($dont) = 1 Send ("{space}") Send ("!f") SplashTextOn ("","ALL DONE",200,90,-1,-1,32,-1,20,600) Sleep (2000) terminate() Case GUICtrlRead ($dont) = 4 Send ("!f") SplashTextOn ("","ALL DONE",200,90,-1,-1,32,-1,20,600) Sleep (2000) terminate() EndSelect EndIf Else Opt("GUIONEVENTMODE", 1) If GUICtrlRead($Accept) <> 1 and $check = 1 Then $check = 0 GUICtrlSetState($go, $GUI_DISABLE) endif EndIf WEnd Func terminate() Exit EndFunc fixxed and improved on his script. it will work flawlessly now {the main gui.. i didnt mess with the setup thing } Edited May 19, 2007 by Golbez
star2 Posted May 20, 2007 Author Posted May 20, 2007 fixxed and improved on his script. it will work flawlessly now {the main gui.. i didnt mess with the setup thing }exremely nice jobcan u do a little explaining about what u added and whythanks [quote]Baby you're all that I want, When you're lyin' here in my armsI'm findin' it hard to believe, We're in heavenAnd love is all that I need , And I found it there in your heartIt isn't too hard to see, We're in heaven .Bryan Adams[/quote].............................................................................[u]AUTOIT[/u]
star2 Posted May 22, 2007 Author Posted May 22, 2007 Nice work for both of you, thx guys GLAD WE COULD HELP did my example script work with what u need? [quote]Baby you're all that I want, When you're lyin' here in my armsI'm findin' it hard to believe, We're in heavenAnd love is all that I need , And I found it there in your heartIt isn't too hard to see, We're in heaven .Bryan Adams[/quote].............................................................................[u]AUTOIT[/u]
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