avatar image

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

Login with username, password and session length
  • Saturday July 13, 2024, 2:05 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: [1] 2 3 4next
Developer's Corner / Re: Crazy Autohotkey issue
« on: January 19, 2016, 07:36 AM »
This is the updated LockDetect.ahk.  Changes between this version and the original are on line 46 and the additional constants on lines 29-39.
Code: Autohotkey [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:
  20. ;---------------------------------------------------------------
  21. ;Winamp_Lock_Pause was/is based on script codes from "shimanov"
  22. ;Posted: Thu Sep 15, 2005 12:26 am  
  23. ;Source:
  24. ;Posted: Tue Dec 06, 2005 9:14 pm
  25. ;Source:
  26. ;---------------------------------------------------------------
  28. ;Initialize global constants
  33. WTS_SESSION_LOGON := 0x5
  35. WTS_SESSION_LOCK      :=   0x7
  36. WTS_SESSION_UNLOCK      :=   0x8
  39. WM_WTSSESSION_CHANGE   :=   0x02B1
  41. notify_lock_unlock()
  42. {
  46.    hw_ahk := FindWindowEx( 0, 0, "AutoHotkey", A_ScriptFullPath )
  50.    success := DllCall( "wtsapi32.dll\WTSRegisterSessionNotification", "uint", hw_ahk, "uint", NOTIFY_FOR_ALL_SESSIONS )
  52.    if( ErrorLevel OR ! success )
  53.    {
  54.       success := DllCall( "wtsapi32.dll\WTSUnRegisterSessionNotification", "uint", hw_ahk )
  55.       ;If DLL registration fails, wait 20 seconds and try again
  56.       Sleep, 20000
  57.       notify_lock_unlock()
  58.       ;MsgBox, [WTSRegisterSessionNotification] failed: EL = %ErrorLevel%
  59.    }
  60.    return
  61. }
  63. Handle_WTSSESSION_CHANGE( p_w, p_l, p_m, p_hw )
  64. ; p_w  = wParam   ;Session state change event
  65. ; p_l  = lParam   ;Session ID
  66. ; p_m  = Msg   ;WM_WTSSESSION_CHANGE
  67. ; p_hw = hWnd   ;Handle to Window
  68. {
  69.    Global WTS_SESSION_LOCK
  70.    Global WTS_SESSION_UNLOCK
  71.    Global WTS_SESSION_LOGON
  72.    Global WTS_SESSION_LOGOFF
  74.    If ( p_w = WTS_SESSION_LOCK )
  75.    {
  76.       on_lock()
  77.    }
  78.    Else If ( p_w = WTS_SESSION_UNLOCK )
  79.    {
  80.       on_unlock()
  81.    }
  82.    Else If (p_w = WTS_SESSION_LOGON)
  83.    {
  84.       on_logon()
  85.    }
  86.    Else If (p_w = WTS_SESSION_LOGOFF)
  87.    {
  88.       on_logoff()
  89.    }
  90. }
  92. FindWindowEx( p_hw_parent, p_hw_child, p_class, p_title )
  93. {
  94.    return, DllCall( "FindWindowEx", "uint", p_hw_parent, "uint", p_hw_child, "str", p_class, "str", p_title )
  95. }

Developer's Corner / Re: Crazy Autohotkey issue
« on: January 18, 2016, 08:48 AM »
This code right here in LockDetect.ahk:
Code: Autohotkey [Select]
  1. hw_ahk := FindWindowEx( 0, 0, "AutoHotkey", a_ScriptFullPath " - AutoHotkey v" a_AhkVersion )
This had to be changed to accurately reflect the title of the compiled script's window.
I don't have the code available to me just now, but I'll post it tomorrow.  If you compile the script yourself and try to run it, and then open the script's window, you'll see what the proper title to match is.

Sorry about the delayed response.  :-[
The bug:  When LBC is running, it steals focus from other open windows.  This only seems to happen when an LBC dock is set to "Always on Top" mode.
How to reproduce:
  • Create a dock in LBC.
  • Right-click and select "Configure Preferences and Options"
  • Go to Options
  • Enable the option to keep launchbars on top
  • Click the X in the top right.  The bar will reload.
  • Switch to another window
  • LBC will steal the focus from the active window, whatever that window is, within 5-10 seconds

You're welcome!  8)

Looks like this problem has been around for a while, based on previous forum posts, and it's still around in the latest version.  Turning off "Keep LaunchBars On Top" seems to fix it.  Is that the only solution, or is there something else that can be done?

Living Room / Re: App vendors discover a new way to abuse Windows
« on: October 07, 2011, 11:40 AM »
They're doing that to "make it easier" on customers who want to install their applications on computers where they don't have admin rights.  Which means the installation is per-user, not per machine.

Developer's Corner / Re: The Yii PHP Framework
« on: July 18, 2011, 11:48 AM »
I spent quite a bit of time this year looking at Python frameworks -- hoping to switch from php web development to python web development -- but concluded that at the current time, deploying python web applications is a total joke and a catastrophe for anything other than a scenario where you are running a single python web application on a server.  I also didn't fall in love with Django, Pylons, or the other major python web frameworks.
I personally would recommend the web2py framework for the Python side.  It's simple and easy to set up, and I've deployed both the framework and actual apps written for web2py in real-life situations.  It's painless, if you use the framework's packaging features.

MagicISO gets bashed a lot around the internet.  However, hardly anyone says why it's so bad.  They just say it sucks.  And I'm like, "But why??"  Anyway...this WinCDemu is working well.  I'll check out DVDFab, I had never heard of that one.  I've tried MagicISO...I don't remember how it was.  I think it was fine, but I went with PowerISO for some reason.  Geez...these names...MagicISO, PowerISO, UltraISO...I need to do a Super(boyac)ISO.
In my case, it's because MagicDisc blew up Disk Manager on my old XP machine and I couldn't even uninstall it.

General Software Discussion / The Humble Bundle Returns! \o/
« on: April 12, 2011, 02:57 PM »
The Humble FrozenByte Bundle includes Trine, Shadowgrounds, and Shadowgrounds: Survivor, plus a preorder for another FrozenByte game and an OSS prototype of yet another!  :Thmbsup: 8)
Get yours here!

Living Room / Re: How to avoid paying taxes and save billions
« on: October 22, 2010, 09:51 AM »
There have been a lot of good comments in here, and I respect Mouser's wish to keep this non-political, but I would like to say just a few things with regard to some of what I've read.

1.  Corporate "tax evasion" is not necessarily a matter of selfishness on the part of company owners.  It's a matter of the corporation's owners feeling that they know better about how to spend their own money than the government does.  And so they used their money and influence with the government to try and protect the money that they have earned and their own ability to spend it as they wish.  There are some selfish people running corporations (can you say Enron and Sallie Mae? :P I knew you could), but not all corporations do this for evil purposes.

2.  It is not automatically necessary for a person to be fabulously rich in order to avoid paying taxes.  It's a matter of understanding the law and the ways that money can work.  Charitable donations and gifts up to US$10K are tax-free.  Money spent on certain types of business expenses is deductible from your taxes, up to a certain percentage.  Money utilized in certain types of investments is tax-free until the time of withdrawal.  Anyone can do it if they know how, although it is definitely true that it is easier to do with more money than with less. ;)

3.  Corporations still pay.  But they definitely pay much less, because of the tax rules that come into play with corporations.  A corporation is not a person or group of people.  It's a stack of legal documents.  The tax laws can't apply to it in the same way that they do to citizens.

4.  What Google and other corporations do in regard to their taxes is not evil.  Money is nothing but a tool; how you use it is what makes it evil or good.


I know it's a bit late :(, but I can offer the following:
  • Coding assistance (Python or Javascript, primarily; XHTML and CSS are available, too)
  • Documentation review
  • Testing

If coding is involved, I don't have a tremendous amount of time, but PM me and I'll see what I can do.  8)


