[TOOL]: OverNight Mode v2.3 (2 clients update)

05/12/2008 01:20 edwerd#1
Info:
Hello everyone...i have decided to bring my old script back to life,due to some people requesting it...
This script will allow u to choose what you want your computer to do after SRO gets DC,there are 3 choices:Shutdown,Stand By and Sound...
I think i don't need to explain what each of these options mean,it is pretty self explanatory


Screenshot:
[Only registered and activated users can see links. Click Here To Register...]

How to use:
1. Download the rar file and extract it
2. Run SRO
3. Run Overnight Mode v2.2.exe
4. Choose your option
5. Go to Sleep

Notes:
- First Run SRO then this script otherwise it will detect SRO_Client doesn't exist and return an error
- Make sure your client is not /mini or /min before u go AFK
- Removed Source code because i can't stand those leechers who don't respect anyone a bit

Download:
v2.3 - [Only registered and activated users can see links. Click Here To Register...]

Changelog:
v1.0 -Oldest version,contained only pc shutdown
v1.1 -Added 2 more options to the first version
v2.0 -Completely redone the whole script from scratch
v2.1 -Added client dissapear detection
v2.2 -Added new resolution 1280*1024
v2.3 -Added 2 Clients for Sound,Some minor script changes

Working On:
-2+ Clients
-Multiclient for all options
-Multi,choose if u want action when all sro clients close or one of them


Knock yourselves out...and don't forget the thanks button...
If u have any problems or ideas post them here...

