eJan Posted March 9, 2005 Share Posted March 9, 2005 (edited) I missed something in $var or?#include <File.au3>#include <GUIConstants.au3>Dim $s_TempFile$grp = _TempFile()$btn = _TempFile()$cls = _TempFile()FileInstall("group.bmp", $grp)FileInstall("button.bmp", $btn)FileInstall("close.bmp", $cls)GUICreate("Program", 226, 89)GUICtrlCreatePic($grp, 2, 4, 221, 82)GUICtrlCreatePic($btn, 83, 63, 60, 18)GUICtrlCreatePic($cls, 13, 63, 60, 18)GUISetState(@SW_SHOW)While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE; --------------------------- files FileDelete($grp) FileDelete($btn) FileDelete($cls); -------------------------- to delete Exit EndSelectWEndHow to set files "$grp, $btn, $cls" to delete them in a single line (not to write line for each file). Edited March 9, 2005 by eJan Link to comment Share on other sites More sharing options...
CyberSlug Posted March 10, 2005 Share Posted March 10, 2005 (edited) How to set files "$grp, $btn, $cls" to delete them in a single line (not to write line for each file).What you have is the best way. ; An alternative but riskyFileDelete("*.bmp"); Trick from Larry if you want to combine certain commands on one line$foo = FileDelete($grp) + FileDelete($btn) + FileDelete($cls); Using DOS Commands--might require extra quotes if filenames contain spacesRun(@ComSpec & " /c del " & $grp & " " & $btn & " " & $cls, "", @SW_HIDE) Edited March 10, 2005 by CyberSlug Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig! Link to comment Share on other sites More sharing options...
eJan Posted March 10, 2005 Author Share Posted March 10, 2005 Thanks CyberSlug this one works fine; Trick from Larry if you want to combine certain commands on one line$foo = FileDelete($grp) + FileDelete($btn) + FileDelete($cls); An alternative but riskyFileDelete("*.bmp")(doesn't work because unique filenames was created [abcdefg.tmp]) 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