Jump to content

i need some help


Recommended Posts

ok so heres the deal i wrote a script that runs the disk clean up thing and writes the instructions for the person to follow to a notepad document i need someone to help me make a GUI that has a start button and a window for the instructions to be writen to so that i can get rid of the notepad thing, im gonna need help adding it in also. if there is any1 that can help let me know

btw this is the code:

;----------------------------------------------------------------------------
;
; AutoIt Version: 3.1.0
; Author:        Zmaster)atF( <ihonda4@gmail.com>
;
; Script Function:
;   Template AutoIt script.
;
; ----------------------------------------------------------------------------

; Script Start
; Place at the top of your script;ADDED
$g_szVersion = "My Script 1.1";ADDED
If WinExists($g_szVersion) Then Exit; It's already running;ADDED
AutoItWinSetTitle($g_szVersion);ADDED
; Rest of your script goes here;ADDED


;Displays tip from tray icon

TrayTip("Initiating DisKlean", "Now Starting DisKlean Please refer to the notepad that is being opened for instructions.", 

30, 1)

;Launchs notepad, & writes info to notepad document

Run("notepad.exe")
WinWaitActive('Untitled');ADDED
Send("~~DisKlean By: Zmaster)atF(~~{ENTER}")
Send("{ENTER}DO NOT CLOSE THIS WINDOW IT WILL CLOSE IT SELF LATER{ENTER}")

Send("{ENTER}Thank you for using my program, I promise that it is 100% safe to use.This window will automaticaly close itself 

when the wizard is done running. Please follow all instructions on this page once the text has idled or you will freeze the 

script if that happens restart the script or the wizard will not work.{ENTER}")


;Launchs Disk Clean Up

Sleep(800)
Run("cleanmgr.exe")
WinWaitActive("Disk Cleanup for  (C:)")
Sleep(800)


;Writes the Disk Clean Up instructions to Notepad


WinActivate("Untitled - Notepad")
Send("{ENTER}1. Make sure that the following Files to Delete are selected in the Disk Clean up for (C:) window")
Send("{ENTER}Downloaded Program Files{ENTER}")
Send("{ENTER}Temporary Internet Files{ENTER}")
Send("{ENTER}Recycle Bing{ENTER}")
Send("{ENTER}Temporary file{ENTER}")
Send("{ENTER}WebClient/Publisher Temporary Files{ENTER}")
Send("{ENTER}Compress old files{ENTER}")
Send("{ENTER}After all of those boxes are selected click OK.{ENTER}")
;change sleep value if it is taking too long
Sleep(30000)

Send("{ENTER}Thank you for using DisKlean By:Zmaster)atF( if you have any comments or questions send them to 

<ihonda1@gmail.com>. I strongly recommend that you run this program at least twice a month so that it does not take too long, 

a good schedule would be to run the program on the first of the month and then again on either the sixteenth or seventeenth. 

The more often you run the program the better it will work.")
Sleep(900)

WinClose("Untitled - Notepad", "")
WinWaitActive("Notepad", "The text in the Untitled file has changed")
Send("!n")

A great place to start Autoit 1-2-3

Link to comment
Share on other sites

  • Developers

think this belongs in the Support forum .. -> moving it

Also won't mind if you get rid of these images in you sig ... :)

Signatures Guidelines

Edited by JdeB

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...