AutoHotkey Community

It is currently May 26th, 2012, 11:38 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 9 posts ] 
Author Message
PostPosted: November 6th, 2009, 2:51 pm 
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]


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: November 6th, 2009, 9:19 pm 
Offline

Joined: August 22nd, 2009, 11:23 pm
Posts: 294
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.

_________________
Image
"Man's quest for knowledge is an expanding series whose limit is infinity"


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 6th, 2009, 10:09 pm 
use keywait to check the {enter}


Report this post
Top
  
Reply with quote  
PostPosted: November 7th, 2009, 1:00 am 
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 ?


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: November 7th, 2009, 1:29 am 
Offline

Joined: June 16th, 2008, 6:19 am
Posts: 66
Here's what I use --->

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


note - No Prompts ! so, be sure ........


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 7th, 2009, 1:29 am 
Code:
+d::
keywait, enter, t1
FileRecycleEmpty
return


Report this post
Top
  
Reply with quote  
PostPosted: November 7th, 2009, 4:18 am 
ahh i see, you delineate the commands by line. i thought it was kinda like a regular expression thing. thank you !


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: November 7th, 2009, 5:28 am 
correction, forgot to put the errorlevel check
Code:
+d::
keywait, enter, t1
if ErrorLevel =1
FileRecycleEmpty
return


Report this post
Top
  
Reply with quote  
 Post subject: Correct Script
PostPosted: December 26th, 2011, 5:27 pm 
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


Report this post
Top
  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 9 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: Bing [Bot], Leef_me, Pulover, rbrtryn, XstatyK and 44 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group