Developer's Corner / Re: Recommend a general purpose IDE
« on: May 27, 2010, 11:34 AM »
Notepad++.  I use it for almost all my coding.  8)  :up:

Developer's Corner / Re: Command line argument processing
« on: April 19, 2010, 10:32 AM »
What are your thoughts? How do you handle command-line args?
With Powershell, in most cases, it makes the most sense to use a switch statement, but I'll use an if-then occasionally.  Powershell makes command-line args very simple to deal with.  No crazy parsing that you have to do, just a param() statement.

Sounds like an awesome idea to me. :up:
That kind of thing takes a really serious app, though.  You won't get more than a few, if that.  NANY, from what I've seen of it, has always been about small apps (typically single purpose).

T-Clock / Re: T-Clock 2010 (alpha - download)
« on: March 21, 2010, 05:32 PM »
Latest build runs beautifully.

T-Clock / Re: T-Clock 2010 (alpha - download)
« on: March 15, 2010, 01:50 PM »
T-Clock 2010 alpha download link is (and will be) at the bottom of the first post of this thread.
Go ahead be brutal honest... ;)
Looks good so far.  No errors.

I didn't like it. It's like a beggar's version of Eufloria, only Big Tree Defense sucks and Eufloria is kind of cool.
Yeah, Eufloria's pretty fun.  I immediately wondered whether Big Tree Defense was a TD take-off from it.  BTD's not bad if all you want is a sort-of fun little time-waster.  I still prefer DTD, tho.  ;D

