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 

Hotkey to empty recycle bin

 
Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
radAdam
Guest





PostPosted: Fri Nov 06, 2009 1:51 pm    Post subject: Hotkey to empty recycle bin Reply with quote

Hey im an idiot. I making a hot key to delete my recycling bin for me ,

so far this works

+d:: FileRecycleEmpty

which is just shift + d , but id like the sequence to be

shift, d , then enter.

everytime i try to tack on third param i get an error when i reload the script. Halp!

[Title edited. Please write descriptive titles for your topics. ~jaco0646]
Back to top
txquestor



Joined: 22 Aug 2009
Posts: 294

PostPosted: Fri Nov 06, 2009 8:19 pm    Post subject: Reply with quote

Post your entire script so we can see exactly what you are doing.

Also put your script between the Code Tags
Code:
you're script
for easy viewing.
_________________

"Man's quest for knowledge is an expanding series whose limit is infinity"
Back to top
View user's profile Send private message
Guest






PostPosted: Fri Nov 06, 2009 9:09 pm    Post subject: Reply with quote

use keywait to check the {enter}
Back to top
radAdam
Guest





PostPosted: Sat Nov 07, 2009 12:00 am    Post subject: Script to automatically empty the recycling bin Reply with quote

Code:
; IMPORTANT INFO ABOUT GETTING STARTED: Lines that start with a
; semicolon, such as this one, are comments.  They are not executed.

; This script has a special filename and path because it is automatically
; launched when you run the program directly.  Also, any text file whose
; name ends in .ahk is associated with the program, which means that it
; can be launched simply by double-clicking it.  You can have as many .ahk
; files as you want, located in any folder.  You can also run more than
; one ahk file simultaneously and each will get its own tray icon.

; SAMPLE HOTKEYS: Below are two sample hotkeys.  The first is Win+Z and it
; launches a web site in the default browser.  The second is Control+Alt+N
; and it launches a new Notepad window (or activates an existing one).  To
; try out these hotkeys, run AutoHotkey again, which will load this file.

#z::Run www.autohotkey.com

^!n::
IfWinExist Untitled - Notepad
   WinActivate
else
   Run Notepad
return

+d:: FileRecycleEmpty

; Note: From now on whenever you run AutoHotkey directly, this script
; will be loaded.  So feel free to customize it to suit your needs.

; Please read the QUICK-START TUTORIAL near the top of the help file.
; It explains how to perform common automation tasks such as sending
; keystrokes and mouse clicks.  It also explains more about hotkeys.


+d:: FileRecycleEmpty works , but i would like the sequence to be ,

shift , d , enter , so do i just say

+d keywait{enter}:: FileRecycleEmpty ?
Back to top
geor



Joined: 16 Jun 2008
Posts: 66

PostPosted: Sat Nov 07, 2009 12:29 am    Post subject: Reply with quote

Here's what I use --->

Code:

#Enter::   FileRecycleEmpty
return
;         **** Recycle Bin Empty - no prompts ****


note - No Prompts ! so, be sure ........
Back to top
View user's profile Send private message
Guest






PostPosted: Sat Nov 07, 2009 12:29 am    Post subject: Reply with quote

Code:
+d::
keywait, enter, t1
FileRecycleEmpty
return
Back to top
radAdam
Guest





PostPosted: Sat Nov 07, 2009 3:18 am    Post subject: Empty recyclebin with hotkey Reply with quote

ahh i see, you delineate the commands by line. i thought it was kinda like a regular expression thing. thank you !
Back to top
Guest






PostPosted: Sat Nov 07, 2009 4:28 am    Post subject: Reply with quote

correction, forgot to put the errorlevel check
Code:

+d::
keywait, enter, t1
if ErrorLevel =1
FileRecycleEmpty
return
Back to top
GuestNotCorrect
Guest





PostPosted: Mon Dec 26, 2011 4:27 pm    Post subject: Correct Script Reply with quote

Here's the correct code which works, I made it to be compatible to the Empty trash key combination in MAC OS X

Code:
 #+Backspace::
keywait, Enter, D, T3
if (ErrorLevel = 0) {
FileRecycleEmpty
}
return
Back to top
Display posts from previous:   
Reply to topic    AutoHotkey Community Forum Index -> Ask for Help 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