Page 2 of 2

Re: Turn Network device on/off by application

Posted: 26 Jul 2016, 12:19
by megnatar
Update:
Moved the bandwidth meter to the top side of the monitor.
Converted the units B/KiB/MB from the bandwidth meter to the correct values.
Rounded up the units to two decimal points.

ToDo:
Change the bandwidth meter tooltip to a gui, so it can be placed anywhere on the screen.

Re: Turn Network device on/off by application

Posted: 30 Jul 2016, 04:39
by megnatar
UpDate:
Replaced the fixed tooltip that displayed the bandwidth, for a small borderless and draggable gui.
Also it now only shows killo bytes and Mega bytes where needed. The previous version also displayed the bandwidth in bytes.
But of course a byte is just to small. Making the unit to jump from byte to killo byte all the time, like coo coo..
Its much easier on the eye now.

Re: Turn Network device on/off by application

Posted: 02 Aug 2016, 22:50
by Wickster
thanks for all the hard work and all the updates. keep em coming!

Re: Turn Network device on/off by application

Posted: 04 Aug 2016, 14:20
by megnatar
Update:
- Re ordered the placement of the D/U meter gui in the script so it now loads almost instantly.
- Margin/Section based gui
- A integer zero is not displayed in the D/U meter. So the number updates or downgrades nicely but never jumps back to zero.

Re: Turn Network device on/off by application

Posted: 12 Aug 2016, 11:38
by megnatar
UpDate:
- Black border added.
- Better GUI drag handling. The whole background window now handles the dragging while before it was each text control.
- The script 'remembers' in between sessions and script exit/next run, if DU meter was running. Disables the DU meter when NIC is shutdown. And enables it once more when NIC is switched on.

Re: Turn Network device on/off by application

Posted: 13 Aug 2016, 12:39
by megnatar
Wickster wrote:thanks for all the hard work and all the updates. keep em coming!
You're welcome!

Re: Turn Network device on/off by application | Du Meter

Posted: 17 Aug 2016, 20:13
by megnatar
Beta UpDate:
- For the tooltip it: retrieves wan-ip when used from behind a router. Simply by using ping
- Moved some code around here and there.

Re: Turn Network device on/off by application | Du Meter

Posted: 13 Sep 2016, 17:49
by megnatar
Update:
ToggleNic v1.0.2

Changed or added:
- Improved the way to discover the WAN ip. It now works flawless.
- Added a function to update status info, to prevent endless code repetition.
- Simplified the way to fill the drop down list with all found network devices.
- A right click on the DU window will also display the tray menu.
- Reduced the number of, same lines of code.
- Slightly changed the DU-meter GUI
- The status of tray icon and tooltip will always update. Regardless if the nic is disabled/enabled by the script.

Re: Turn Network device on/off by application | Du Meter

Posted: 14 Sep 2016, 10:34
by SnowFlake

Re: Turn Network device on/off by application | Du Meter

Posted: 17 Sep 2016, 12:15
by megnatar
SnowFlake wrote:Error:
Image
If you downloaded a updated version of this script, then it might help to delete the settings.ini.
I changed it recently and variable IconFile now needs to be a Global variable since it's used in function StatusUpDate().
Remember that the file with allowed apps will also be removed! So make a backup!

Maybe its a good idea to let the script take care of this in future releases by checking version numbers....

Code: Select all

	;Checking if operating system is windows10 or not. Icons are only tested on win10 and 7.
	If(A_OSVersion >= 10 ){
		IconEnabled := 13
		IconDisabled := 1
	}Else{
		IconEnabled := 28
		IconDisabled := 13
	}

Thank you!
Megnatar

Re: Turn Network device on/off by application | Du Meter

Posted: 17 Sep 2016, 12:37
by megnatar
Update:

Changed or added:
- Fixed some minor bugs.
- Removed unused vars.
- Removed functions that are called only once and added there "function" as regular code.
- Removed the empty gui text control with the gLable that controlled gui dragging. A function now controls gui dragging and is triggered by OnMessage WM_LBUTTONDOWN.
- Combined some math operations to a single line, where before the where multi line.
- Added a slider control to change the DuMeter update interval. It can be set between 500ms and 3sec in steps of 500ms. 500 to 1000 to 1500 and so on ...
- Added a Idle timer for DuMeter using A_TickCount. It changes the gui text and update interval after 1minute of inactivity (I'm not sure if i'm satisfied with it, I might remove it)

Re: Turn Network device on/off by application | Du Meter

Posted: 25 Sep 2016, 16:34
by megnatar
Update: 1.0.3 beta

Changed or added:
- Added option to disable auto toggle by app
- Added option to never hide DU Meter
- Replaced notepad for adding/removing new apps with a ListView
- Retrieving WAN-IP is now language independent and also faster since its all done in memory. I removed the file operations

Re: Turn Network device on/off by application | Du Meter

Posted: 25 Mar 2018, 07:20
by megnatar
Update to V2.0.1
- Automagically detects if you're behind a router.
- Code makes more sense, and is improved to a more expressive style.
- Tray status icons now show when the nic is On, Off or No network connection available.
- Compatibility added for win8
- Fixed wrong disabled icon on win8
- Added a check to see if the 1st DNS-IP is not local.

Re: ToggleNic v2.0.3 --> Toggles Network device by application | and DuMeter

Posted: 01 Apr 2018, 18:19
by megnatar
Update to V2.0.3
- Replaced the loop that monitored when a allowed application was launched or closed,
for a shell message monitor. The monitor checks if each new launched application is in
the allowed list or not. Thus reducing CPU usage nearly to zero

Re: ToggleNic v2.0.5 --> Toggles Network device by application | and DuMeter

Posted: 23 Jun 2018, 02:47
by WeetIkVeel
Hello megnatar,

cool script, it works great

Re: ToggleNic v2.0.5 --> Toggles Network device by application | and DuMeter

Posted: 26 Jun 2018, 14:59
by megnatar
Thank You ! :)

Re: ToggleNic v2.0.5 --> Toggles Network device by application | and DuMeter

Posted: 26 Jun 2018, 15:43
by burque505
You're really staying on top of this, thanks for sharing! :bravo:
Regards,
burque505

Re: ToggleNic v2.0.5 --> Toggles Network device by application | and DuMeter

Posted: 27 Jun 2018, 08:28
by megnatar
burque505 wrote:You're really staying on top of this, thanks for sharing! :bravo:
Regards,
burque505
Thanks for the support!
Its much appreciated