topbanner_forum
  *

avatar image

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

Login with username, password and session length
  • Friday April 26, 2024, 8:47 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

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - jpprater [ switch to compact view ]

Pages: prev1 [2] 3 4next
26
N.A.N.Y. 2010 / Re: NANY 2010 - The Event Concludes
« on: January 01, 2010, 08:33 PM »
Thanks, Perry, for all your hard work on this.

27
Nice work, jpprater.  My wife and I own a TON of books so I'll give this a shot.
:D Thank you!  I need to write an actual user manual for it to post on the wiki, but I'm very proud of what I've produced so far.

28
N.A.N.Y. 2010 / Re: NANY 2010 Final Release: Library Management System
« on: December 31, 2009, 03:05 PM »
Final Release status!  :eusa_dance:

29
N.A.N.Y. 2010 / Re: NANY 2010 Final Release: FARR Plugin ProcessInfo
« on: December 31, 2009, 03:04 PM »
Final Release status!  :eusa_dance:
Edit:   :o Dude, mouser just slipped me a major bugfix!  Latest version is out on the Redmine project, and it includes showing all processes, as well as showing icons for some processes that wouldn't show them previously.   :mrgreen:  Props to the mouseman!!  :beerchug:

30
FARR Plugins and Aliases / Re: Question about FScript (1.19)
« on: December 26, 2009, 04:43 PM »
I've put some documentation on how to build FARR plugins with FScript on the FARR plugin developer wiki at : http://farr.dcisv.co...script_documentation. The easiest way to start is by taking a plugin and modifying it to your need. It's easier to start in javascript or vbscript because other script language require custom setup on your desktop.
Nice job, ecaradec! 8) Thank you!

31
N.A.N.Y. 2010 / NANY 2010 Final Release: Library Management System
« on: December 25, 2009, 07:26 PM »
NANY 2010 Release

Application Name Library Management System
Version 0.7.1
Short Description A browser-based application for library management.
Supported OSes Anything that runs Python
Web Page
Download Link Download page
System Requirements
  • Minimum:  Python 2.6, Web2Py 1.74.3, a database engine of your choice, and the Python adapter for that engine.
  • Optional:  A webserver with WSGI and SSL capabilities (such as Apache with mod_wsgi and mod_ssl) and lxml and python-amazon-product-api packages for Amazon support.
Version HistorySee here
Author Jon Prater


Description
What it is:  A tool for keeping track of your book collection and who you've loaned copies of your books to.
What it isn't:  A full-blown system for keeping track of the collection of a public library.  ;) I wrote this to keep track of my personal library at home.  It would take some modifying for it to be ready for use with a really HUGE collection in a public environment.
Why I wrote it:  Other tools didn't really seem to offer me the functionality my wife and I wanted for keeping track of our books.  We wanted something nice and simple that could do certain things, and we didn't want a lot of fluff.  So it's fairly minimalist.  The features we need, and none of the ones we don't. :Thmbsup: If you want a feature that's not there, feel free to email me about it via the discussion group.

Features (Current and Planned)
  • Adding new books to the database
  • Searching for books by keywords
  • Updating/deleting existing books in the database
  • Authentication and user management (disabled by default)
  • Adding/updating/deleting information on who has been loaned a book
  • Pull author/title by ISBN

Also See project page.

Screenshots
The main page of the application...
LMS1.png

The add book page...
LMS2.png

The keyword search...
LMS3.png

With results...
LMS4.png

Usage
Installation
Detailed installation instructions are here.

Using the Application
See Getting Started.

Uninstallation
If you're not using web2py other than for this, you can simply delete the web2py folder from your disk.  Otherwise, the site admin page has an uninstall link to remove applications.

Known Issues
The lxml and python-amazon-product-api packages must be installed in Python to use the Amazon lookup features.  Links to download them will be added to the project site.

