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, 7:50 am
  • 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

Author Topic: DONE: RecentRun command line?  (Read 15565 times)

johnnyzero

  • Participant
  • Joined in 2006
  • *
  • default avatar
  • Posts: 25
    • View Profile
    • Donate to Member
DONE: RecentRun command line?
« on: March 21, 2006, 09:50 AM »
After looking for such a utility for quite a while, I "recently" discovered RecentRun for creating a Start menu folder with a list of my recently-used programs. Works great!

It would be even better if it supported a command-line argument (/purge or whatever) that would clear the list of recently-run programs and then load the program in the usual fashion. I've added RecentRun to my Startup folder so that it loads automatically on boot-up; with this command line option it would always start with a "clean slate" instead of preserving the recently-run program list between sessions. 

Also, how about a command-line option (/notray or whatever) that would load the program without its icon being visible in the System Tray?

Perhaps you could implement these features in a future release. In any case, thanks for creating such a useful little utility.

best,
JohnB
« Last Edit: April 25, 2006, 04:34 AM by brotherS »

skrommel

  • Fastest code in the west
  • Developer
  • Joined in 2005
  • ***
  • Posts: 933
    • View Profile
    • 1 Hour Software by skrommel
    • Donate to Member
Re: IDEA: RecentRun command line?
« Reply #1 on: March 24, 2006, 03:04 PM »
 :) Try RecentRun v1.2. I've added a Delete on startup option, and a /Hide command line parameter.

Skrommel

johnnyzero

  • Participant
  • Joined in 2006
  • *
  • default avatar
  • Posts: 25
    • View Profile
    • Donate to Member
Re: IDEA: RecentRun command line?
« Reply #2 on: March 25, 2006, 07:51 PM »
Thanks for implementing those suggestions so quickly, Skrommel! Both of the new functions work very well: /hide & "deleteonstartup". Were they already "in the works" before my post?

The new Settings dialog is a very nice touch. However, it seemed to have trouble writing the desired Menu Name to the .ini file; perhaps because the name I was trying to use contained a space ("Recent Programs")? Also, how about a field to enter the desired ShortcutFolder name as well - I noticed that the .ini file format now includes separate entries for both the "menuname" and "shortcutfolder".

Also, if the specified Start menu folder doesn't exist the first time you run RecentRun v1.2, it will create a Start menu folder called "ERROR" and write that value to the .ini - pretty weird...

Of course, I was able to work around all of this by manually editing the .ini file - I just thought you'd wanna know about any bugs.

thanks again for a great little utility (and for making it even better).

best,
JohnB


skrommel

  • Fastest code in the west
  • Developer
  • Joined in 2005
  • ***
  • Posts: 933
    • View Profile
    • 1 Hour Software by skrommel
    • Donate to Member
Re: IDEA: RecentRun command line?
« Reply #3 on: March 26, 2006, 11:53 AM »
 :) No, I had stopped developing RecentRun, so I messed up the Start menu folder and the shortcut folder.

Try RecentRun v1.3.

- Added option to move the shortcut folder.

Skrommel

johnnyzero

  • Participant
  • Joined in 2006
  • *
  • default avatar
  • Posts: 25
    • View Profile
    • Donate to Member
Re: IDEA: RecentRun command line?
« Reply #4 on: March 26, 2006, 01:11 PM »
Thanks again, Skrommel. RecentRun v1.3 works great!

best,
JohnB

IrmaIsfot

  • Charter Member
  • Joined in 2005
  • ***
  • default avatar
  • Posts: 9
    • View Profile
    • Donate to Member
