Messages - rulfzid [ switch to compact view ]

Pages: prev1 2 [3]
11
Find And Run Robot / Re: last window id
« on: March 17, 2009, 02:57 AM »
I hope I'm not stepping on any toes, but I had already come up with a solution, borrowing heavily from the Favorite Folders AHK script (which so many have come to know and love). I basically ripped off the meat of the script and passed it a couple of command-line arguments from FARR. I also tweaked it a tiny bit so that it works in Vista and 7.

You'll find 4 files in the zipped up alias pack:
  • FarrFolders.ahk
  • FarrFolders.alias
  • FarrFolders.exe
  • FarrFolders.ico

The AHK script is there in case anybody would like to tweak anything/view source. The alias itself uses the exe for ease of passing command-line parameters.

Basically, unzip the files into your AliasGroups/MyCustom folder. The alias itself is set to "faf", because i find that quick and easy to type and because "ff" kept showing "Microsoft Office" results for me.

Type "faf" into FARR, and you should see the three example folders. If the last window open is an explorer window, command console, or open file dialog, the script will navigate you to the selected folder in that window. If not, it will open a new explorer window.

To add more folders, simply edit the alias from within FARR (or directly in the FarrFolders.alias file). You'll see 3 examples already included:
  • Desktop | %ALIASDIR%\FarrFolders.exe %LASTHWND% %MYDESKTOP%
  • Program Files | %ALIASDIR%\FarrFolders.exe %LASTHWND% %PROGRAMFILES%
  • My Documents| %ALIASDIR%\FarrFolders.exe %LASTHWND% %MYDOCUMENTS%

As you can see, these take the form of:

<folder_name> | %ALIASDIR%\FarrFolders.exe %LASTHWND% <folder_path>

where <folder_name> is the name of the folder as you'd like it to appear in your results and <folder_path> is the full path to the folder, which can (and should) utilize the FARR virtual folder names as much as possible. Leave the rest of the line the same, obv.

mouser, I was thinking about creating a "faf" alias command to edit the list, but it seems as though if I edit the alias file externally, the list doesn't automatically update the next time I type the alias. I could get it to do so if I manually opened up the "edit alias" box and closed it again, but not otherwise. Is there a way to get it to automatically rescan the alias file and refresh the results list? I'd like to add this functionality.

Till then, enjoy! This alias has already become indispensable to me - I hope it proves useful to others.

12
Developer's Corner / Re: autohotkey arrays
« on: December 12, 2008, 12:31 AM »
I'm always fighting with them can you tell me what's the easiest way to maintain a list of strings, add a listitem, remove a listitem, return a listitem? For example I'd like to keep a list of hidden window titles and then unhide one and remove it from the list. Autohotkey makes it really hard, I usually build a concatenated string and split them into an array but then when i want to return a value but am not sure where its position is it's near impossible.

Any ideas?

I know this thread is a bit old, but here are a couple of threads you could take a look at from the AHK forums:

SimpleArray
AHKArray

Also, for your initial problem, I'd first recommend working with window handles instead of window titles, but either way, you could use the native AHK string commands, which are pretty fast:

hiddenwindowlist = window 1,window 2,window 3,window 4,

MsgBox, % "The current list: " hiddenwindowlist

unhide( "window 3", hiddenwindowlist)

MsgBox, % "The new list: " hiddenwindowlist

unhide( wintitle_to_unhide, ByRef wlist )
{
    If wintitle_to_unhide in %wlist%                            ; is wintitle_to_unhide in our list?
    {
        MsgBox, % "Unhiding " wintitle_to_unhide                ; then show the window
        StringReplace, wlist, wlist, %wintitle_to_unhide%`,     ; and remove it from the list
    }
}


13
N.A.N.Y. 2009 / Re: NANY 2009 Intro
« on: December 09, 2008, 02:20 PM »
2Perry Mowbray

I'm definitely in. Consider this my pledge.  :)

2fenixproductions

I think the idea is interesting, but I see a couple of problems:

First, I think result lists would get out of hand too fast, and crippling the number of results would cripple the usefulness of the tool. Consider the regex "(.*?)\(" or even just "[a-z]{2}", which would yield 26^2 results.

Additionally I think that such tool would be better for learning Regular Expressions than many other "regexp helper" tools. Currently for testing your expressions you have to have text file with already written content. That way you have to write each possible combination by yourself and then - check does expression match. Getting that in opposite way would be lot better even if crippled a little bit.
-fenixproductions (December 09, 2008, 04:53 AM)

Given the regular expressions are a tool for searching (finding patterns in strings), it makes sense to me that you test your regexes against currently existing content (in other words, a filtering tool is supposed to be different from a generative tool). And tools like: http://www.gskinner.com/RegExr/ allow you to see the result lists updated on the fly in the text, so I personally find those more valuable.

I'm kicking around a couple of ideas now, including your first textgen idea. I hope to decide on something soon, in order to get cracking!


14
N.A.N.Y. 2009 / Re: NANY 2009 Intro
« on: December 08, 2008, 06:34 PM »
I'd like to participate (mostly AHK coding), but don't have any ideas of my own (that I'll be able to implement by Jan. 1 - I've got some bigger things brewing and not enough time).

Is it too late to join?

If not, I'm looking for ideas. I looked at the communal idea thread: the virtual folder thing (at a quick glance) might be a little beyond me atm, but I'll need to take a closer look. I can probably pull of the mouse-wheel scroll thing pretty easily, so I suppose I could start with that.

I want to play, but I'm definitely looking for some inspiration - any more ideas?

-rulfzid

Pages: prev1 2 [3]
Go to full version