topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Friday December 13, 2024, 3:53 pm
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Last post Author Topic: last window id  (Read 35892 times)

ewemoa

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 2,922
    • View Profile
    • Donate to Member
Re: last window id
« Reply #25 on: March 19, 2009, 01:28 AM »
Have tested so far with some success:

  • %LASTURL%
  • %LASTURLSET%
  • %CUSTOMFILEBROWSER%
  • %CUSTOMWEBBROWSER%
  • %MAXRESULTS%
  • %MAXRESULTSDEF%
  • %MAXRESULTSEXT%

Edit: added two more
« Last Edit: March 19, 2009, 01:46 AM by ewemoa »

skajfes

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 267
    • View Profile
    • Donate to Member
Re: last window id
« Reply #26 on: March 19, 2009, 06:31 PM »
Would be nice with user variable 'FileManager=[customfilemanager]' so it'll open a dir in a user's favourite file manager if no Open Dialog is... open. Even better would be if it could read FARR's setting for custom file explorer, but I don't know if that's possible.

I went a step further. I have modified the ahk script a bit to open a new window in Windows' default browser. And yeah, changing folders in Total commander is also supported now...

This is a really great plugin/alias idea. Simple, effective, brilliant. I am using it a whole day now and I just can't get enough of it.

5+ for the idea cardboard42
It is impossible to make anything foolproof because fools are so ingenious.

TucknDar

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 1,133
    • View Profile
    • Donate to Member
Re: last window id
« Reply #27 on: March 21, 2009, 02:13 AM »
There seems to be some odd behaviour when using the 'fao' alias then type some directory, some other aliases are shown as well:
FindAndRunRobot.exe Screenshot - 21.03.2009 , 08_09_15.png

This looks much like the bug reported in this thread, where if the search string ends with a \ some aliases will be shown as results as well.

TucknDar

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 1,133
    • View Profile
    • Donate to Member
Re: last window id
« Reply #28 on: March 21, 2009, 02:22 AM »
Ok, found out a fix/workaround... the fao alias was missing an Alias group name, and when I added it, this problem is solved. Why? errm.. mouser...?

ewemoa

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 2,922
    • View Profile
    • Donate to Member
Re: last window id
« Reply #29 on: March 21, 2009, 04:58 AM »
I don't have an answer to your question, but FWIW, the change you made is one I made as well :)

rulfzid

  • Participant
  • Joined in 2008
  • *
  • Posts: 28
    • View Profile
    • Donate to Member
Re: last window id
« Reply #30 on: March 23, 2009, 03:33 AM »
As promised, here is the update, including the editor, and compatibility with a bunch more programs.

It now supports Windows Explorer, 7-zip, WinRAR, FileZilla, ACDSee Classic, XnView, xplorer^2, Directory Opus, MS Office 2007 dialogs, and console windows.

Included is the alias "fafedit", which will allow you to easily edit your favorite folders list.

Additionally, I've updated the FarrFolders.exe so that it handles command-line arguments correctly. AHK has a problem with command line arguments that end in a slash, so I've gone with a windows api method that handles those correctly, if double quoted. It will now handle the quoting for you.

Anyway, enjoy, and let me know if there are any problems.

ewemoa

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 2,922
    • View Profile
    • Donate to Member
Re: last window id
« Reply #31 on: March 23, 2009, 07:20 AM »
Hurray!  Root folders (drives) seem to work for me now :Thmbsup:

I've noticed something odd.

Sometimes (?) I experience the following sequence:

  • Bring up FARR with the text edit field pre-filled w/ +fao (I have a hotkey configured for this)
  • Press the Home key
  • Type S:\
  • After I type the backslash, the cursor jumps to the end of the text in the text edit field (right after the 'o' in '+fao')

Any thoughts on why this might be happening?

ewemoa

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 2,922
    • View Profile
    • Donate to Member
Re: last window id
« Reply #32 on: February 02, 2010, 05:37 AM »
I added support for Emacs in FarrFolders.ahk by adding the snippet:

Code: AutoIt [Select]
  1. else if f_class = Emacs
  2. {
  3.   WinActivate ahk_id %f_window_id%
  4.   Send, ^x^f
  5.   Send, %f_path%{enter}
  6. }

Both files and folders are supported -- at least they both seem to work locally.

Note: This code assumes the user hasn't changed the standard keybindings of Emacs for the find-file command.

CatamountJack

  • Supporting Member
  • Joined in 2008
  • **
  • Posts: 56
    • View Profile
    • Donate to Member
Re: last window id
« Reply #33 on: February 02, 2010, 05:47 PM »
I watch these forums almost religiously, so how come I have not see this before?!?!?!

:-* I've been wanting exactly this since I first started using FARR.  And it's 100x more important now that Microsoft has butchered the Open/Save dialogs in Windows 7 so badly that I can't easily use the mouse to find anything.

