AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

example: inputbox,loop,FileRecycle,

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions
View previous topic :: View next topic  
Author Message
sleepyy35



Joined: 22 Jul 2004
Posts: 194
Location: cedar city UT

PostPosted: Thu Oct 28, 2004 7:05 am    Post subject: example: inputbox,loop,FileRecycle, Reply with quote

Here is a good example I made using a inputbox, loop,and FileRecycle, command for anybody who might find this useful Smile
first i use the InputBox,
-------------------------------------
InputBox, UserInput1, file find, Please enter a file name., , 200, 100 ;Height & Width
if ErrorLevel <> 0
MsgBox, CANCEL was pressed.
; %c% being the c:\ drive that is being searched UserInput1 is what you type in the inputbox will also be used in the loop search as you can see by the Variable %UserInput1%.

else

Loop,%c%\%UserInput1%, , 1 ; Recurse into subfolders.
{
MsgBox, 4, , Filename = %A_LoopFileFullPath%`n`nContinue?
IfMsgBox, No
break

;useing the %A_LoopFileFullPath% Variable witch gives the The full path and name of the file/folder currently retrieved witch will show the full path and file name of the file being search.

MsgBox, 4, , del this file ? .`n`nContinue?
IfMsgBox, No
Continue

FileRecycle, %A_LoopFileFullPath%

}

; then useing the FileRecycle, command i have the option of sending the file search results to the Recycle bin

---------------------------------------------------------------------------------
I hope I have not confused anyone Rolling Eyes but here is the full script I hope this EXAMPLE has help someone Smile


InputBox, UserInput1, file find, Please enter a file name., , 200, 100
if ErrorLevel <> 0
MsgBox, CANCEL was pressed.
else


Loop,%c%\%UserInput1%, , 1 ; Recurse into subfolders.
{
MsgBox, 4, , Filename = %A_LoopFileFullPath%`n`nContinue?
IfMsgBox, No
break

MsgBox, 4, , del this file ? .`n`nContinue?
IfMsgBox, No
Continue

FileRecycle, %A_LoopFileFullPath%

}
_________________
^sleepy^
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group