Welcome Guest.   Make a donation to an author on the site May 20, 2013, 01:02:13 AM  *

Please login or register.
Or did you miss your validation email?


Login with username and password (forgot your password?)
Why not become a lifetime supporting member of the site with a one-time donation of any amount? Your donation entitles you to a ton of additional benefits, including access to exclusive discounts and downloads, the ability to enter monthly free software drawings, and a single non-expiring license key for all of our programs.


You must sign up here before you can post and access some areas of the site. Registration is totally free and confidential.
 
Check out and download the GOE 2007 Freeware Challenge productivity tools.
   
  Forum Home Thread Marks Chat! Downloads Search Login Register  
  Show Posts
      View this member's profile 
      donate to someone Donate to this member 
Pages: [1] 2 3 4 5 6 ... 98 Next
1  Main Area and Open Discussion / Living Room / Re: silly humor - post 'em here! [warning some NSFW and adult content] on: May 18, 2013, 09:10:49 PM
There's no better bushy-tailed tree rat than a dead bushy-tailed tree rat.

Yes there is  Wink

2  Main Area and Open Discussion / General Software Discussion / Re: Advice needed on AHK script on: May 18, 2013, 08:42:44 PM
I tried it with CleanTray and PPTPchek shut down every time. I then tried it with Terminator and it hung, went back to CleanTray and it was hanging with that as well.

OK, now that's just strange, I'll go back to seeing if I can find another way to check for PPTP/L2TP connections.

In the meantime, your batch file could do with a little rearrangement, (didn't really take notice before  embarassed ).  By rights you should be closing down in the opposite order to the setting up, so:

Formatted for Generic Code with the GeSHI Syntax Highlighter [copy or print]
  1. netsh interface show interface "Router Connection" | find /i "disabled" >NUL
  2. if errorlevel 1 goto running
  3.  
  4. rem Turning Internet items ON
  5. start /D "C:\Program Files (x86)\D4" D4.exe
  6. start /D "C:\Program Files (x86)\network-activity-indicator" NetworkIndicator.exe
  7. start /D "C:\Program Files (x86)\Sandboxie" SbieCtrl.exe
  8. start /D "C:\Program Files (x86)\PeerBlock" peerblock.exe
  9.  
  10. netsh interface set interface "Router Connection" ENABLED
  11.  
  12. goto alldone
  13.  
  14. :running
  15. rem Internet is ON, turn it all OFF now
  16.  
  17. rasdial /disconnect
  18. netsh interface set interface "OpenVPN Adapter" DISABLED
  19. netsh interface set interface "Router Connection" DISABLED
  20.  
  21. terminator.exe /b peerblock.exe
  22. terminator.exe /c SbieCtrl.exe
  23. terminator.exe /m NetworkIndicator.exe
  24. terminator.exe /m D4.exe
  25.  
  26. :alldone

Also, if Terminator works there shouldn't be a need for CleanTray to be run, soooo, having the VPN disconnection first might be enough of a delay such that by the time Terminator runs, PPTPchek has already exited because the VPN no longer exists.

Anyways, back the PPTPchek drawing board...

3  Main Area and Open Discussion / General Software Discussion / Re: Advice needed on AHK script on: May 18, 2013, 07:11:33 AM
There must be some strange timing issues on your computer, (which don't seem to appear on any of mine), for /m not to work with D4 and NAI occasionally.

I actually tried setting them all to /m before I tried /k but only the /k worked properly.

/m won't work on PeerBlock/SandBoxie because they won't allow other programs to close them, (security measure I presume), therefore it's context menu or just kill them.

Quote
No, it was purely cosmetic so that you do not actually see the icon moving.

Yes...well, given your systems fussiness towards things that are too fast....it's set at the second fastest setting.  At the fastest, the mouse gets teleported to the position - exactly what CleanTray does but your system didn't like that.

Oh, forgot, can you try Terminator.exe /c on PeerBlock/SandBoxie again - added a couple of small, (5ms or so), delays into the mix.
4  Main Area and Open Discussion / General Software Discussion / Re: Advice needed on AHK script on: May 17, 2013, 11:58:12 AM
Try terminator.exe /k instead.

12 attempts, worked every time. Thmbsup cheesy

There must be some strange timing issues on your computer, (which don't seem to appear on any of mine), for /m not to work with D4 and NAI occasionally.

Quote
Question 1) Is it possible to hide the cursor from showing over the icons?

The cursor is moved over the icon so Windows can remove it, then it gets put back in it's original position, (at least I think I put that part in = I'll check when I wake up).

EDIT: Yep, it's in there - the mouse moves back to wherever it started before the program was invoked.

Are you saying that the mouse stays over the tray icon position after it's already killed the program?

If so, this might be the cause of the inconsistent results with CleanTray/Terminator - something eating mouse movements or the system being abnormally slow to respond, (although I can't think of much that's slower than my Win8Pro Atom N270 netbook with a 4200RPM HDD  undecided ).

Quote
Question 2) Is it possible to create Terminator2 that leaves out NAI (not needed on XP)?

