topbanner_forum
  *

avatar image

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

Login with username, password and session length
  • Saturday April 11, 2026, 4:05 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

Recent Posts

Pages: prev1 ... 123 124 125 126 127 [128] 129 130 131 132 133 ... 225next
3176
General Software Discussion / Re: Advice needed on AHK script
« Last post by 4wd on May 12, 2013, 06:35 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.

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

cleantray /debug and attach the results thanks.
3177
General Software Discussion / Re: Trying to find icon location.
« Last post by 4wd on May 12, 2013, 03:36 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.

2013-05-12 18_29_23-Select a file for icons extraction.png

2013-05-12 18_29_43-IconsExtract_   C__Windows_SysWOW64_netcenter.dll.png

Ah, it's a multi-image icon, just extract it and step through the various images within it.
3178
General Software Discussion / Re: Advice needed on AHK script
« Last post by 4wd on May 11, 2013, 07:19 AM »
"Arnie" never moved anything.  :(

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.

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.

Code: AutoIt [Select]
  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.                         Case Else
  31.                                 _DisplayUsage()
  32.                                 Exit
  33.                 EndSwitch
  34.         Next
  35.  
  36. Global $posTray = WinGetPos(_FindTrayToolbarWindow()) ; find the tray
  37. If $method <> 2 Then
  38.         $oldPos = MouseGetPos() ; save mouse position
  39.         MouseMove($posTray[0], $posTray[1], 0) ; move mouse to tray
  40.         WinWait("[CLASS:Shell_TrayWnd]", "", 5) ; wait for the tray to open if hidden
  41.  
  42. If $debug Then
  43.         ConsoleWrite("Desktop Width: " & @DesktopWidth & @CRLF & "Desktop Height: " & @DesktopHeight & @CRLF)
  44.         ConsoleWrite("Notification area dimensions: " & _ArrayToString($posTray, ",") & @CRLF)
  45.         $delay = 1
  46.         $delay = 0
  47.  
  48. If $timer Then $start = TimerInit()
  49. Switch $method
  50.         Case 0
  51.                 $count = 1
  52.                 $ret = 0
  53.                 $j = 0
  54.                 While $count <> $ret
  55.                         $j += 1
  56.                         $count = _SysTrayIconCount()
  57.                         $ret = _SeeYouNextYear()
  58.                         If $once Then ExitLoop
  59.                 WEnd
  60.         Case 1
  61.                 _TharHeIsGetIm()
  62.         Case 2
  63.                 _NukeEmAll()
  64.         Case Else
  65. If $timer Then ConsoleWrite("Time: " & Round(TimerDiff($start) / 1000, 2) & " seconds")
  66. If $method <> 2 Then MouseMove($oldPos[0], $oldPos[1], 0) ; move mouse back where it came from
  67.  
  68. Func _DisplayUsage()
  69.         Local $data = "CleanTray: Clears orphaned icons from Notification Area" & @CRLF & @CRLF & _
  70.                         "CleanTray.exe [/debug] [/once] [/timer] [/mensa] [/nuke]" & @CRLF & _
  71.                         "Where: /debug - outputs debug information to the console" & @CRLF & _
  72.                         "       /once  - only runs over the Notification Area once" & @CRLF & _
  73.                         "                (only valid for default method)" & @CRLF & _
  74.                         "       /timer - displays time taken at the end" & @CRLF & _
  75.                         "       /mensa - only moves mouse to orphaned icons" & @CRLF & _
  76.                         "       /nuke  - blitzes the tray using system calls" & @CRLF & _
  77.                         "                (icon positions will be lost)" & @CRLF & _
  78.                         "Default method is to traverse the tray using the mouse." & @CRLF
  79.         ConsoleWrite($data)
  80. EndFunc   ;==>_DisplayUsage
  81.  
  82. Func _SeeYouNextYear()
  83.         If $posTray[0] >= @DesktopWidth Then $posTray[0] = @DesktopWidth - $posTray[2]
  84.         If $posTray[1] >= @DesktopHeight Then $posTray[1] = @DesktopHeight - $posTray[3]
  85.         If $posTray[0] < 0 Then $posTray[0] = 0
  86.         If $posTray[1] < 0 Then $posTray[1] = 0
  87.         Local $y = $posTray[1]
  88.         While $y < $posTray[3] + $posTray[1]
  89.                 Local $x = $posTray[0]
  90.                 While $x < $posTray[2] + $posTray[0]
  91.                         MouseMove($x, $y, $delay)
  92.                         If $pilgrim Then Sleep(1)
  93.                         If $debug Then ConsoleWrite($x & ',' & $y & @CRLF)
  94.                         $x += 12
  95.                 WEnd
  96.                 $y += 12
  97.         WEnd
  98.         Return _SysTrayIconCount()
  99. EndFunc   ;==>_SeeYouNextYear
  100.  
  101. Func _TharHeIsGetIm()
  102.         $flag = False
  103.         Local $count = _SysTrayIconCount() ; get number of icons in tray
  104.         For $i = $count - 1 To 0 Step -1 ; step backwards through the list
  105.                 Local $handle = _SysTrayIconHandle($i) ; get handle of the icon
  106.                 Local $pid = WinGetProcess($handle) ; get process ID for ithe handle
  107.                 If $pid = -1 Then ; if no process then
  108.                         Local $iPos = _SysTrayIconPos($i) ; get icon position
  109.                         MouseMove($iPos[0], $iPos[1], $delay) ; move mouse there
  110.                         If $debug Then ConsoleWrite($iPos[0] & ',' & $iPos[1] & @CRLF)
  111.                         If _SysTrayIconCount() < $count Then ; if number of icons has reduced, set flag and exit for/next loop
  112.                                 $flag = True
  113.                                 ExitLoop
  114.                         EndIf
  115.                 EndIf
  116.         Next
  117.         If $flag Then _TharHeIsGetIm() ; if flag set call func again (a little pseudo-recursion)
  118.         MouseMove($oldPos[0], $oldPos[1], 0) ; move mouse back where it came from
  119. EndFunc   ;==>_TharHeIsGetIm
  120.  
  121. Func _NukeEmAll()
  122.         $count = _SysTrayIconCount()
  123.         For $i = $count - 1 To 0 Step -1
  124.                 $handle = _SysTrayIconHandle($i)
  125.                 $pid = WinGetProcess($handle)
  126.                 If $pid = -1 Then _SysTrayIconRemove($i)
  127.         Next
  128.  
  129.         If _OsVersionTest($VER_GREATER_EQUAL, 6, 1) Then
  130.                 $countwin7 = _SysTrayIconCount(2)
  131.                 For $i = $countwin7 - 1 To 0 Step -1
  132.                         $handle = _SysTrayIconHandle($i, 2)
  133.                         $pid = WinGetProcess($handle)
  134.                         If $pid = -1 Then _SysTrayIconRemove($i, 2)
  135.                 Next
  136.         EndIf
  137. EndFunc   ;==>_NukeEmAll
3179
Post New Requests Here / Re: Turn a batch file into an AHK script.
« Last post by 4wd on May 11, 2013, 02:32 AM »
Or perhaps right-click on the icon and select Exit?  ;)

