chiners_68 Posted January 23, 2007 Posted January 23, 2007 ive got this script but need the bit in red to run minimized but prefered hidden. how can i cahnge this to do what i want.Opt("GUIOnEventMode", 1) ; Change to OnEvent mode$started = 1$mainwindow = GUICreate("Defragmentation", 200, 100) GUICtrlCreateLabel("Automating defrag in 6 seconds", 30, 10)$btnExit = GUICtrlCreateButton("Skip", 70, 50, 60);GUISetOnEvent($GUI_EVENT_CLOSE, "_Terminate")GUICtrlSetOnEvent($btnExit, "_Terminate")GUISetState(@SW_SHOW)While 1 Sleep(6000) If $started Then run("defrag.exe c: -f") EndIf ExitWendFunc _Terminate() ExitEndFunc
xcal Posted January 23, 2007 Posted January 23, 2007 Run ( "filename" [, "workingdir" [, flag[, standard_i/o_flag]]] ) How To Ask Questions The Smart Way
Moderators SmOke_N Posted January 23, 2007 Moderators Posted January 23, 2007 May want to look at ShellExecute() as well. Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.
chiners_68 Posted January 23, 2007 Author Posted January 23, 2007 (edited) cheers i was trying @SW_HIDE but it wouldnt work. ive put "" for working directorynow it works.. cheers now, how can I get a system drive variable in place of C: Edited January 23, 2007 by chiners_68
Moderators SmOke_N Posted January 23, 2007 Moderators Posted January 23, 2007 cheersi was trying @SW_HIDE but it wouldnt work. ive put "" for working directorynow it works.. cheersnow, how can I get a system drive variable in place of C:Run("defrag.exe " & @HomeDrive & " -f", '', @SW_HIDE) Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.
chiners_68 Posted January 23, 2007 Author Posted January 23, 2007 i changed it to minimize to chck it works & it apears not to run.. Run("defrag.exe " & @HomeDrive & " -f", ' ', @SW_MINIMIZE)
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