** Credit Goes To Dark from 0x33 **
05/12/2008 13:35 InvincibleNoOB#2
You've got my confirmation.
Source
Code:
#AutoIt3Wrapper_Icon = C:Documents And SettingsOwnerDesktopOvernightModeSilkroad.ico
#include <GUIConstants.au3>
#RequireAdmin
GUICreate("OverNight Mode v2.3", 430, 240)
GUICtrlCreatePic("C:Documents and SettingsOwnerDesktopOvernightModeNight.jpeg", 45, 405)
GUISetFont(11)
GUICtrlCreateLabel("Welcome to OverNight Mode", 120, 10)
GUICtrlCreateLabel("Made by Dark 0x33.org", 137, 27)
GUISetFont(10)
GUICtrlCreateLabel("What do you want your computer to do when dc is detected?", 33, 70)
GUICtrlCreateLabel("NOTE: 2 Clients feature working only for ''sound'' option atm", 35, 199)
GUISetFont(8.5)
GUIStartGroup()
GUICtrlCreateGroup("Resolution", 165, 97, 112, 89)
SRES1 = GUICtrlCreateRadio("1024 x 768", 175, 120, 80, 20)
SRES2 = GUICtrlCreateRadio("1280 x 1024", 175, 150, 80, 20)
GUICtrlSetState(SRES1, SGUI_CHECKED)
GUIStartGroup()
GUICtrlCreateGroup("MultiClient", 295, 97, 112, 89)
SMULTI1 = GUICtrlCreateRadio("1 Client", 305, 120, 80, 20)
SMULTI2 = GUICtrlCreateRadio("2 Clients", 305, 150, 80, 20)
GUICtrlSetState(SMULTI1, SGUI_CHECKED)
SSLEEP = GUICtrlCreateButton("Stand By", 25, 100, 120)
SSHUT = GUICtrlCreateButton("Shut Down", 25, 130, 120)
SSOUND = GUICtrlCreateButton("Sound", 25, 160, 120)
GUISetState(@SW_SHOW)
While 1
	SMSG = GUIGetMsg()
	Select
		Case SMSG = SSOUND And SRES1 And BitAND(GUICtrlRead(SRES1), SGUI_CHECKED) = SGUI_CHECKED And SMULTI1 And BitAND(GUICtrlRead(SMULTI1), SGUI_CHECKED) = SGUI_CHECKED
			If Not WinExists("SRO_Client") Then
				MsgBox(16, "Error", "Sro_Client not detected!")
				Sleep(500)
				ExitLoop
			EndIf
			GUISetState(@SW_HIDE)
			While 1
				Sleep(250)
				If PixelGetColor(361, 315) = 13027014 Then
					Sleep(1000)
					Beep(3300, 10000)
				ElseIf Not WinExists("SRO_Client") Then
					Sleep(1000)
					Beep(3300, 1200)
				EndIf
			WEnd
		Case SMSG = SSOUND And SRES2 And BitAND(GUICtrlRead(SRES2), SGUI_CHECKED) = SGUI_CHECKED And SMULTI1 And BitAND(GUICtrlRead(SMULTI1), SGUI_CHECKED) = SGUI_CHECKED
			If Not WinExists("SRO_Client") Then
				MsgBox(16, "Error", "Sro_Client not detected!")
				Sleep(500)
				ExitLoop
			EndIf
			GUISetState(@SW_HIDE)
			While 1
				Sleep(250)
				If PixelGetColor(489, 443) = 13027014 Then
					Sleep(1000)
					Beep(3300, 10000)
				ElseIf Not WinExists("SRO_Client") Then
					Sleep(1000)
					Beep(3300, 1200)
				EndIf
			WEnd
		Case SMSG = SSOUND And SRES1 And BitAND(GUICtrlRead(SRES1), SGUI_CHECKED) = SGUI_CHECKED And SMULTI2 And BitAND(GUICtrlRead(SMULTI2), SGUI_CHECKED) = SGUI_CHECKED
			If Not WinExists("SRO_Client") Then
				MsgBox(16, "Error", "Sro_Client not detected!")
				Sleep(500)
				ExitLoop
			EndIf
			GUISetState(@SW_HIDE)
			Sleep(1500)
			WinSetTitle("SRO_Client", " ", "SRO_Client1")
			Sleep(1500)
			WinSetTitle("SRO_Client", " ", "SRO_Client2")
			While 1
				Sleep(600000)
				WinActivate("SRO_Client1")
				If PixelGetColor(361, 315) = 13027014 Then
					Sleep(1000)
					Beep(3300, 1200)
				EndIf
				Sleep(600000)
				WinActivate("SRO_Client2")
				If PixelGetColor(361, 315) = 13027014 Then
					Sleep(1000)
					Beep(3300, 1200)
				ElseIf Not WinExists("SRO_Client1") Then
					Sleep(1000)
					Beep(3300, 1200)
				ElseIf Not WinExists("SRO_Client2") Then
					Sleep(1000)
					Beep(3300, 1200)
				EndIf
			WEnd
		Case SMSG = SSOUND And SRES2 And BitAND(GUICtrlRead(SRES2), SGUI_CHECKED) = SGUI_CHECKED And SMULTI2 And BitAND(GUICtrlRead(SMULTI2), SGUI_CHECKED) = SGUI_CHECKED
			If Not WinExists("SRO_Client") Then
				MsgBox(16, "Error", "Sro_Client not detected!")
				Sleep(500)
				ExitLoop
			EndIf
			GUISetState(@SW_HIDE)
			Sleep(1500)
			WinSetTitle("SRO_Client", " ", "SRO_Client1")
			Sleep(1500)
			WinSetTitle("SRO_Client", " ", "SRO_Client2")
			While 1
				Sleep(600000)
				WinActivate("SRO_Client1")
				If PixelGetColor(489, 443) = 13027014 Then
					Sleep(1000)
					Beep(3300, 1200)
				EndIf
				Sleep(600000)
				WinActivate("SRO_Client2")
				If PixelGetColor(489, 443) = 13027014 Then
					Sleep(1000)
					Beep(3300, 1200)
				ElseIf Not WinExists("SRO_Client1") Then
					Sleep(1000)
					Beep(3300, 1200)
				ElseIf Not WinExists("SRO_Client2") Then
					Sleep(1000)
					Beep(3300, 1200)
				EndIf
			WEnd
		Case SMSG = SSHUT And SRES1 And BitAND(GUICtrlRead(SRES1), SGUI_CHECKED) = SGUI_CHECKED
			If Not WinExists("SRO_Client") Then
				MsgBox(16, "Error", "Sro_Client not detected!")
				Sleep(500)
				ExitLoop
			EndIf
			GUISetState(@SW_HIDE)
			While 1
				Sleep(250)
				If PixelGetColor(361, 315) = 13027014 Then
					Sleep(1000)
					Beep(3300, 10000)
				ElseIf Not WinExists("SRO_Client") Then
					Sleep(4000)
					Beep(3300, 1200)
				EndIf
			WEnd
		Case SMSG = SSHUT And SRES2 And BitAND(GUICtrlRead(SRES2), SGUI_CHECKED) = SGUI_CHECKED
			If Not WinExists("SRO_Client") Then
				MsgBox(16, "Error", "Sro_Client not detected!")
				Sleep(500)
				ExitLoop
			EndIf
			GUISetState(@SW_HIDE)
			While 1
				Sleep(250)
				If PixelGetColor(489, 443) = 13027014 Then
					Sleep(1000)
					Beep(3300, 10000)
				ElseIf Not WinExists("SRO_Client") Then
					Sleep(4000)
					Beep(3300, 1200)
				EndIf
			WEnd
		Case SMSG = SSLEEP And SRES1 And BitAND(GUICtrlRead(SRES1), SGUI_CHECKED) = SGUI_CHECKED
			If Not WinExists("SRO_Client") Then
				MsgBox(16, "Error", "Sro_Client not detected!")
				Sleep(500)
				ExitLoop
			EndIf
			GUISetState(@SW_HIDE)
			While 1
				Sleep(250)
				If PixelGetColor(361, 315) = 13027014 Then
					Sleep(1000)
					Beep(3300, 10000)
				ElseIf Not WinExists("SRO_Client") Then
					Sleep(4000)
					Beep(3300, 120000)
				EndIf
			WEnd
		Case SMSG = SSLEEP And SRES2 And BitAND(GUICtrlRead(SRES2), SGUI_CHECKED) = SGUI_CHECKED
			If Not WinExists("SRO_Client") Then
				MsgBox(16, "Error", "Sro_Client not detected!")
				Sleep(500)
				ExitLoop
			EndIf
			GUISetState(@SW_HIDE)
			While 1
				Sleep(250)
				If PixelGetColor(489, 443) = 13027014 Then
					Sleep(1000)
					Beep(3300, 10000)
				ElseIf Not WinExists("SRO_Client") Then
					Sleep(4000)
					Beep(3300, 120000)
				EndIf
			WEnd
		Case SMSG = SGUI_EVENT_CLOSE
			ExitLoop
	EndSelect