In spite of my fast approaching senility that was the first thing I looked at. :D  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".

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.
3180
Living Room / Re: Strange Pyramid
« Last post by 4wd on May 11, 2013, 12:51 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.
3181
General Software Discussion / Re: Advice needed on AHK script
« Last post by 4wd on May 09, 2013, 07:03 AM »
I've given up - your system is just plain weird.  :D

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 :)
3182
Post New Requests Here / Re: Turn a batch file into an AHK script.
« Last post by 4wd on May 09, 2013, 05:42 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?  ;)

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.

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.

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.

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).
3183
Living Room / Re: What books are you reading?
« Last post by 4wd on May 08, 2013, 11:32 PM »
Just finished all 14 books of Andy McNab' Nick Stone series, now onto Flashforward by Robert Sawyer.

41eL1vf1y1L._BO2,204,203,200_PIsitb-sticker-arrow-click,TopRight,35,-76_AA278_PIkin4,BottomRight,-52,22_AA300_SH20_OU01_.jpg

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.  :-\
3184
Post New Requests Here / Re: Turn a batch file into an AHK script.
« Last post by 4wd on May 08, 2013, 11:24 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. :)

Or just use PPTPchek.exe 600 in your batch file.
3185
General Software Discussion / Re: Advice needed on AHK script
« Last post by 4wd on May 08, 2013, 06:44 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.
3186
Living Room / Re: Can we compare file transfer protocols?
« Last post by 4wd on May 08, 2013, 02:09 AM »
No problem, I'm used to being ignored  :lol:
3187
Post New Requests Here / Re: IDEA: Folder Zipper
« Last post by 4wd on May 08, 2013, 01:57 AM »
I know it's not a multi-megbyte monster with a nice GUI....but if you don't mind a simple batch command:

Code: Text [Select]
  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.

2013-05-08 16_42_53-C__Users_4wd_AppData_Roaming_Microsoft_Windows_SendTo.png

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

eg. From this:

2013-05-08 16_47_21-.png

You should end up with something like this:

2013-05-08 16_47_48-U__jkkjkj.png

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

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.
3188
General Software Discussion / Re: Advice needed on AHK script
« Last post by 4wd on May 07, 2013, 08:24 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.
3189
Post New Requests Here / Re: Turn a batch file into an AHK script.
« Last post by 4wd on May 07, 2013, 08:08 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

2013-05-08 14_29_03-Task Scheduler.png

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

2013-05-08 14_30_23-Create Basic Task Wizard.png

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

2013-05-08 14_30_34-Create Basic Task Wizard.png

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

2013-05-08 14_31_14-Create Basic Task Wizard.png

5) Choose Start a program, hit Next:

2013-05-08 14_31_22-Create Basic Task Wizard.png

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

2013-05-08 15_26_58-Create Basic Task Wizard.png

7) Hit Finish

2013-05-08 15_27_38-Create Basic Task Wizard.png

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.  :) )
3190
Finished Programs / Re: SOLVED: Absolutely Basic Count-up Timer (ABC Timer)
« Last post by 4wd on May 07, 2013, 12:54 AM »
If you
Maybe I'm wrong but that looks like it's a countdown timer.

If you set the minutes to zero, it acts as a countup timer.   :)

My mistake  :-[
3191
Finished Programs / Re: SOLVED: Absolutely Basic Count-up Timer (ABC Timer)
« Last post by 4wd on May 07, 2013, 12:48 AM »
My bet is on SnapTimer.  =]

Maybe I'm wrong but that looks like it's a countdown timer.

I think a basic stopwatch program that starts when run is nearer the mark, perhaps tranglos' Stopwatch ?

Or the SwiftTec version is even simpler.
3192
General Software Discussion / Re: Creating thumbnails from AVCHD .mts files?
« Last post by 4wd on May 07, 2013, 12:20 AM »
Nod5 created a script for doing it here and fredkremenko did one here.

Should still work unless the interface of MPC/MPC-HC have radically changed.

EDIT: One day I'll learn to look at the preceding post dates more carefully  :wallbash:
3193
General Software Discussion / Re: Advice needed on AHK script
« Last post by 4wd on May 06, 2013, 11:46 PM »
The one question I have to ask is: What are you doing that leaves so many orphaned icons so often?

Also, I'd be interested to know if the attached version of CleanTray works, I've modified it so that it works one of two ways which I'll refer to as Nuke'em and Boring :)

CleanTray.exe [anything]

Where: [anything] = anything, any argument at all.

A number from 1 to 100 = Boring slow way = moving mouse over all the icons, the lower the number the faster it moves, I suggest you start with 5.
No args, a string or 0 = Nuke'em = Much faster with an absolute total disregard of resulting icon order, (the way I like since I have to restart explorer.exe to get all the icons to show up in the first place).

So in your case, try:

C:\> CleanTray.exe 2


I realise that AutoIt and AHK are two different languages but it seems that we have one script that removes ALL orphaned icons but plays havoc with icon location and a second script that only affects orphaned icons but will not remove more than 2 at a time. Putting aside the different languages they are written in what are they actually doing differently?

AutoIt script, (original CleanTray), gets the number of icons in the tray then asks for the process that controls that icon.  If no process is returned the icon is removed - obviously in using the appropriate system calls to remove the icon, it also removes the positioning info.

The first AutoHK script moves the mouse over the icons but you need to specify a coordinate offset based on your screen parameters.  The second AutoHK script works the same as CleanTray by using system calls to detect icons without processes and then removing them.

The new CleanTray works depending on the passed argument:
a) The original way, ie. just removes the icon if it has no background process.
b) Locates the tray, gets the number of icons, it then loops backwards through the list getting the icon' background process.  If an icon has no background process, the mouse is moved to it, Windows will then remove it, (as it usually does).  If an icon is removed it will exit the loop, get the new number of icons and start again, ie. it will recurse, (kind of), through the icon list until it gets to the point where no icons are removed.

REDUNDANT: See below
3194
General Software Discussion / Re: Advice needed on AHK script
« Last post by 4wd on May 06, 2013, 09:25 AM »
And yet another option :)

Here's a simple AutoIt script that will bounce the mouse over tray icons that have a running process, it may pick up orphaned icons as it jumps from one to another.

It's just a modified version of the SysTray_Example.au3 found here along with the UDF by tuape.

Attached code redundant - see below.
3195
General Software Discussion / Re: [IDEA] put places on map
« Last post by 4wd on May 05, 2013, 05:50 AM »
If you put them into a spreadsheet then you can import into Maptive or Spreadsheets -> Map Wizard.

3196
Post New Requests Here / Re: Turn a batch file into an AHK script.
« Last post by 4wd on May 04, 2013, 09:07 PM »
Something I realised when I was changing VPN's is there is no indication as to which one is connected, the icon is showing 'PPTPcheck.exe' when I move the cursor over it.