Um, can't you just not have that line in your batch file?

Quote
Question 3) When you've answered question 1 any chance of a copy of the code so that I can see if I can translate it into AHK?

Can't wait to see that cheesy  When I've cleaned up the code a bit.

Quote
Question 4) I can edit the 2 AHK programs I put together with Resource Hacker, that doesn't work with Terminator (with the exception of the icons), would that be true of all AutoIt programs?

I have no idea, Terminator was compiled as a CLI program, wasn't designed to be run from the Windows interface.

There's an update to CleanTray and Terminator so try:

CleanTray.exe /pilgrim

and

Terminator.exe /m d4.exe
Terminator.exe /m networkindicator.exe

or

Terminator.exe /b <process>
5  Main Area and Open Discussion / General Software Discussion / Re: 'Home' and 'End' and 'FN'. on: May 17, 2013, 09:25:17 AM
I am trying to avoid adding any extra software to my Netbook and curbing a previously held bad habit at the same time.

If you want to completely avoid running any extra software, your only option is to remap the keyboard, (as IainB has said), using remapkey or some other program, (I've used KeyTweak for years - attached below).

AFAIK, the Fn key on netbook keyboards, (my Aspire One in equivalent to your NC10), is hardware coded/wired within the keyboard - there's no way to get at it short of rewriting the keyboard BIOS or rewiring the keyboard.
6  Main Area and Open Discussion / General Software Discussion / Re: Advice needed on AHK script on: May 17, 2013, 06:36:18 AM
Try terminator.exe /k instead.
7  Main Area and Open Discussion / General Software Discussion / Re: Advice needed on AHK script on: May 16, 2013, 05:44:34 AM
OK, at this point you should de-fiddle your system because those things don't appear unless the mouse has been over the target icon for at least 400ms by default, so this implies you've dropped the delay to almost, (if not), 0.

I just tried manually moving the cursor over the USB SR icon and a 400ms delay seems about right.

Well, in that case I'm stumped as to why you'd be getting the tooltips appearing so quick, I've got Zentimo running and it's menu doesn't appear unless the mouse is stationary over the icon, (or moving very slowly - far slower than CleanTray moves it).

At this point because I can't replicate exactly what you're seeing on any of my machines, (XP x86, Win7 x64, Win8 x86, WHS2011 x64), I'll have to say there's not much more I can do with CleanTray unless someone else can provide a bit more insight.

Quote
Looking at the basic script I started from the only figure that I can see that could relate to a delay is the 200?

That's a question for our AHK specialists  Wink

Quote
I'll give the new version of Terminator a run and let you know.

Assuming it might work:

Formatted for Generic Code with the GeSHI Syntax Highlighter [copy or print]
  1. netsh interface show interface "Router Connection" | find /i "disabled" >NUL
  2. if errorlevel 1 goto running
  3.  
  4. rem Turning Internet items ON
  5. start /D "C:\Program Files (x86)\D4" D4.exe
  6. start /D "C:\Program Files (x86)\Sandboxie" SbieCtrl.exe
  7. start /D "C:\Program Files (x86)\PeerBlock" peerblock.exe
  8. start /D "C:\Program Files (x86)\network-activity-indicator" NetworkIndicator.exe
  9.  
  10. netsh interface set interface "Router Connection" ENABLED
  11.  
  12. goto alldone
  13.  
  14. :running
  15. rem Internet is ON, turn it all OFF now
  16. terminator.exe /c peerblock.exe
  17. terminator.exe /c SbieCtrl.exe
  18. terminator.exe /m D4.exe
  19.  
  20. netsh interface set interface "Router Connection" DISABLED
  21.  
  22. netsh interface set interface "OpenVPN Adapter" DISABLED
  23.  
  24. rasdial /disconnect
  25.  
  26. terminator.exe /m NetworkIndicator.exe
  27.  
  28. :alldone

Quote
Just out of curiosity where do you put the exe, in the same folder as the batch file, System32?

Anywhere in a path or call it with the full path to it, if it was me I'd try to keep all "foreign" files out of System32 and just put it in the same directory as the batch files, (which you might need to add to the system path).
8  Main Area and Open Discussion / General Software Discussion / Re: Advice needed on AHK script on: May 15, 2013, 09:51:06 PM
    Something I noticed yesterday which has probably been going on all the time is that my Windows 7 PC and my Netbook (XP) both have programs that produce pop-ups when you hold the cursor over the tray icons, on 7 it is USB Safely Remove, on XP it is Battery Monitor, when I run any of the tray cleaning programs the pop-ups appear.

    Although I know it's not you usual program of choice I am wondering if it is possible to prevent the pop-ups appearing when using the AHK script?

    OK, at this point you should de-fiddle your system because those things don't appear unless the mouse has been over the target icon for at least 400ms by default, so this implies you've dropped the delay to almost, (if not), 0.

    I've set mine to 30ms and they don't appear, CleanTray moves the mouse at the fastest speed AutoIt can which takes less than 10ms to traverse an area the width of your SysTray three times.  With the /debug switch it takes ~1.5 seconds to do it.

    Add to the fact that to remove 4 icons it will do a total of 5 cycles, that's 15 runs in total over that area in less than a second.

    Your icons are about 24x24 pixels by the looks, (tray height of 28), a total of about 26 icons: 630 pixels in ~3ms / 26 = ~0.11ms per icon.

    Even with the /debug switch it's ~20ms per icon.

    I set my taskbar the same, (as close as possible), a single row at the bottom with about 28 notification icons, and 4-6 orphaned at the left - in every case CleanTray worked no matter where the taskbar was located, (top, bottom, left, right), or whether it's hidden or not, (provided the icon had no background process).

    Quote
    I am attaching the tray cleaning program .....

    Doesn't do a thing here, exits immediately.

    Addendum: Since you said Terminator worked for both D4 and NAI I've been playing with it a bit more and you can try this version out.

    Terminator: Terminate a program that has a SysTray icon

    Terminate.exe [/mess] [/context [/test]] [/kill] [/blitz] [/list] <process>
    Where: /mess    - sends a WM_CLOSE message to programs window
               /context - opens the programs SysTray context menu and chooses
                              the last entry (usually Exit/Quit)
               /kill       - kill the process and then remove the SysTray
                              icon
               /blitz     - tries everything
               /list       - list processes with SysTray icons
               /test      - opens the icon context menu and selects the
                              last item but doesn't activate it
                              (only valid with /context switch)

    The switches can be abbreviated to the first character, ie. /l, /t, /m, /c, /k

    If you put multiple methods on the command line it'll only do one in this order: message, context menu and finally kill.

    eg. Terminator.exe /kill /context peerblock.exe will use the context menu to try and close peerblock.exe

    NOTES:
    • Only works with programs that have a SysTray icon
    • Only works with programs that don't open a modal requester, (currently), ie. "Are you sure?"
    • Not sure if it will work for the hidden icon area in Vista+

    So in your case you could try:

    terminator.exe /m d4.exe
    terminator.exe /m networkindicator.exe
    terminator.exe /c peerblock.exe
    terminator.exe /c sbiectrl.exe

    It doesn't do anything that's OS unfriendly, (/k does the same thing as taskkill), tested it here on Win7 on various tray dwelling programs, (but only for D4, NAI and PeerBlock in your specific case), and it seemed to work OK - system didn't crash, all my drives still seem to be full of junk.

    I'm sure one of the other programmers here could come up with something a lot nicer  cheesy

    UPDATE:
    • Tries sending WM_CLOSE 5 times at 5ms intervals, (the Pilgrim factor)
    • Added /blitz option
    9  DonationCoder.com Software / Finished Programs / Re: SOLVED: all devices hooked up to my router copied to a CSV log file on: May 14, 2013, 05:42:43 AM
    SoftPerfect Network Scanner

    C:\> netscan.exe /hide /auto:"c:\desktop\result.csv"

    As it says right in the docs Wink

    Just add it as a scheduled task to Windows.
    10  Main Area and Open Discussion / General Software Discussion / Re: Advice needed on AHK script on: May 13, 2013, 01:38:54 AM
    I just possibly realised why both the AHK and my efforts weren't quite there.

    When the mouse runs over the icons Windows removes them if there's no underlying process, it then updates the following icon positions even though the display might not as yet changed.  So even though the mouse appears to run over a position where an icon is, it's not really in that position - it's been moved.

    Hey, it's a theory...it explains why both the AHK script and CleanTray need to run multiple times if they're just moving the mouse around.

    It also only seems to happen if the icons are situated next to each other, if they are separated by other non-orphaned icons then the slight delay as the cursor travels over them appears to be enough to allow the Notification Area to "settle" into it's new state after an icon removal.

    So it all comes down to a matter of timing....

    You can test this by doing CleanTray /once and CleanTray /debug /once, the /debug now adds a slight delay so you can watch the mouse move, (so I could check the movement borders), and the /once means it only runs through the cycle once.

    With /debug there's enough of a delay for everything to update so that everything completes in a single cycle, (at least on my Phenom x6).

    New version up there, default is it moves the mouse at fastest speed and multiple times if the number of icons reduces between runs.

    Could you give /m switch a try as no matter how many times I used it, it didn't lose icon positions and it's a lot faster if there's multiple icons to remove.

    Just as a matter of interest, I couldn't get the AHK script to work at all, (however it did generate some orphaned icons for me to nuke since I had to kill their tasks  Grin ).

    Now I'll go back to playing with Terminator since avoiding the problem in the first place is always a better solution Wink
    11  Main Area and Open Discussion / General Software Discussion / Re: Advice needed on AHK script on: May 12, 2013, 08:31:00 AM
    Where, and how, do I get the debug results? embarassed

    I tried it in the cmd window and it wasn't recognised.

    More and more I start to wonder about your system  smiley

    You are using cleantray 0.1.0.0, (Properties on the executable) ?

    And if so, you should get something like:

    [attachthumb=1]
    12  Main Area and Open Discussion / General Software Discussion / Re: Advice needed on AHK script on: May 12, 2013, 06:35:24 AM
    What I did get was a lot of context menus left open including one for the next icon in line that is running all the time and one for the taskbar itself?

    Probably need to fine tune it's positioning.

    Quote
    CleanTray.exe - Only removes the icon furthest to the left.

    cleantray /debug and attach the results thanks.
    13  Main Area and Open Discussion / General Software Discussion / Re: Trying to find icon location. on: May 12, 2013, 03:36:18 AM
    It appears in C:\Windows\SysWOW64 in netcenter.dll and netshell.dll but when you go to view it in iconsext it changes.

    eg.

    [attach=1]

    [attach=2]

    Ah, it's a multi-image icon, just extract it and step through the various images within it.
    14  Main Area and Open Discussion / General Software Discussion / Re: Advice needed on AHK script on: May 11, 2013, 07:19:44 AM
    "Arnie" never moved anything.  Sad

    It doesn't "move" anything, all it does is send a WM_CLOSE message to the process, (which worked 100% of the time for D4 here), and if that failed it went to the tray icon, opened it's menu and chose the last item, (normally Exit/Quit - that had a ~95% success rate on the other two programs).  ie. You use it to end the processes instead of taskkill.

    Quote
    I asked you before about how the various scripts were different, does the AHK script in reply 1 translate into AutoIt or is that what you have been trying?

    Tested on XP x86, Win7 x64 and Win8 x86, (medium, high and low spec hardware respectively).

    CLI use only.

    CleanTray: Clears orphaned icons from Notification Area

    CleanTray.exe [/debug] [/once] [/timer] [/mensa] [/nuke]
    Where: /debug - outputs debug information to the console
               /once  - only runs over the Notification Area once (only valid for default method)
               /timer - displays time taken at the end
               /mensa - only moves mouse to orphaned icons
               /nuke  - blitzes the tray using system calls (icon positions will be lost)
               /pilgrim - adds a 1ms delay between mouse movements

    Default method is to traverse the tray using the mouse.

    The default method is the slowest if there is more than one icon to remove and /mensa has priority over /nuke if you happen to enter both on the command line.

    Formatted for AutoIt with the GeSHI Syntax Highlighter [copy or print]
    1. #NoTrayIcon
    2. #region ;**** Directives created by AutoIt3Wrapper_GUI ****
    3. #AutoIt3Wrapper_UseUpx=n
    4. #AutoIt3Wrapper_Change2CUI=y
    5. #AutoIt3Wrapper_Res_Fileversion=0.2.0.20
    6. #AutoIt3Wrapper_Res_Fileversion_AutoIncrement=y
    7. #endregion ;**** Directives created by AutoIt3Wrapper_GUI ****
    8.  
    9. #include <Array.au3>
    10. #include <_SysTray.au3>
    11. #include <_OsVersionInfo.au3>
    12.  
    13. Global $debug = False, $once = False, $timer = False, $method = 0, $pilgrim = False
    14.  
    15. If $CmdLine[0] > 0 Then
    16. For $i = 1 To $CmdLine[0]
    17. Switch StringLower(StringStripWS($CmdLine[$i], 8))
    18. Case "/debug", "/d"
    19. $debug = True
    20. Case "/once", "/o"
    21. $once = True
    22. Case "/timer", "/t"
    23. $timer = True
    24. Case "/mensa", "/m"
    25. $method = 1
    26. Case "/nuke", "/n"
    27. If $method <> 1 Then $method = 2
    28. Case "/pilgrim", "/p"
    29. $pilgrim = True
    30. _DisplayUsage()
    31.  
    32. Global $posTray = WinGetPos(_FindTrayToolbarWindow()) ; find the tray
    33. If $method <> 2 Then
    34. $oldPos = MouseGetPos() ; save mouse position
    35. MouseMove($posTray[0], $posTray[1], 0) ; move mouse to tray
    36. WinWait("[CLASS:Shell_TrayWnd]", "", 5) ; wait for the tray to open if hidden
    37.  
    38. If $debug Then
    39. ConsoleWrite("Desktop Width: " & @DesktopWidth & @CRLF & "Desktop Height: " & @DesktopHeight & @CRLF)
    40. ConsoleWrite("Notification area dimensions: " & _ArrayToString($posTray, ",") & @CRLF)
    41. $delay = 1
    42. $delay = 0
    43.  
    44. If $timer Then $start = TimerInit()
    45. Switch $method
    46. Case 0
    47. $count = 1
    48. $ret = 0
    49. $j = 0
    50. While $count <> $ret
    51. $j += 1
    52. $count = _SysTrayIconCount()
    53. $ret = _SeeYouNextYear()
    54. Case 1
    55. _TharHeIsGetIm()
    56. Case 2
    57. _NukeEmAll()
    58. If $timer Then ConsoleWrite("Time: " & Round(TimerDiff($start) / 1000, 2) & " seconds")
    59. If $method <> 2 Then MouseMove($oldPos[0], $oldPos[1], 0) ; move mouse back where it came from
    60.  
    61. Func _DisplayUsage()
    62. Local $data = "CleanTray: Clears orphaned icons from Notification Area" & @CRLF & @CRLF & _
    63. "CleanTray.exe [/debug] [/once] [/timer] [/mensa] [/nuke]" & @CRLF & _
    64. "Where: /debug - outputs debug information to the console" & @CRLF & _
    65. "       /once  - only runs over the Notification Area once" & @CRLF & _
    66. "                (only valid for default method)" & @CRLF & _
    67. "       /timer - displays time taken at the end" & @CRLF & _
    68. "       /mensa - only moves mouse to orphaned icons" & @CRLF & _
    69. "       /nuke  - blitzes the tray using system calls" & @CRLF & _
    70. "                (icon positions will be lost)" & @CRLF & _
    71. "Default method is to traverse the tray using the mouse." & @CRLF
    72. ConsoleWrite($data)
    73. EndFunc   ;==>_DisplayUsage
    74.  
    75. Func _SeeYouNextYear()
    76. If $posTray[0] >= @DesktopWidth Then $posTray[0] = @DesktopWidth - $posTray[2]
    77. If $posTray[1] >= @DesktopHeight Then $posTray[1] = @DesktopHeight - $posTray[3]
    78. If $posTray[0] < 0 Then $posTray[0] = 0
    79. If $posTray[1] < 0 Then $posTray[1] = 0
    80. Local $y = $posTray[1]
    81. While $y < $posTray[3] + $posTray[1]
    82. Local $x = $posTray[0]
    83. While $x < $posTray[2] + $posTray[0]
    84. MouseMove($x, $y, $delay)
    85. If $pilgrim Then Sleep(1)
    86. If $debug Then ConsoleWrite($x & ',' & $y & @CRLF)
    87. $x += 12
    88. $y += 12
    89. Return _SysTrayIconCount()
    90. EndFunc   ;==>_SeeYouNextYear
    91.  
    92. Func _TharHeIsGetIm()
    93. $flag = False
    94. Local $count = _SysTrayIconCount() ; get number of icons in tray
    95. For $i = $count - 1 To 0 Step -1 ; step backwards through the list
    96. Local $handle = _SysTrayIconHandle($i) ; get handle of the icon
    97. Local $pid = WinGetProcess($handle) ; get process ID for ithe handle
    98. If $pid = -1 Then ; if no process then
    99. Local $iPos = _SysTrayIconPos($i) ; get icon position
    100. MouseMove($iPos[0], $iPos[1], $delay) ; move mouse there
    101. If $debug Then ConsoleWrite($iPos[0] & ',' & $iPos[1] & @CRLF)
    102. If _SysTrayIconCount() < $count Then ; if number of icons has reduced, set flag and exit for/next loop
    103. $flag = True
    104. If $flag Then _TharHeIsGetIm() ; if flag set call func again (a little pseudo-recursion)
    105. MouseMove($oldPos[0], $oldPos[1], 0) ; move mouse back where it came from
    106. EndFunc   ;==>_TharHeIsGetIm
    107.  
    108. Func _NukeEmAll()
    109. $count = _SysTrayIconCount()
    110. For $i = $count - 1 To 0 Step -1
    111. $handle = _SysTrayIconHandle($i)
    112. $pid = WinGetProcess($handle)
    113. If $pid = -1 Then _SysTrayIconRemove($i)
    114.  
    115. If _OsVersionTest($VER_GREATER_EQUAL, 6, 1) Then
    116. $countwin7 = _SysTrayIconCount(2)
    117. For $i = $countwin7 - 1 To 0 Step -1
    118. $handle = _SysTrayIconHandle($i, 2)
    119. $pid = WinGetProcess($handle)
    120. If $pid = -1 Then _SysTrayIconRemove($i, 2)
    121. EndFunc   ;==>_NukeEmAll
    15  DonationCoder.com Software / Post New Requests Here / Re: Turn a batch file into an AHK script. on: May 11, 2013, 02:32:18 AM
    Quote
    Or perhaps right-click on the icon and select Exit?  Wink

    In spite of my fast approaching senility that was the first thing I looked at. cheesy  No context menu on the icon when this happens!
    I also tried a couple of the options we have come up with for cleaning the tray, nothing worked so it would seem the icon is not orphaned.

    Only thing I can think of is you happening to use rasdial, (to disconnect), at the same instant PPTPchek wants to use it.  I'll put a simple check in to delay PPTPchek if the radial.exe process exists, I've also changed the delay to 2 seconds.

    Give it a try and let me know, I'm still looking at another way to get PPTP VPN status that isn't so "hacky".

    Quote
    I have used these connections for several years without a problem and nothing in my set up has been changed.
    If the router is passing other PPTP connections it can't be that and the same applies to the firewall and AV.

    Can you think of anything I've missed?

    Sorry, can't help you as I rarely use VPNs - closest I get is over a SSH tunnel to my VPS.
    No PPTP VPN will work on my Win7 machine currently, (time to reinstall), but a SSH tunnel is damn near bulletproof.

    That's why my testing is only on my WHS machine atm.
    16  Main Area and Open Discussion / Living Room / Re: Strange Pyramid on: May 11, 2013, 12:51:21 AM
    The pyramid is an advanced bio-digester and therefore the cause of the methane gas pockets*.







    * And thus the cause of the depleted marine life.
    17  Main Area and Open Discussion / General Software Discussion / Re: Advice needed on AHK script on: May 09, 2013, 07:03:43 AM
    I've given up - your system is just plain weird.  cheesy

    However, a little something for you to try just for the fun of it:

    In theory, no left over icons because the programs are cleanly shut down.

    I've only tested with those 3 programs so who knows what else can happen.

    BTW, why do you run a separate time service?

    You could just run w32tm /resync if you want to synchronise your system clock - one less program to kill badly smiley
    18  DonationCoder.com Software / Post New Requests Here / Re: Turn a batch file into an AHK script. on: May 09, 2013, 05:42:58 AM
    I have found that the icon sometimes remains when I disconnect and the only way to get rid of it is to close the program using the task manager.

    Or perhaps right-click on the icon and select Exit?  Wink

    Next time it happens please open a CLI and type rasdial.exe and copy the results.  If it says "No connections" then there is a problem.

    Quote
    When I close the connection and the icon does disappear it takes about 5 seconds by my reckoning, I am not sure if this is related to the polling delay or a shutdown delay, either way could it be reduced to say 2 seconds?

    I can change it easily enough but there will be an attendant CPU load increase also, (due to less time in idle state and calling rasdial more often).  Still looking at a better way to get connection state - possibly just by hitting the performance counters.

    Quote
    Does the latest version of PPTPchek replace the previous version if someone is still using batch files or do they work in different ways?

    Replaces, it only requires an optional delay, it will pick up the connection name from what rasdial reports.

    Quote
    I think I mentioned somewhere that I am in touch with a VPN developer/provider, would you have any objections if details/instructions for PPTPchek were put on his website, it would of course be credited to you?

    Not a problem, maybe I'll add a /? so you can get the CLI parameters, (like a normal DOS command).
    19  Main Area and Open Discussion / Living Room / Re: What books are you reading? on: May 08, 2013, 11:32:12 PM
    Just finished all 14 books of Andy McNab' Nick Stone series, now onto Flashforward by Robert Sawyer.

    [attach=1]

    Question for all you book nuts, anyone know where I can get ebook versions of L. P. Davies'w novels?

    My dad has most of his in hardcover, so I can always go nick them, but I'd like to read them again, (it's some of the best sci-fi I've read), on my phone rather than cart a book around.

    Actually, I should nick them anyway before they end up in an Op Shop.  undecided
    20  DonationCoder.com Software / Post New Requests Here / Re: Turn a batch file into an AHK script. on: May 08, 2013, 11:24:07 AM
    I can't read the print in your images even with a magnifier (blurred) , I think I can work most of it out except for what is in the second and third boxes in step 4?

    Click on the images, they're much bigger than they appear. smiley

    Or just use PPTPchek.exe 600 in your batch file.
    21  Main Area and Open Discussion / General Software Discussion / Re: Advice needed on AHK script on: May 08, 2013, 06:44:35 AM
    Just tried the new version of CleanTray, it removed all 4 icons instantly, it left 4 empty spaces at the right hand end of the tray (with the Task Manager NOT running), it rearranged the icons. Basically it's doing the same as the previous version.

    And that's running it as:

    CleanTray.exe 5

    (or at least some number from 1 to 100) ?

    The fact you said instantly kind of indicates that you didn't specify an argument, otherwise you'd be able to watch the mouse move around, ie. it's not instant.
    22  Main Area and Open Discussion / Living Room / Re: Can we compare file transfer protocols? on: May 08, 2013, 02:09:35 AM
    No problem, I'm used to being ignored  lol
    23  DonationCoder.com Software / Post New Requests Here / Re: IDEA: Folder Zipper on: May 08, 2013, 01:57:53 AM
    I know it's not a multi-megbyte monster with a nice GUI....but if you don't mind a simple batch command:

    Formatted for Generic Code with the GeSHI Syntax Highlighter [copy or print]
    1. REM 7z2CBZ.cmd
    2. @echo off
    3. %~d1
    4. cd %~dp1
    5. for /d %%X in (%*) do (
    6. cd "%%~nxX"
    7. REM edit line below to include path to 7z.exe
    8. C:\batchfiles\7z.exe a "..\%%~nxX.cbz" *.* -mx5 -tzip
    9. cd ..
    10. )

    Put the batch file somewhere, edit it so that it's pointing to 7z.exe, then create a shortcut to it in %USERPROFILE%\SendTo, eg.

    [attach=1]

    To use: select your folders in Explorer, DOpus, etc, right-click and select Send To -> 7z2CBZ

    eg. From this:

    [attachthumb=2]

    You should end up with something like this:

    [attachthumb=3]

    Obligatory warning: There's no checking for any kind of error, eg. if you selected files instead directories.  That said, it works for me smiley

    A breakdown of what it does:
    %~d1    Take the drive of the first argument and change to it
    cd %~dp1    Take the path of the first argument and CD to it
    for /d %%X in (%*) do (     For every argument passed to the batch file
    cd "%%~nxX"    CD to the directory
    C:\batchfiles\7z.exe a "..\%%~nxX.cbz" *.* -mx5 -tzip    Create the archive in the parent directory
    cd ..    Change back to the parent directory


    UPDATE: Got rid of the move command.
    24  Main Area and Open Discussion / General Software Discussion / Re: Advice needed on AHK script on: May 07, 2013, 08:24:35 PM
    Seems to me that you'd be better off with a program that terminates a process and removes
    any tray icon left by the terminated program, then you'd only need three lines in your batch file.

    Or a task killer that sends a proper program exit command so the program can shut itself down cleanly.
    25  DonationCoder.com Software / Post New Requests Here / Re: Turn a batch file into an AHK script. on: May 07, 2013, 08:08:39 PM
    Yes, I could just change it so it ran all the time if no arguments were passed.

    In that case, with its current method of working, I'd probably have the default interval changed to 10-15 seconds.

    EDIT: Or in Win7, there's probably an EventID when a connection is made that you could use to trigger a Scheduled Task.

    Here we go, this should work for Vista and later, (including WHS2008+) - requires latest PPTPchek.exe (0.3.0.16):

    1) Run Task Scheduler and select Create Basic Task

    [attachthumb=1]

    2) Give your task a name, (and a description if you want), then hit Next:

    [attachthumb=2]

    3) Select When a specific event is logged then hit Next:

    [attachthumb=3]

    4) Set up the Trigger as below and hit Next:

    [attachthumb=4]

    5) Choose Start a program, hit Next:

    [attachthumb=5]

    6) Fill out the fields with the appropriate info, hit Next:

    [attachthumb=6]

    7) Hit Finish

    [attachthumb=7]

    Job done!  Program will run when a PPTP connection is made.

    (And no, the Task Scheduler in XP isn't intelligent enough to do this.  smiley )
    Pages: [1] 2 3 4 5 6 ... 98 Next
    DonationCoder.com | About Us
    DonationCoder.com Forum | Powered by SMF
    [ Page time: 0.292s | Server load: 0.06 ]