@SryMyEng: this script is written for AutoHotkey basic, so if you would like to use it you can run it using AutoHotkey basic (just download the zip file <!-- m -->http://www.autohotkey.com/download/<!-- m --> and extract AutoHotkey.exe)
OR you could try:
- Open script in your text editor (notepad)
- Do a find & replace: find [ replace _
- Do another find & replace: find ] replace _
- Save and try to run the script, it might work.
The main reason it doesn't work with ahk_l is the use of [] in the variable names. They are now reserve for true arrays and objects so by replacing them with _ it should work. Good luck.
Favorite Folders popup menu that you can change on the fly.
Started by
ChrisM
, Nov 28 2004 09:38 PM
172 replies to this topic
#166
-
Posted 24 November 2011 - 04:45 PM
Thank you for your reply!
I've tried to do as you say, but, unfortunately, it does not work.
Sorry for my English!
I've tried to do as you say, but, unfortunately, it does not work.
Sorry for my English!
#167
-
Posted 25 November 2011 - 01:39 AM
Any ideas on how to get the menu to show the full path of shortcuts in the favorites folder, instead of just the filename of the shortcuts?
I spent about 30 minutes looking at the script, but I couldn't begin to figure it out. It seems like this may be possible with only a few changes, though.
I spent about 30 minutes looking at the script, but I couldn't begin to figure it out. It seems like this may be possible with only a few changes, though.
#168
-
Posted 27 May 2012 - 09:11 PM
Guys, long time user of this script. I depend on it, but I just upgraded to Windows 7 and it seems to not work on new explorer windows opened. How do I fix this?
#169
-
Posted 18 September 2012 - 09:32 AM
I think it has something to do with the breadcrumb bar/explorer address bar.
If i click on the breadcrumb bar and it shows the full path/or I press ALT+D, I am able to use the FavFolder pop up on that new explorer window again. Anyway to fix this?
If i click on the breadcrumb bar and it shows the full path/or I press ALT+D, I am able to use the FavFolder pop up on that new explorer window again. Anyway to fix this?
#171
-
Posted 18 September 2012 - 09:53 AM
I'm using Windows 7 64 bit and AHK_L. I'm not using Favorite Folders at this time. I think I pulled the bits out of it that I needed. Could you add a send command to automate the clicking on the explorer window? This is what I ended up with (might help give you some ideas):
OpenPath( target ) { sleep 200 ; WinGetActiveTitle, CUR ; msgbox class 32770, %CUR% ; class 32770, Enter name of file to save to… WinGet, f_window_id, ID, A WinGet, f_window_min, MinMax If ( f_window_min == -1 ) ; Only detect windows not Minimized. f_window_id = WinGetClass, f_class, ahk_id %f_window_id% If f_class in #32770,ExploreWClass,CabinetWClass,dopus.lister ; Dialog or Explorer. ControlGetPos, f_Edit1Pos,,,, Edit1, ahk_id %f_window_id% If f_AlwaysShowMenu = n ; The Menu should be shown only selectively. { If f_class in #32770,ExploreWClass,CabinetWClass ; Dialog or Explorer. { If f_Edit1Pos = ; The Control doesn't Exist, so don't display the Menu ;msgbox here Return } Else If f_class <> ConsoleWindowClass { IfNotInString, f_class, bosa_sdm_ ; Microsoft Office application ;msgbox there Return ; Since it's some other window type, don't display Menu. } } ; It's a dialog. If f_class = #32770 { [color=#FF0000]Send {F4}[/color] [color=#FF0000]sleep 100[/color] send ^a%target%{Enter} If f_Edit1Pos <> ; And it has an Edit1 Control. { ; Activate the window so that if the user is middle-clicking ; outside the dialog, subsequent clicks will also work: WinActivate ahk_id %f_window_id% ; Retrieve any filename that might already be in the field so ; that it can be restored after the switch to the new folder: ControlGetText, text, Edit1, ahk_id %f_window_id% ControlSetText, Edit1, %target%, ahk_id %f_window_id% ControlSend, Edit1, {Enter}, ahk_id %f_window_id% Sleep, 100 ; It needs extra time on some dialogs or in some cases. ControlSetText, Edit1, %text%, ahk_id %f_window_id% Return } ; else fall through to the bottom of the subroutine to take standard action. } ; In Explorer, switch folders. Else If f_class in ExploreWClass,CabinetWClass,dopus.lister { ;msgbox lister If f_Edit1Pos <> ; And it has an Edit1 Control. { ;ControlSetText, Edit1, %target%, ahk_id %f_window_id% ; Tekl reported the following: "If I want to change to Folder L:\folder ; then the addressbar shows http://www.L:\folder.com. To solve this, ; I added a {right} before {Enter}": ;ControlSend, Edit1, {Right}{Enter}, ahk_id %f_window_id% [color=#FF0000]Send {F4}[/color] [color=#FF0000]sleep 100[/color] send ^a%target%{Enter} Return } else { [color=#FF0000]Send {F4}[/color] [color=#FF0000]sleep 100[/color] send ^a%target%{Enter} return } ; else fall through to the bottom of the subroutine to take standard action. } ; Microsoft Office application Else IfInString, f_class, bosa_sdm_ { sleep 100 ; msgbox f_class, bosa_sdm_ ; Activate the window so that if the user is middle-clicking ; outside the dialog, subsequent clicks will also work: WinActivate ahk_id %f_window_id% ; Retrieve any file name that might already be in the File name ; control, so that it can be restored after the switch to the new ; folder. ControlGetText, text, RichEdit20W2, ahk_id %f_window_id% ControlClick, RichEdit20W2, ahk_id %f_window_id% ControlSetText, RichEdit20W2, %target%, ahk_id %f_window_id% ControlSend, RichEdit20W2, {Enter}, ahk_id %f_window_id% Sleep, 100 ; It needs extra time on some dialogs or in some case ControlSetText, RichEdit20W2, %text%, ahk_id %f_window_id% Return } ; In a console window, CD to that directory Else If f_class in ConsoleWindowClass,Console Main Command Window { ; msgbox Main Command Window WinActivate, ahk_id %f_window_id% ; Because sometimes the mClick deactivates it. SetKeyDelay, 1 ; This will be in effect only for the duration of this ThRead. IfInString, target, : ; It Contains a Drive letter { StringLeft, target_Drive, target, 1 Send %target_Drive%:{Enter} } Send, cd %target%{Enter} Return } ; Since the above didn't return, one of the following is true: ; 1) It's an unsupported window type but f_AlwaysShowMenu is y (yes). ; 2) It's a supported type but it lacks an Edit1 control to facilitate the custom ; action, so instead do the default action below. Run, %target%,, UseErrorLevel StringUpper, tmp, ErrorLevel If ( tmp == "ERROR" ) MsgBox, 4096, Error, Could not open: %target%, 30 Return }
#173
-
Posted 21 September 2012 - 12:45 AM