Short term memory loss ?  ;)

EDIT: For some weird reason I can't get the ToolTip to change to something other than the executable name, (I was going to make it the passed NIC name), more reading to be done.

To avoid any problems I have put a shortcut in the toolbar to the OFF batch file, it works for all PPTP connections (L2TP as well) and still only needs one click.
This is probably not necessary but sometimes I finished up with the PPTPcheck icon out of synch with the connection status, a couple of clicks on any ON icon sorts it out but this stops it happening.

I don't see how that can happen unless you're switching connections faster than the 5 second interval PPTPchek uses between rasdial.exe calls, ie. the longest PPTPchek should be active after a disconnection is 5 seconds.

This was a trade-off between increased CPU usage and a reasonably short update period - there's probably another way I could use to check connection status, (using a WMI or DLL call), but rasdial.exe was quick and easy.  I might look into it a bit further.

When I first started using them there were hardly any about and few if any of them were free, now they are popping up all over the place although I'm not sure that I would trust the security of some of them.

But since most of them are purely for the purpose of accessing region restricted media content, that shouldn't be a problem.

UPDATE: PPTPchek
  • Start monitor delay will be terminated as soon as the rasdial.exe process terminates.
  • ToolTip now indicates connection name.
3197
Post New Requests Here / Re: Turn a batch file into an AHK script.
« Last post by 4wd on May 04, 2013, 05:59 AM »
Code: Text [Select]
  1. rasdial.exe | find /i "no connections" >NUL
  2. if errorlevel 1 goto running
  3. rem prog is not running
  4. cmdow.exe /run rasdial.exe PPTP-UK freecloudvpn.com 1702
  5. cmdow.exe /run /hid PPTPchek.exe PPTP-UK 60
  6. goto alldone
  7. :running
  8. rem prog is already running
  9. cmdow.exe /run rasdial.exe /disconnect
  10. :alldone

Tested working on WHS2011, (equivalent to Win7 x64), running it from the directory in which cmdow.exe, PPTPchek.exe and the batch file all reside.

Run it from a shortcut and no CLI windows are left open.

No separate OFF batch file required, just the ON ones.

(That's a free VPN BTW, password changes every few hours.)
3198
Post New Requests Here / Re: Turn a batch file into an AHK script.
« Last post by 4wd on May 03, 2013, 10:51 PM »
Use Cmdow instead of Start - an old standby from the heady days of DOS.

Cmdow - Cmdow is a Win32 commandline utility for NT4/2000/XP/2003 that allows windows to be listed, moved, resized, renamed, hidden/unhidden, disabled/enabled, minimized, maximized, restored, activated/inactivated, closed, killed and more.

eg. cmdow.exe /run /hid pptpchek.exe US-VPN 20

Only the Netload download link seems to be working at this time.

NOTE: Your AV program will probably hate it unless you tell it to ignore it - although MSE and MBAM seem OK with it.

It'll do until I work out how to detach from the CLI, which seems to be surprisingly hard, (or obscure).
3199
Post New Requests Here / Re: Turn a batch file into an AHK script.
« Last post by 4wd on May 03, 2013, 06:43 AM »
Before I leave this subject I have one further question if you don't mind:

All it does is call rasdial.exe every 5 seconds, if the named connection no longer exists the program exits.

I have been trying for a long time to find a way to put an argument into a batch file that states: 'if PPTP is (not) connected then........'.
Can your idea be used in that way and if so how would it read?

Off the top of my head, something along the lines of:

Code: Text [Select]
  1. rasdial.exe | find /i "no connections" >NUL
  2. if errorlevel 1 goto running
  3.  
  4. echo No PPTP connection
  5.  
  6. goto alldone
  7. :running
  8.  
  9. echo PPTP connection exists
  10.  
  11. :alldone

ie.
Execute rasdial and pipe the output to FIND to search for "no connections", (case insensitive), if it doesn't exist the errorlevel will be 1 so we jump to the running label.

You have made using my computer a little bit easier and saved me countless hours of trying to sort this out myself, at the end of which I would probably have given up.

No problem, gives me something to do besides blast things in Borderlands 2  ;D
3200
General Software Discussion / Re: Steam, and customer satisfaction
« Last post by 4wd on May 03, 2013, 05:02 AM »
@Target: If you want to save your data allowance let me know, I'll make sure my CoD: MW3 install is up to date, archive it onto DVD and mail it to you.

BTW, the 35GB install seems excessive - it only takes up 14.2GB on both my XP and Win7 machines.
Pages: prev1 ... 123 124 125 126 127 [128] 129 130 131 132 133 ... 225next