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 

identify recycle bin
Goto page Previous  1, 2
 
Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
aCkRiTe



Joined: 21 Jul 2006
Posts: 555

PostPosted: Tue Nov 14, 2006 4:17 am    Post subject: Reply with quote

Quote:
isnt this the purpose of ahk anyway?

Yes, that is the purpose of AHK. Just seems to me me that a script for this is un-needed, but I see its not for you and thats OK... Anyways I found a few bugs and Im in the process of fixing this just for you, but should I even continue? You seem offended by my last post (I didnt want it to come across that way).
Back to top
View user's profile Send private message
user



Joined: 05 Oct 2006
Posts: 476

PostPosted: Tue Nov 14, 2006 4:56 am    Post subject: Reply with quote

nah no offence
Back to top
View user's profile Send private message
aCkRiTe



Joined: 21 Jul 2006
Posts: 555

PostPosted: Tue Nov 14, 2006 5:30 am    Post subject: Reply with quote

Ok I think this should do the trick! Very Happy BTW I changed it to left clicking the Recycle Bin once cause the right click left the right click menu up when right clicking it. If that make sense Razz Also if you want to get something out of the Recycle Bin you will need to right click on it and select 'Open' since any left click on it will empty it. Another thing is if you move the Recycle Bin, you will need to relaunch the script. And of course if you dont like it with the left click you can change 'LButton' to 'RButton' in the 5th to last line in the script. Hope this works for ya...

Code:

#SingleInstance Force
#Persistent
#NoEnv
SetBatchLines, -1
FileAppend, , Temp.Tmp
FileRecycle, Temp.Tmp
CoordMode, Pixel, Screen
Trans = 0
SysGet, SM_CXICON, 11
SysGet, SM_CYICON, 12
Sleep, 500
Loop
   {
      TrayTip, Detecting Recyle Bin Icon, Please Wait...
      ImageSearch, VarX, VarY, 0, 0, A_ScreenWidth, A_ScreenHeight, *%Trans% *W%SM_CXICON% *H%SM_CYICON% *Icon33 C:\WINDOWS\system32\SHELL32.dll
      If VarX =
         If VarY =
            {
               Trans := Trans + 20
               Continue
            }
      If VarX = 0
         {}
      Else If VarY = 0
            {
               Trans := Trans + 20
               Continue
            }
      If Trans > 255
            {
               MsgBox, 16, , Unable to find the Recycle Bin icon.
               ExitApp
            }
      Break
   }
TrayTip, Detection Done!, Script is ready for use!, 10
SM_CXICON := VarX + SM_CXICON
SM_CYICON := VarY + SM_CYICON
CoordMode, Mouse, Screen
ToolTip
SetTimer, GetMouseCursorPos, 0
Return
GetMouseCursorPos:
MouseGetPos, VarXX, VarYY
If VarXX between %VarX% and %SM_CXICON%
   If VarYY between %VarY% and %SM_CYICON%
      {
         GetKeyState, State, LButton
         If State = D
            FileRecycleEmpty
      }
Return


This is just an FYI in case you didnt know...
You can right click on the Recycle Bin and go into the properties and set it to auto delete anything that goes in the Recycle Bin, if thats any use to ya...
Back to top
View user's profile Send private message
user



Joined: 05 Oct 2006
Posts: 476

PostPosted: Fri Nov 17, 2006 3:34 pm    Post subject: Reply with quote

ok, maybe left click should be better, but atm I would like right click

why it looks so complicated to me?
why cant I do with in a few lines?


1)
rbutton only when I click on recycle bin icon > block context menu with return > run FileRecycleEmpty command > click yes in the confirmation dialog

2)
rbutton > open context menu > send "b" (it will empty the recycle bin) only when recycle bin context menu is active > click yes in the confirmation dialog

all seem so easy, but the problem is that I cant identify correctly recycle bin icon and recycle bin context menu
Back to top
View user's profile Send private message
aCkRiTe



Joined: 21 Jul 2006
Posts: 555

PostPosted: Fri Nov 17, 2006 3:43 pm    Post subject: Reply with quote

Quote:
why cant I do with in a few lines?
Shocked Shocked Shocked Shocked Shocked Shocked Shocked Shocked Shocked

Good luck with that....

BTW... I am done with this topic. Sorry User I cant change the world! I give you what you want and yet your still not satisfied!
Back to top
View user's profile Send private message
user



Joined: 05 Oct 2006
Posts: 476

PostPosted: Fri Nov 17, 2006 4:09 pm    Post subject: Reply with quote

its not what I wanted exactly

and I wanted to ask some questions
Back to top
View user's profile Send private message
aCkRiTe



Joined: 21 Jul 2006
Posts: 555

PostPosted: Fri Nov 17, 2006 4:26 pm    Post subject: Reply with quote

Quote:
my intention was to actually empty recycle bin by right clicking on it...

Ok... I gave you exactly that!

then you say:

Quote:
its not what I wanted exactly


I dont think you even know what you want...

Quote:
why it looks so complicated to me?

Just run the script and when you right click on the Recycle Bin, it empties it! What is so complicated about that?! Well like I said before you would need to change the LButton to RButton in the script....
Back to top
View user's profile Send private message
user



Joined: 05 Oct 2006
Posts: 476

PostPosted: Fri Nov 17, 2006 5:26 pm    Post subject: Reply with quote

but you said that
aCkRiTe wrote:
BTW I changed it to left clicking the Recycle Bin


:s
Back to top
View user's profile Send private message
aCkRiTe



Joined: 21 Jul 2006
Posts: 555

PostPosted: Fri Nov 17, 2006 6:03 pm    Post subject: Reply with quote

Geez.... Evil or Very Mad

and this was in that same post!
Quote:
And of course if you dont like it with the left click you can change 'LButton' to 'RButton' in the 5th to last line in the script.
Back to top
View user's profile Send private message
user



Joined: 05 Oct 2006
Posts: 476

PostPosted: Sun Nov 19, 2006 6:35 am    Post subject: Reply with quote

man it does not work

either with RButton of LButton

how did it work for you?

why I cant identify the things I want, what is going one?

I want to identify recycle bin desktop icon, recycle bin context menu

can anyone tell me?
Back to top
View user's profile Send private message
(sorry)
Guest





PostPosted: Wed Nov 22, 2006 1:03 pm    Post subject: Reply with quote

@user : no !
@aCkRiTe : at least you tried Smile No luck Mr. Green
Back to top
(I'm sorry too)
Guest





PostPosted: Wed Nov 22, 2006 1:19 pm    Post subject: Reply with quote

a typo ?
Quote:
why I cant identify the things I want, what is going on (with m)e?
Back to top
user



Joined: 05 Oct 2006
Posts: 476

PostPosted: Wed Nov 22, 2006 3:56 pm    Post subject: Reply with quote

uh uh

get register coward

and better speak when you have an answer to the questions instead of polluting the forum with your nonsense
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Goto page Previous  1, 2
Page 2 of 2

 
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