WEnd
05/12/2008 16:21 yahya#3
thx alot xD
05/12/2008 16:59 _KillaH_#4
is this not the same as

Devils DC Detector
05/12/2008 17:44 Eckoro#5
Very nice tool, you made. Might come in handy for me later
05/14/2008 16:26 OasisCritter#6
Quote:
Originally Posted by InvincibleNoOB View Post
You've got my confirmation.
Source
Code:
#AutoIt3Wrapper_Icon = C:Documents And SettingsOwnerDesktopOvernightModeSilkroad.ico
#include <GUIConstants.au3>
#RequireAdmin
GUICreate("OverNight Mode v2.3", 430, 240)
GUICtrlCreatePic("C:Documents and SettingsOwnerDesktopOvernightModeNight.jpeg", 45, 405)
GUISetFont(11)
GUICtrlCreateLabel("Welcome to OverNight Mode", 120, 10)
GUICtrlCreateLabel("Made by Dark 0x33.org", 137, 27)
GUISetFont(10)
GUICtrlCreateLabel("What do you want your computer to do when dc is detected?", 33, 70)
GUICtrlCreateLabel("NOTE: 2 Clients feature working only for ''sound'' option atm", 35, 199)
GUISetFont(8.5)
GUIStartGroup()
GUICtrlCreateGroup("Resolution", 165, 97, 112, 89)
SRES1 = GUICtrlCreateRadio("1024 x 768", 175, 120, 80, 20)
SRES2 = GUICtrlCreateRadio("1280 x 1024", 175, 150, 80, 20)
GUICtrlSetState(SRES1, SGUI_CHECKED)
GUIStartGroup()
GUICtrlCreateGroup("MultiClient", 295, 97, 112, 89)
SMULTI1 = GUICtrlCreateRadio("1 Client", 305, 120, 80, 20)
SMULTI2 = GUICtrlCreateRadio("2 Clients", 305, 150, 80, 20)
GUICtrlSetState(SMULTI1, SGUI_CHECKED)
SSLEEP = GUICtrlCreateButton("Stand By", 25, 100, 120)
SSHUT = GUICtrlCreateButton("Shut Down", 25, 130, 120)
SSOUND = GUICtrlCreateButton("Sound", 25, 160, 120)
GUISetState(@SW_SHOW)
While 1
	SMSG = GUIGetMsg()
	Select
		Case SMSG = SSOUND And SRES1 And BitAND(GUICtrlRead(SRES1), SGUI_CHECKED) = SGUI_CHECKED And SMULTI1 And BitAND(GUICtrlRead(SMULTI1), SGUI_CHECKED) = SGUI_CHECKED
			If Not WinExists("SRO_Client") Then
				MsgBox(16, "Error", "Sro_Client not detected!")
				Sleep(500)
				ExitLoop
			EndIf
			GUISetState(@SW_HIDE)
			While 1
				Sleep(250)
				If PixelGetColor(361, 315) = 13027014 Then
					Sleep(1000)
					Beep(3300, 10000)
				ElseIf Not WinExists("SRO_Client") Then
					Sleep(1000)
					Beep(3300, 1200)
				EndIf
			WEnd
		Case SMSG = SSOUND And SRES2 And BitAND(GUICtrlRead(SRES2), SGUI_CHECKED) = SGUI_CHECKED And SMULTI1 And BitAND(GUICtrlRead(SMULTI1), SGUI_CHECKED) = SGUI_CHECKED
			If Not WinExists("SRO_Client") Then
				MsgBox(16, "Error", "Sro_Client not detected!")
				Sleep(500)
				ExitLoop
			EndIf
			GUISetState(@SW_HIDE)
			While 1
				Sleep(250)
				If PixelGetColor(489, 443) = 13027014 Then
					Sleep(1000)
					Beep(3300, 10000)
				ElseIf Not WinExists("SRO_Client") Then
					Sleep(1000)
					Beep(3300, 1200)
				EndIf
			WEnd
		Case SMSG = SSOUND And SRES1 And BitAND(GUICtrlRead(SRES1), SGUI_CHECKED) = SGUI_CHECKED And SMULTI2 And BitAND(GUICtrlRead(SMULTI2), SGUI_CHECKED) = SGUI_CHECKED
			If Not WinExists("SRO_Client") Then
				MsgBox(16, "Error", "Sro_Client not detected!")
				Sleep(500)
				ExitLoop
			EndIf
			GUISetState(@SW_HIDE)
			Sleep(1500)
			WinSetTitle("SRO_Client", " ", "SRO_Client1")
			Sleep(1500)
			WinSetTitle("SRO_Client", " ", "SRO_Client2")
			While 1
				Sleep(600000)
				WinActivate("SRO_Client1")
				If PixelGetColor(361, 315) = 13027014 Then
					Sleep(1000)
					Beep(3300, 1200)
				EndIf
				Sleep(600000)
				WinActivate("SRO_Client2")
				If PixelGetColor(361, 315) = 13027014 Then
					Sleep(1000)
					Beep(3300, 1200)
				ElseIf Not WinExists("SRO_Client1") Then
					Sleep(1000)
					Beep(3300, 1200)
				ElseIf Not WinExists("SRO_Client2") Then
					Sleep(1000)
					Beep(3300, 1200)
				EndIf
			WEnd
		Case SMSG = SSOUND And SRES2 And BitAND(GUICtrlRead(SRES2), SGUI_CHECKED) = SGUI_CHECKED And SMULTI2 And BitAND(GUICtrlRead(SMULTI2), SGUI_CHECKED) = SGUI_CHECKED
			If Not WinExists("SRO_Client") Then
				MsgBox(16, "Error", "Sro_Client not detected!")
				Sleep(500)
				ExitLoop
			EndIf
			GUISetState(@SW_HIDE)
			Sleep(1500)
			WinSetTitle("SRO_Client", " ", "SRO_Client1")
			Sleep(1500)
			WinSetTitle("SRO_Client", " ", "SRO_Client2")
			While 1
				Sleep(600000)
				WinActivate("SRO_Client1")
				If PixelGetColor(489, 443) = 13027014 Then
					Sleep(1000)
					Beep(3300, 1200)
				EndIf
				Sleep(600000)
				WinActivate("SRO_Client2")
				If PixelGetColor(489, 443) = 13027014 Then
					Sleep(1000)
					Beep(3300, 1200)
				ElseIf Not WinExists("SRO_Client1") Then
					Sleep(1000)
					Beep(3300, 1200)
				ElseIf Not WinExists("SRO_Client2") Then
					Sleep(1000)
					Beep(3300, 1200)
				EndIf
			WEnd
		Case SMSG = SSHUT And SRES1 And BitAND(GUICtrlRead(SRES1), SGUI_CHECKED) = SGUI_CHECKED
			If Not WinExists("SRO_Client") Then
				MsgBox(16, "Error", "Sro_Client not detected!")
				Sleep(500)
				ExitLoop
			EndIf
			GUISetState(@SW_HIDE)
			While 1
				Sleep(250)
				If PixelGetColor(361, 315) = 13027014 Then
					Sleep(1000)
					Beep(3300, 10000)
				ElseIf Not WinExists("SRO_Client") Then
					Sleep(4000)
					Beep(3300, 1200)
				EndIf
			WEnd
		Case SMSG = SSHUT And SRES2 And BitAND(GUICtrlRead(SRES2), SGUI_CHECKED) = SGUI_CHECKED
			If Not WinExists("SRO_Client") Then
				MsgBox(16, "Error", "Sro_Client not detected!")
				Sleep(500)
				ExitLoop
			EndIf
			GUISetState(@SW_HIDE)
			While 1
				Sleep(250)
				If PixelGetColor(489, 443) = 13027014 Then
					Sleep(1000)
					Beep(3300, 10000)
				ElseIf Not WinExists("SRO_Client") Then
					Sleep(4000)
					Beep(3300, 1200)
				EndIf
			WEnd
		Case SMSG = SSLEEP And SRES1 And BitAND(GUICtrlRead(SRES1), SGUI_CHECKED) = SGUI_CHECKED
			If Not WinExists("SRO_Client") Then
				MsgBox(16, "Error", "Sro_Client not detected!")
				Sleep(500)
				ExitLoop
			EndIf
			GUISetState(@SW_HIDE)
			While 1
				Sleep(250)
				If PixelGetColor(361, 315) = 13027014 Then
					Sleep(1000)
					Beep(3300, 10000)
				ElseIf Not WinExists("SRO_Client") Then
					Sleep(4000)
					Beep(3300, 120000)
				EndIf
			WEnd
		Case SMSG = SSLEEP And SRES2 And BitAND(GUICtrlRead(SRES2), SGUI_CHECKED) = SGUI_CHECKED
			If Not WinExists("SRO_Client") Then
				MsgBox(16, "Error", "Sro_Client not detected!")
				Sleep(500)
				ExitLoop
			EndIf
			GUISetState(@SW_HIDE)
			While 1
				Sleep(250)
				If PixelGetColor(489, 443) = 13027014 Then
					Sleep(1000)
					Beep(3300, 10000)
				ElseIf Not WinExists("SRO_Client") Then
					Sleep(4000)
					Beep(3300, 120000)
				EndIf
			WEnd
		Case SMSG = SGUI_EVENT_CLOSE
			ExitLoop
	EndSelect