Re: IDEA: RecentRun command line?
« Reply #5 on: April 24, 2006, 08:34 AM »
Well this sounded really good, but somehow it does not work for me...  :(

Since the sourcecode is not available as with all the other neat tools, I used Exe2Ahk to try to make sense of whats going on, or not.  From what I can find in the de-compiled code, the GETPROGRAMS loop tries to match the path of all current windows to a list held in the registry at HKEY_CURRENT_USER\Software\Microsoft\Windows\ShellNoRoam\MUICache
In my registry, that key holds something like this:
(Default)                               REG_SZ            (value not set)
@browselc.dll,-13137                    REG_SZ            &Address
@browselc.dll,-13138                    REG_SZ            &Links
@C:\WINNT\inf\unregmp2.exe,-9902        REG_SZ            Movie Clip
@C:\WINNT\inf\unregmp2.exe,-9903        REG_SZ            AIFF Format Sound
@C:\WINNT\inf\unregmp2.exe,-9904        REG_SZ            AU Format Sound
@C:\WINNT\inf\unregmp2.exe,-9905        REG_SZ            Video Clip
@C:\WINNT\inf\unregmp2.exe,-9907        REG_SZ            MIDI Sequence
@C:\WINNT\inf\unregmp2.exe,-9909        REG_SZ            Windows Media Audio/Video file
@C:\WINNT\inf\unregmp2.exe,-9910        REG_SZ            Windows Media Audio/Video playlist
@C:\WINNT\inf\unregmp2.exe,-9911        REG_SZ            Windows Media Audio shortcut
@C:\WINNT\inf\unregmp2.exe,-9915        REG_SZ            Windows Media Player Skin File
@C:\WINNT\inf\unregmp2.exe,-9920        REG_SZ            Windows Media Player Download Package
@C:\WINNT\inf\unregmp2.exe,-9924        REG_SZ            Windows Media Library
@C:\WINNT\System32\cdfview.dll,-4610    REG_SZ            Channel File
@C:\WINNT\System32\msi.dll,-34          REG_SZ            Windows Installer Package
@C:\WINNT\System32\msi.dll,-35          REG_SZ            Windows Installer Patch
@C:\WINNT\system32\shell32.dll,-8964    REG_SZ            Recycle Bin
@C:\WINNT\system32\shell32.dll,-9216    REG_SZ            My Computer
@C:\WINNT\system32\shell32.dll,-9217    REG_SZ            My Network Places
@C:\WINNT\system32\shell32.dll,-9227    REG_SZ            My Documents
@inetcplc.dll,-4731                     REG_SZ            Always expand ALT text for images
@inetcplc.dll,-4732                     REG_SZ            Move system caret with focus/selection changes
@inetcplc.dll,-4735                     REG_SZ            Use smooth scrolling
@inetcplc.dll,-4736                     REG_SZ            Enable offline items to be synchronized on a schedule
This goes on for quite a bit, making a long list.  There are no references to file paths at all in this key?!?!

So, is the Exe2Ahk wrong in de-compiling the code, or is my registry different from every body elses..?  I'm running an english Win2000.

I would be greatful for any thoughts on this matter... 

And it would be really great if the correct source code could be published at https://www.donation...m/Software/Skrommel/  :Thmbsup:

Thanks!
/IrmaIsfot

skrommel

  • Fastest code in the west
  • Developer
  • Joined in 2005
  • ***
  • Posts: 933
    • View Profile
    • 1 Hour Software by skrommel
    • Donate to Member
Re: IDEA: RecentRun command line?
« Reply #6 on: April 24, 2006, 11:07 AM »
 :tellme: I have no idea what version of RecentRun was on the server, but it should be corrected now, including the source code.

Skrommel

IrmaIsfot

  • Charter Member
  • Joined in 2005
  • ***
  • default avatar
  • Posts: 9
    • View Profile
    • Donate to Member
Re: IDEA: RecentRun command line?
« Reply #7 on: April 24, 2006, 05:36 PM »
Ahh, nice to find the correct source!

Doesn't make it work, though...  :(

The contents of my registry here at home is pretty much the same as what I posted above.

I inserted a msgbox inside the loop in the GETPROGRAMS routine, right before the IfInString,A_LoopRegName,%path% -line, to get a readout of the important variables.

My line goes like this:
msgbox, %path%`n %program%`n %pid%`n %A_LoopRegName%

The first box says:
C:\WINNT\Explorer.EXE
explorer.exe
1040
@C:\Program files\MultiMedia\iTunes\iTunes.Resources\iTunesRegistry.dll,-16

The next box goes the same, except the last line is:
@C:\Program files\Shared files\Ahead\lib\MediaLibraryNSE.dll,-11111

And so on...  (The A_LoopRegName isn't exactly taken from my previous post, since I appearently have different 'whatever-it-is' here than in my office computer.)  There are a lot of entries in this key, more than three full screens.  The loop never finds a match, and therefore the 'programs' variable never gets any contents.

What does your regstry hold in this particular key?  And howcome there is a difference???

Hang on, I just checked the registry of an XP machine.  And there they are, lots of 'path-like' entries right after all the @-entries.  These just don't exist in my Win 2000 machines...

Ok, so it's an XP feature that is not present in Win 2000.  But what does this check actually do?  And could it be found elsewhere in the registry, if necessary?

Sorry for asking supposedly silly questions, but the hour is too late to try and figure out the purpose of the code...  :-\

Thanks for taking the time to look at this!

/IrmaIsfot

skrommel

  • Fastest code in the west
  • Developer
  • Joined in 2005
  • ***
  • Posts: 933
    • View Profile
    • 1 Hour Software by skrommel
    • Donate to Member
Re: DONE: RecentRun command line?
« Reply #8 on: April 25, 2006, 04:44 PM »
 :) Try RecentRun v1.4!

Originally the RegRead loop extracted the full path of a program to get the icon, but now it is used to get the program's description, so it isn't really needed. But it was still inside the old test, so it didn't work in W2000. This is corrected in the latest version, IrmaIsfot. Please let me know if it works!

I also cleaned up the code a bit.

Skrommel

IrmaIsfot

  • Charter Member
  • Joined in 2005
  • ***
  • default avatar
  • Posts: 9
    • View Profile
    • Donate to Member
Re: DONE: RecentRun command line?
« Reply #9 on: April 25, 2006, 05:34 PM »
Hey, great!  Works like a charm!  :D Thanks a bunch!

I don't know how the file sorting works in XP, though.  On my Win2000, if 'Sort by date' is set, it lists the files like this:
1 - Notepad
10 - Calc
11 - Word
2 - Excel
3 - Outlook
...and so on.  Therefore, I added the following lines:

   
    If sortbydate=1
->    If counter<10
->      FileCreateShortcut,%Target%,%recentmenu%\0%counter% - %A_LoopField%,%Dir%,%Args%,%Description%,%Icon%,,%IconNumber%,%RunState%
->    Else
        FileCreateShortcut,%Target%,%recentmenu%\%counter% - %A_LoopField%,%Dir%,%Args%,%Description%,%Icon%,,%IconNumber%,%RunState%
    Else
      FileCreateShortcut,%Target%,%recentmenu%\%A_LoopField%,%Dir%,%Args%,%Description%,%Icon%,,%IconNumber%,%RunState%

I wonder, how do you compile your code?  The Ahk2Exe application only supports one icon file, but you have two icons in your about-box!

/IrmaIsfot

skrommel

  • Fastest code in the west
  • Developer
  • Joined in 2005
  • ***
  • Posts: 933
    • View Profile
    • 1 Hour Software by skrommel
    • Donate to Member
Re: DONE: RecentRun command line?
« Reply #10 on: April 26, 2006, 03:26 AM »
 :) You have to ResHack the AutoHotkeySC.bin.

Skrommel

IrmaIsfot

  • Charter Member
  • Joined in 2005
  • ***
  • default avatar
  • Posts: 9
    • View Profile
    • Donate to Member
Re: DONE: RecentRun command line?
« Reply #11 on: April 26, 2006, 05:02 AM »
Ok, I'll read up on that and get started on my way to AHK stardom!  8)
/IrmaIsfot

skrommel

  • Fastest code in the west
  • Developer
  • Joined in 2005
  • ***
  • Posts: 933
    • View Profile
    • 1 Hour Software by skrommel
    • Donate to Member
Re: DONE: RecentRun command line?
« Reply #12 on: April 26, 2006, 11:44 AM »
 :) Or try RecentRun v1.5!

Corrected the sort by date order for W2000 for up to 1000 shortcuts.

Skrommel