| View previous topic :: View next topic |
| Author |
Message |
radAdam Guest
|
Posted: Fri Nov 06, 2009 1:51 pm Post subject: Hotkey to empty recycle bin |
|
|
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
|
Posted: Fri Nov 06, 2009 8:19 pm Post subject: |
|
|
Post your entire script so we can see exactly what you are doing.
Also put your script between the Code Tags for easy viewing. _________________
"Man's quest for knowledge is an expanding series whose limit is infinity" |
|
| Back to top |
|
 |
Guest
|
Posted: Fri Nov 06, 2009 9:09 pm Post subject: |
|
|
| use keywait to check the {enter} |
|
| Back to top |
|
 |
radAdam Guest
|
Posted: Sat Nov 07, 2009 12:00 am Post subject: Script to automatically empty the recycling bin |
|
|
| 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
|
Posted: Sat Nov 07, 2009 12:29 am Post subject: |
|
|
Here's what I use --->
| Code: |
#Enter:: FileRecycleEmpty
return
; **** Recycle Bin Empty - no prompts ****
|
note - No Prompts ! so, be sure ........ |
|
| Back to top |
|
 |
Guest
|
Posted: Sat Nov 07, 2009 12:29 am Post subject: |
|
|
| Code: | +d::
keywait, enter, t1
FileRecycleEmpty
return |
|
|
| Back to top |
|
 |
radAdam Guest
|
Posted: Sat Nov 07, 2009 3:18 am Post subject: Empty recyclebin with hotkey |
|
|
| 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
|
Posted: Sat Nov 07, 2009 4:28 am Post subject: |
|
|
correction, forgot to put the errorlevel check
| Code: |
+d::
keywait, enter, t1
if ErrorLevel =1
FileRecycleEmpty
return |
|
|
| Back to top |
|
 |
GuestNotCorrect Guest
|
Posted: Mon Dec 26, 2011 4:27 pm Post subject: Correct Script |
|
|
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 |
|
 |
|