This made my week (and it's only Tuesday!)!  Thank you!!! :up: :up: :up: :up:

alias

  • Supporting Member
  • Joined in 2008
  • **
  • Posts: 71
    • View Profile
    • Donate to Member
Re: last window id
« Reply #34 on: February 03, 2010, 11:30 AM »
VERY interesting....  Does something similar exist for Vi/Vim bindings?

Mark

ewemoa

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 2,922
    • View Profile
    • Donate to Member
Re: last window id
« Reply #35 on: February 03, 2010, 04:47 PM »
VERY interesting....  Does something similar exist for Vi/Vim bindings?

Not as far as I know.

If I recall correctly, it might be slightly tricky because of the modal-ness.  BTW, which Vi/Vim are you using?

alias

  • Supporting Member
  • Joined in 2008
  • **
  • Posts: 71
    • View Profile
    • Donate to Member
Re: last window id
« Reply #36 on: February 03, 2010, 07:24 PM »
I use Vim for Windows (v7.2), ViEmu for Visual Studio, Word, & Outlook, and Wing IDE...

ewemoa

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 2,922
    • View Profile
    • Donate to Member
Re: last window id
« Reply #37 on: February 03, 2010, 08:05 PM »
Hmm...I don't have those things, but I did give GVimPortable a try.  

With the following code appropriately added to FarrFolders.ahk (followed by compiling the script and placing it in the appropriate location), I observed that opening files for editing seemed to work:

Code: AutoIt [Select]
  1. else if f_class = Vim
  2. {
  3.   WinActivate ahk_id %f_window_id%
  4.   Send, {Escape}:e %f_path%{enter}
  5. }

I tried using:

  :n .

followed by the enter key to do directory browsing in vim, but this didn't work here.

Edit: Ah, when I try w/ version 7.2, directory browsing seems to work...and the code snippet above seems to work as-is :)

FWIW, I used the AU3_Spy utility that comes w/ AutoHotkey to determine a value for ahk_class (used in the snippet above -- the value was Vim).
« Last Edit: February 03, 2010, 08:30 PM by ewemoa »

ebennetthill

  • Supporting Member
  • Joined in 2008
  • **
  • default avatar
  • Posts: 21
    • View Profile
    • Donate to Member
Re: last window id
« Reply #38 on: February 03, 2010, 08:28 PM »
New to FARR and having a gooood time playing with it and understanding its power.  :up:

FarrFolders is a very nice addon/alias, works great! I have a couple of really simple AutoHotKey scripts that I use to go to my most used folders in Directory Opus. I have them check to see if Directory Opus is open and then use that window if it is. Is there any way to get FarrFolders to use that behavior instead of opening the folder in a new window every time?

I read an earlier version of the FarrFolders.ahk, and I really didn't see how I could modify the Directory Opus part to do what I wanted, and the latest FarrFolders only comes with a compiled version any way. So I guess I guess I'm asking for a favor or some help or guidance and direction. Can I get FarrFolders to use an open window if one exists?

Thanks

ewemoa

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 2,922
    • View Profile
    • Donate to Member
Re: last window id
« Reply #39 on: February 03, 2010, 08:33 PM »
I don't have a good answer to your important question, however, regarding:

the latest FarrFolders only comes with a compiled version any way

IIUC, the ahk files were moved into a subfolder named "AHK files".  Do you see such a folder?

ebennetthill

  • Supporting Member
  • Joined in 2008
  • **
  • default avatar
  • Posts: 21
    • View Profile
    • Donate to Member
Re: last window id
« Reply #40 on: February 04, 2010, 10:21 AM »
IIUC, the ahk files were moved into a subfolder named "AHK files".  Do you see such a folder?

Well, uh, yes I do. :-[

That was kind of stupid.

Thanks. I'll try to look at it.

ewemoa

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 2,922
    • View Profile
    • Donate to Member
Re: last window id
« Reply #41 on: February 04, 2010, 04:01 PM »
I'll try to look at it.

Good luck with trying to make suitable changes!

FWIW, when I downloaded the latest version, one of my first thoughts was along the lines of "Oh no!  No more source :(". ;)

ebennetthill

  • Supporting Member
  • Joined in 2008
  • **
  • default avatar
  • Posts: 21
    • View Profile
    • Donate to Member
Re: last window id
« Reply #42 on: February 05, 2010, 11:06 AM »
I got it to do what I wanted! It uses an open Directory Opus window if one exists. I took out

Code: AutoIt [Select]
  1. ; Directory Opus
  2. else if f_class in dopus.lister
  3. {
  4.         ControlSetText, Edit2, %f_path%, ahk_id %f_window_id%
  5.         ControlSend, Edit2, {Right}{Enter}, ahk_id %f_window_id%
  6.         return
  7. }

in the middle of the script, and added my little script

Code: AutoIt [Select]
  1. else ifwinexist, ahk_class dopus.lister
  2. {
  3.         run,C:\Program Files\GPSoftware\Directory Opus\dopusrt.exe /cmd GO "%f_path%"
  4.         winactivate ahk_class dopus.lister
  5. }

just before the last "else".

It worked. :P Now it will switch to the chosen folder if Directory Opus is open, or start Directory Opus if not.

Powerful idea, cardboard42. Nice modifications, skajfes and rulfzid. Thanks for the help, ewemoa.
FARR is great.

ewemoa

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 2,922
    • View Profile
    • Donate to Member
Re: last window id
« Reply #43 on: February 06, 2010, 09:21 PM »
It worked. :P Now it will switch to the chosen folder if Directory Opus is open, or start Directory Opus if not.

Glad to hear it worked out for you  :Thmbsup:

FARR is great.

I concur...and DC, mouser, and others too ;)