ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

DonationCoder.com Software > Post New Requests Here

IDEA: go to parent folder with double-click

<< < (2/5) > >>

jgpaiva:
But for that you always need to know what folder you are in as well. It is unlikely that running cd.. would work.
-justice (May 25, 2007, 05:22 AM)
--- End quote ---
A possible solution would be to send the backspace key... If nothing is selected, it'll go to parent folder ;)

justice:
ah yes so it's just turn double click into backspace.

The code below should get someone started but at the moment it sends backspace to any application for anything on double click, causing problems in texteditors etc ;) I need someone else to take it further.

Also it seems vista does the double click to parent window in explorer already. Also it might make sense to change it to double-rightclick which causes less interference.

--- ---; DaddyClick
; see http://translatecz.svarz.cz/2007/05/en-doubleclick-to-close-window.html  for similar script
; or the various help pages on ControlSend etc.
; todo: limit it to explorer , open/save dialogue box and special folders
;         limit to only run when not selected

#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.

~LButton Up::
If (A_PriorHotKey = A_ThisHotKey and A_TimeSincePriorHotkey < 500) {
; info about window/ control the mouse is hovering over
MouseGetPos,,,id,ControlHwnd,2
; information for tooltip
WinGetTitle, title, ahk_id %id%
WinGetClass, class, ahk_id %id%
ToolTip, ahk_id %id%`nahk_class %class%`n%title%`nControl: %ControlHwnd%

; send actual keystroke to control
ControlSend,,{BS},ahk_id %ControlHwnd%
}
Return

ak_:
I think i did it !

My code may be very messy and ugly but it seems to work. It's based on your code Justice :


--- ---; DaddyClick
; see http://translatecz.svarz.cz/2007/05/en-doubleclick-to-close-window.html  for similar script
; or the various help pages on ControlSend etc.
; todo: limit it to explorer , open/save dialogue box and special folders
;         limit to only run when not selected

#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.

~LButton Up::

If (A_PriorHotKey = A_ThisHotKey and A_TimeSincePriorHotkey < 500) {
if (class = "#32770" and IsSelected = 0) ; if active window is open/save dialog and no file/folder is selected
{
ControlSend,,{BS},ahk_id %ControlHwnd%
}
} else { ; on first click
; info about window/ control the mouse is hovering over
MouseGetPos,,,id,ControlHwnd,2
WinGetClass, class, ahk_id %id%
; checks if a file or folder is selected in the dialog box
ControlGet, IsSelected, List, Count Selected, SysListView321, ahk_id %id%
}
Return
Any improvement and/or advice is welcome :)

justice:
Hey great work :D
A use of controlget that I had not seen before  :Thmbsup: Well done!
I've enclosed a compiled version of the script.

ak_:
Thanks ! :)

I modified it so it works in explorer windows too.


--- ---Menu tray, icon, daddyclick.ico ; remove this if you don't want to use custom tray icon
; DaddyClick
; see http://translatecz.svarz.cz/2007/05/en-doubleclick-to-close-window.html  for similar script
; or the various help pages on ControlSend etc.
; todo: limit it to explorer , open/save dialogue box and special folders
;         limit to only run when not selected

#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.

~LButton Up::

If (A_PriorHotKey = A_ThisHotKey and A_TimeSincePriorHotkey < 500) {
if ((class = "#32770" or class="CabinetWClass" or class="ExploreWClass") and IsSelected = 0) ; if active window is open/save dialog and no file/folder is selected
{
ControlSend,,{BS},ahk_id %ControlHwnd%
}
} else { ; on first click
; info about window/ control the mouse is hovering over
MouseGetPos,,,id,ControlHwnd,2
WinGetClass, class, ahk_id %id%
; checks if a file or folder is selected in the dialog box
ControlGet, IsSelected, List, Count Selected, SysListView321, ahk_id %id%
}
Return
I also made an icon because i like to use custom tray icon so i can easily locate scripts in the tray. It is in the zip attached to this post.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version