32
What it is:  A tool for keeping track of your book collection and who you've loaned copies of your books to.
What it isn't:  A full-blown system for keeping track of the collection of a public library. ;) I wrote this to keep track of my personal library at home.  It would take some modifying for it to be ready for use with a really HUGE collection in a public environment.
Why I wrote it:  Other tools didn't really seem to offer me the functionality my wife and I wanted for keeping track of our books.  We wanted something nice and simple that could do certain things, and we didn't want a lot of fluff.  So it's fairly minimalist.  The features we need, and none of the ones we don't.  :Thmbsup:  If you want a feature that's not there, feel free to email me about it via the discussion group (see below).

Current features include:
  • View/Edit/Delete existing books
  • Add new books
  • Search Amazon for book information when adding
  • Track copies of books loaned to people
  • Comment on each book or loan
  • Works with almost any popular database engine
  • Runs on Python using the web2py framework

Where to get it:  Download it from the project website.  Installation instructions are on the site.  It's open-source hosted on GoogleCode. :)  There's also a project discussion group hosted on Google Groups, so please send any comments, suggestions, or issues there.

33
N.A.N.Y. 2010 / Re: NANY 2010 RELEASE: FARR Plugin ProcessInfo
« on: December 17, 2009, 02:15 PM »
should be same effect -- send me the plugin where you give farr the exe paths as icon paths and ill investigate why farr might show a blank ([email protected]).
Sent.  Good luck!  :up:

34
N.A.N.Y. 2010 / Re: NANY 2010 RELEASE: FARR Plugin ProcessInfo
« on: December 17, 2009, 04:21 AM »
Yup.  Although, if I type that executable's path directly into the search field, it shows the icon that Explorer displays for that executable w/out issue.  Perhaps its simply that explorer is intelligent about assigning icons automatically, whereas FARR isn't and usually doesn't have to be.

35
N.A.N.Y. 2010 / Re: NANY 2010 RELEASE: FARR Plugin ProcessInfo
« on: December 16, 2009, 08:53 PM »
OK, I have a suitable icon, but here's the problem:  Not every process that I can get a path to has its own icon.  I'm thinking maybe I should just go with the standard generic icon, unless someone knows how to check for the presence of icons built into executables programmatically...  Any opinions either way?

36
N.A.N.Y. 2010 / Re: NANY 2010 RELEASE: FARR Plugin ProcessInfo
« on: December 16, 2009, 07:15 PM »
Yeah, that makes sense.
The issue I just mentioned above has been fixed (some processes failing to display details due to not all fields being populated).  I'll start a new feature issue for icons.  I can find a generic icon from the OS that will be suitable (I think :)).

37
N.A.N.Y. 2010 / Re: NANY 2010 RELEASE: FARR Plugin ProcessInfo
« on: December 16, 2009, 06:42 PM »
a note, you can return the full path of the exe as the icon file and farr should load the appropriate icon from the file.. i think.
That's if the full path can be captured in the first place.  :huh:
Not all processes appear to store their paths in a readable form in the WMI repository.  (See here)  And of course, for remote machines, if the process' executable doesn't exist in the same place on the local machine, I can't very well detect its icon, unless I can pull some gyrations with grabbing it from the executable on the remote machine itself.

38
N.A.N.Y. 2010 / Re: NANY 2010 RELEASE: FARR Plugin ProcessInfo
« on: December 16, 2009, 02:39 PM »
Nice, this will come in handy!

A couple of initial remarks: Am I supposed to press Space after 'pinfo'? I would've thought that just typing 'pinfo' would be enough... (I suppose this might be possible if I change an alias setting in FARR, though)
And +sall modifier doesn't work, so I only get a short list and need to know what I'm looking for. support for +sall or an option to display full list of processes would be very nice.

Great stuff! :Thmbsup:
Thanks, glad you like it. :)
Yes, you need a space after pinfo to make it start searching.
I'll add support for +sall to my issue list.

39
N.A.N.Y. 2010 / Re: NANY 2010 RELEASE: FARR Plugin ProcessInfo
« on: December 16, 2009, 02:03 PM »
Released!  8) :up:

40
Developer's Corner / Re: Crazy Autohotkey issue
« on: December 14, 2009, 07:30 PM »
thanks for the explanation, could help others  :up:
kudos for sticking at it AND advising the fix :Thmbsup:
Thank you, mouser and Target. :) The DllCall relied on having a valid hWnd for the script's window, but it was written based on the script running in the AutoHotkey interpreter, not compiled independently.  The class was still the same, but the window title wouldn't match anymore because the title of a compiled Autohotkey script's window becomes the path to the executable (unless otherwise set).

41
Developer's Corner / Re: Crazy Autohotkey issue
« on: December 14, 2009, 02:28 PM »
Finally figured it out.  The FindWindowEx call in LockDetect.ahk wasn't finding a valid hWnd for the script after compilation.  Changing the values in that call fixed it.

42
Developer's Corner / Re: Crazy Autohotkey issue
« on: December 14, 2009, 11:41 AM »
I've at least figured out where the problem is really happening.  It's nothing to do with the compiler; it's the DllCall in LockDetect.ahk.  That DllCall is failing repeatedly, and only in the compiled version.
Calling DllCall( "GetLastError" ) returns the error code 87, which translates (according to this reference) into INVALID_PARAMETER.  But I'm sure the parameters given in the DllCall are correct!  If the parameters were wrong, why would they only be wrong in the compiled version, and not also in the original interpreted script?  :huh: :'(

43
Developer's Corner / Crazy Autohotkey issue
« on: December 14, 2009, 09:58 AM »
I've already posted about this over at the Autohotkey forum, but maybe someone here has seen this issue before.
I'm having a post-compile issue with one of my scripts.
I have the following two files:
ld.ahk
Code: AutoIt [Select]
  1. #include LockDetect.ahk
  2. #NoTrayIcon
  3. IfNotExist, LD_Settings.ini
  4.         IniWrite, ., LD_Settings.ini, logsettings, logpath
  5. IniRead, LogPath, LD_Settings.ini, logsettings, logpath
  6. FormatTime, StartTime,, MM-dd-yyyy_HH-mm-ss
  7. FormatTime, StartTime1,, MM-dd-yyyy HH-mm-ss
  8. PID := DllCall("GetCurrentProcessId")
  9. LogFileName := A_ComputerName . "_" . StartTime . "_" . PID . ".txt"
  10. LogFile := LogPath . "\\" . LogFileName
  11. IfNotExist, %LogPath%
  12.         FileCreateDir, %LogPath%
  13. FileAppend, Process %PID% started at %StartTime1% `n, %LogFile%
  14. notify_lock_unlock()
  15.  
  16. on_lock()
  17. {
  18.         Global LogFile
  19.         FormatTime, TimeString,, MM-dd-yyyy HH-mm-ss
  20.         FileAppend, Locked at %TimeString% `n, %LogFile%
  21. }
  22.  
  23. on_unlock()
  24. {
  25.         Global LogFile
  26.         FormatTime, TimeString,, MM-dd-yyyy HH-mm-ss
  27.         FileAppend, Unlocked at %TimeString% `n, %LogFile%
  28. }
And LockDetect.ahk, copied from notifylockunlock.ahk in http://www.autohotke...forum/topic5359.html.
Code: AutoIt [Select]
  1. ;---------------------------------------------------------------
  2. ;Notify Lock\Unlock
  3. ;   This script monitors LockWorkstation calls
  4. ;
  5. ;   If a change is detected it 'notifies' the calling script
  6. ;      On Lock
  7. ;         This script will call function "on_lock()"
  8. ;      On Unlock
  9. ;         This script will call fucntion "on_unlock()"
  10. ;IMPORTANT: The functions "on_lock()" and "on_unlock()" DO NOT
  11. ;exist in this script, they are to be created in the script that
  12. ;calls notify_lock_unlock() (presumably your main script)
  13. ;---------------------------------------------------------------
  14. ;Re-purposed by WTO605
  15. ;Last edited 2009-08-18 16:34 UTC
  16. ;---------------------------------------------------------------
  17. ;Based on Winamp_Lock_Pause by MrInferno
  18. ;Posted: Fri Apr 21, 2006 4:49 am
  19. ;Source: http://www.autohotkey.com/forum/topic9384.html
  20. ;---------------------------------------------------------------
  21. ;Winamp_Lock_Pause was/is based on script codes from "shimanov"
  22. ;Posted: Thu Sep 15, 2005 12:26 am  
  23. ;Source: http://www.autohotkey.com/forum/viewtopic.php?t=5359
  24. ;Posted: Tue Dec 06, 2005 9:14 pm
  25. ;Source: http://www.autohotkey.com/forum/viewtopic.php?t=6755
  26. ;---------------------------------------------------------------
  27.  
  28. ;Initialize global constants
  29. WTS_SESSION_LOCK      :=   0x7
  30. WTS_SESSION_UNLOCK      :=   0x8
  31. NOTIFY_FOR_ALL_SESSIONS   :=   1
  32. NOTIFY_FOR_THIS_SESSION   :=   0
  33. WM_WTSSESSION_CHANGE   :=   0x02B1
  34.  
  35. notify_lock_unlock()
  36. {
  37.    Global WM_WTSSESSION_CHANGE
  38.    Global NOTIFY_FOR_ALL_SESSION
  39.  
  40.    hw_ahk := FindWindowEx( 0, 0, "AutoHotkey", a_ScriptFullPath " - AutoHotkey v" a_AhkVersion )
  41.  
  42.    OnMessage( WM_WTSSESSION_CHANGE, "Handle_WTSSESSION_CHANGE" )
  43.  
  44.    success := DllCall( "wtsapi32.dll\WTSRegisterSessionNotification", "uint", hw_ahk, "uint", NOTIFY_FOR_ALL_SESSIONS )
  45.  
  46.    if( ErrorLevel OR ! success )
  47.    {
  48.       success := DllCall( "wtsapi32.dll\WTSUnRegisterSessionNotification", "uint", hw_ahk )
  49.       ;If DLL registration fails, wait 20 seconds and try again
  50.       Sleep, 20000
  51.       notify_lock_unlock()
  52.       ;MsgBox, [WTSRegisterSessionNotification] failed: EL = %ErrorLevel%
  53.    }
  54.    return
  55. }
  56.  
  57. Handle_WTSSESSION_CHANGE( p_w, p_l, p_m, p_hw )
  58. ; p_w  = wParam   ;Session state change event
  59. ; p_l  = lParam   ;Session ID
  60. ; p_m  = Msg   ;WM_WTSSESSION_CHANGE
  61. ; p_hw = hWnd   ;Handle to Window
  62. {
  63.    Global WTS_SESSION_LOCK
  64.    Global WTS_SESSION_UNLOCK
  65.  
  66.    If ( p_w = WTS_SESSION_LOCK )
  67.    {
  68.       on_lock()
  69.    }
  70.    Else If ( p_w = WTS_SESSION_UNLOCK )
  71.    {
  72.       on_unlock()
  73.    }
  74. }
  75.  
  76. FindWindowEx( p_hw_parent, p_hw_child, p_class, p_title )
  77. {
  78.    return, DllCall( "FindWindowEx", "uint", p_hw_parent, "uint", p_hw_child, "str", p_class, "str", p_title )
  79. }
If I run the above ld.ahk, which has #include lockdetect.ahk at the very top, everything runs perfectly.  I get exactly the behavior I expect.
However, if I compile ld.ahk, which operation should build the code in the included lockdetect.ahk into the resulting .exe file, when I run the .exe, I get the behavior expected up until the script should try to run code included from LockDetect.ahk.  This also happens if I copy the code manually from LockDetect.ahk to the top of ld.ahk.
I am using the very latest version of autohotkey, 1.0.48.05.

44
N.A.N.Y. 2010 / Re: NANY 2010 PRE-RELEASE: FARR Plugin ProcessInfo
« on: December 13, 2009, 02:15 PM »
Updated to pre-release status!  :Thmbsup:

45
N.A.N.Y. 2010 / Re: NANY 2010 TEASER: FARR Plugin ProcessInfo
« on: December 12, 2009, 10:12 PM »
you might consider trying to show and filter results live.. that is, always return to farr the complete list of processes running and let FARR filter them to match what user types.
i'm just impressed that you are grabbing this info using javascript!  that's pretty damn cool.
:D Thanks.  I'm using WMI to retrieve it (using the SWbemServices interface, which plays well with anything that works with COM; I could've written this plugin using python, too :)).
And I already do filter results live, following a previous suggestion from you.  Taking out the alias makes sense, though.  For the detail display, though, I need the memo mode to display everything coherently.

46
N.A.N.Y. 2010 / Re: NANY 2010 TEASER: FARR Plugin ProcessInfo
« on: December 11, 2009, 09:00 PM »
:D Thank you for your help getting it working in the first place!

47
N.A.N.Y. 2010 / NANY 2010 Final Release: FARR Plugin ProcessInfo
« on: December 11, 2009, 08:23 PM »
NANY 2010 Entry Information

Application Name FARR Plugin ProcessInfo
Version 1.1.0
Short Description A FindAndRunRobot plugin to display information about running processes
Supported OSes Windows
System Requirements
  • FARR 2.80.02 recommended (for use with latest FScript)
Version History
  • 1.1.0:  Bug fixes by mouser, including showing all processes and adding icons for many processes that didn't show them
  • 1.0.1:  Bug fix
  • 1.0.0:  Release!
  • 0.9.0:  pre-release
  • 0.0.5:  alpha testing
Website:
Author Jonathan Prater
Screencast


Description
I'm a sysadmin by trade, and I frequently need to get quick information about processes running on a machine (either my own or a remote PC).  I also frequently need to know what files the process is actually using at any given moment.  And I don't necessarily want to have to access the machine directly to get that information.
While there are tools already available that give me that information, none of them are particularly fast about giving it to me, and none of the are as intutive as a FARR alias/plugin could be. :) So I wrote this to be the fast, simple tool that I as an admin need to get information quickly.

Current Features
- It queries processes matching a specified partial name, then lists them out by name and ID.
- Upon selection of a specific process, it returns more detailed information, including memory used, count of handles open, and paths to actual files.

Planned Features
- Access to processes on remote computers.

Screencast


Screenshots
Initially, the user types in pinfo...
ProcessInfo1.png
As the user enters more characters, ProcessInfo tightens down on the processes that match what was entered.  The results list looks like this:
ProcessInfo2.png
Upon selecting the desired target process, the user gets something like this:
ProcessInfo3.png

Installing this application:
Make sure you've got FARR installed ;), then download the plugin file (attached below) and unpack it to a subdirectory of $FARR_Install\Plugins.
Toggle FARR and type rplugins, then click OK.  One of the plugins in your list should be ProcessInfo, with an alias of pinfo.

Usage:
pinfo processname.  Hit enter on a process you want to see details for.  To see all processes, just type pinfo followed by a space.
To query remote computers: pinfo c=computername processname.

Uninstalling:
Toggle FARR and type rplugins.  Before clicking OK, delete the directory $FARR_Install\Plugins\$ProcessInfo, where $ProcessInfo is the directory you originally unpacked the plugin to.[/list]

48
... :o You know what I did?  Look at line 37 above.  That += should have been a plain =. :D :-[
It's always the little things, isn't it?
Here's a zip if you want to play with it.  It works perfectly now, though it doesn't provide nearly the feature set I intend for it to.

49
The normal mode (using FARR.emitResult()).  When I'm ready to actually activate a result (to get detailed information) then I go to memo mode.
Here's my code as it is now (it's producing a screwy error when I try to run this, something about "expected ';'")
Code: Javascript [Select]
  1. // plugin script :
  2. displayname="ProcessInfo";
  3. versionstring="0.0.1";
  4. releasedatestring="12/11/09";
  5. author="jpprater";
  6. updateurl="";
  7. homepageurl="";
  8. shortdescription="ProcessInfo";
  9. longdescription="ProcessInfo";
  10. advconfigstring="ProcessInfo";
  11. readmestring="ProcessInfo";
  12. iconfilename="processinfo.ico";
  13.  
  14. aliasstr="processinfo";
  15. regexstr="";
  16. regexfilterstr="";
  17. scorestr="300";
  18.  
  19. // type
  20. UNKNOWN=0; FILE=1; FOLDER=2; ALIAS=3; URL=4; PLUGIN=5; CLIP=5;
  21. // Postprocessing
  22. IMMEDIATE_DISPLAY=0; ADDSCORE=1; MATCH_AGAINST_SEARCH=2;
  23. // search state
  24. STOPPED=0; SEARCHING=1;
  25.  
  26. function onSearchBegin(querykey, explicit, queryraw, querynokeyword, modifier, triggermethod) {
  27.         if(!explicit) {
  28.                 return;
  29.         }
  30.         if (queryraw.match(/get/)) {
  31.                 FARR.setState(querykey,SEARCHING);
  32.                 var wbemsrv = GetObject('winmgmts://./root/cimv2');
  33.                 var p = queryraw.split(' ')[2];
  34.                 var procs = wbemsrv.ExecQuery("select * from Win32_Process where ProcessID = " + p.toString());
  35.                 var numer = new Enumerator(procs);
  36.                 if(numer.item()) {
  37.                         var proc += numer.item().Name + " - ";
  38.                         var ws = numer.item().WorkingSetSize/(1024*1024);
  39.                         proc += ws.toString() + " MB";
  40.                 }
  41.                 FARR.setStrValue('launch', 'showmemo ' + proc);
  42.                 FARR.setState(querykey,STOPPED);
  43.         } else {
  44.                 FARR.setState(querykey,SEARCHING);
  45.                 var wbemsrv = GetObject('winmgmts://./root/cimv2');
  46.                 var p = queryraw.split(' ')[1];
  47.                 var procs = wbemsrv.ExecQuery("select * from Win32_Process where Name LIKE '%" + p + "%'");
  48.                 var proclist = "";
  49.                 for (var numer = new Enumerator(procs); !numer.AtEnd; numer.moveNext()) {
  50.                         if(numer.item()) {
  51.                                 FARR.emitResult(querykey, numer.item().Name + " - ID " + numer.item().ProcessID.toString(), "dosearch processinfo get " + numer.item().ProcessID, iconfilename, FILE, IMMEDIATE_DISPLAY, 1000);
  52.                         } else {
  53.                                 break;
  54.                         }
  55.                 }
  56.                 FARR.setState(querykey,STOPPED);
  57.         }
  58. }

Everything I've read thus far indicates that this ought to work perfectly except for the crazy error I've mentioned above.

50
SEARCHING:

FARR plugins usually search with every keypress, and the plugin is called after every keypress.
The search function sent to your plugin actually also tells you whether user hit enter at the end of their search, in case you want to handle that event as the "trigger" specially.  This is most useful when you have a plugin that is not showing a list of results but is showing some output in richtext or browser mode.
Yup, I got that far.

TRIGGERING:
Now if your plugin is returning standard results as the user types, like internet links, program or data file paths, clipboard text snippets, or internal search strings or aliases, etc., then your plugin never has to worry about triggering anything, since farr will do this automatically.
FARR does call a special trigger function that lets you intercept it's normal "trigger" functionality, both for your own results and results generated by normal search and plugin.
Unless I'm mistaken in my reading of the documentation, that's onProcessTrigger(path, caption).  I've implemented that, and FARR's not responding.

SO:
The bottom line is, if the result is returned as a normal FARR result, then you can either let FARR handle the launching of it, or you can catch it with the special trigger function.
If the results are being displayed in richtext or browser mode, then there is no official "TRIGGERING" that gets called -- instead you can either respond to the press of enter by checking the flag in the search function that is called, OR there is a new keypress function that gets called when various keys are pressed that you could use instead (cant remember the names of these functions maybe fscript gurus can help here?)
So I might be better off taking out onProcessTrigger and implementing that behavior as part of my "search" function?

Pages: prev1 [2] 3 4next