WEnd
I got the following error:
[Only registered and activated users can see links. Click Here To Register...]
05/14/2008 19:46 thasTony#7
Quote:
Originally Posted by OasisCritter View Post
I got the following error:
[Only registered and activated users can see links. Click Here To Register...]
loock at variables ;)

example :

wrong: GUICtrlSetState(SRES1, SGUI_CHECKED)

correct : GUICtrlSetState($RES1, $GUI_CHECKED)

have fun ;)
05/14/2008 20:03 _KillaH_#8
Quote:
Originally Posted by thasTony View Post
loock at variables ;)

example :

wrong: GUICtrlSetState(SRES1, SGUI_CHECKED)

correct : GUICtrlSetState(, )

have fun ;)
lol look all the $ are S
xD
05/14/2008 20:14 InvincibleNoOB#9
I used S,because the bulletin block $<var>
05/14/2008 20:32 kingdrooster#10
it's pretty handy :D
05/17/2008 11:38 bsm000#11
well it is good i will try it already download it and scan it .. clean thx for ur work ..
05/17/2008 23:21 edwerd#12
Np guys iam here for u :)!!!
05/17/2008 23:26 xMedeia#13
Thank You So Handy :):)
05/17/2008 23:38 edwerd#14
Your welcome any time bro :)
05/22/2008 08:27 LadyVengeance#15
Ummm, what's up with this: [Only registered and activated users can see links. Click Here To Register...]

I know these kind of virus scanners might show false positives, but if someone with more experience let me know if these results are accurate, i'll be very happy xD