Developer's Corner / Regex help, please?
« on: February 02, 2010, 11:14 AM »
I'm trying to parse information in the audit log of a bunch of work tickets, which I've exported to a .CSV file.  I've pulled the data into Powershell and am doing my parsing using .NET's regular expression class.

What I want is to detect when a ticket's assigned group was changed.  That shows up in the ticket's audit log as "The assigned group was changed to Group_Name", where Group_Name is always some combination of upper/lowercase letters and underscores.
This being the case, the following regex should do it...
The assigned group changed to ([a-zA-Z]+(?:_[a-zA-Z]+)*)

Yet, when I run these tickets' audit logs through that regex, I get nothing.  Am I missing something?  Is there an option I should be setting someplace?  I already tried multiline vs singleline...

Except for the tagging, this would be Wikidpad, and Wikidpad is flexible enough that you might be able to create some sort of "pseudo-tagging" mechanism.
If you're comfortable with Python, I'd recommend starting with the Wikidpad source and modifying it to suit your needs.  It's a WxPython app with sqlite or gadfly storage.

DC Member Programs and Projects / Re: unlockgo
« on: January 19, 2010, 11:12 AM »
Very nice.  What language did you write that in?

Find And Run Robot / Re: Freezing on search :(
« on: January 11, 2010, 09:38 AM »
You're welcome. :)
[EDIT] This might be of use...

Find And Run Robot / Re: Freezing on search :(
« on: January 11, 2010, 09:19 AM »
Could be either.. BUT FARR tries to be smart and not resolve the UNC shares, so it probably was not that.  the network path definitely could have done it.

Since it was clearing your launch history that did it, this confirms that i probably need to have a way for farr to figure out which drives are network drives and shouldnt have their shortcuts resolved, or else allow a manual specification of such drives.
Putting a list of those drives in Options might be best, performance-wise.
I don't know how you'd check which drives are network drives via C++ or another .Net language, but I do know that you can query through WMI for that information.  Of course, you may not want to use that method because WMI can be slow sometimes.  If you want to try it, though, you'd use the following WMI query:
Code: Text [Select]
  1. select * from Win32_LogicalDisk where DriveType=4
Win32_LogicalDisk is the WMI class representing drives on a computer, and where that class's DriveType attribute is 4, that drive is a network drive.

Find And Run Robot / Re: Freezing on search :(
« on: January 11, 2010, 08:46 AM »
This has been known to happen when search network shares.. can you check your launch history and see if anything is on a network -- maybe clear it to confirm that's not it.  You can also try disabling plugins to see if that's the cause.  Another trick is to enable the option to show subdirectories names during search, and pay attention to the status bar, see what it says it is searching when it hangs.
It was launch history.  I cleared my launch history and that did it.  Thanks! :up:
When you say network shares, does that include network drives (e.g. an H drive that's mapped to a network path), or just UNC shares (e.g. \\server\sharepath)?  Because prior to seeing any slowness, I had just used the run alias to open a UNC share.  The slowness started after that, but the entry for that launch wasn't in my history.

Find And Run Robot / Freezing on search :(
« on: January 11, 2010, 08:25 AM »
FARR seems to freeze during search.  The FARR window pops up normally when I hit my hotkey, but after the first character, FARR freezes for about 5 seconds.  It does this on every search.
If this were my web browser, I'd clear the temp there something like this that I should be doing every so often in FARR?  What else should I try to speed things up?  Everything else on my machine seems to be running normally.  I'm using FARR 2.80.02.


You can do it in AutoHotkey.
Read this thread from the autohotkey forum.  It tells you how and provides a helpful library.
I know this works because I used it recently in a project at work.


Pages: [1] 2 3 4next