Skip to content

Commit dcc84bd

Browse files
committed
misc autoit scripts
needs reviewing.
1 parent fa41e49 commit dcc84bd

File tree

6 files changed

+205
-0
lines changed

6 files changed

+205
-0
lines changed

RSI_Key_Map.au3

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
;RSI Saver
2+
3+
HotKeySet("{F1}", "Copy")
4+
HotKeySet("{F2}", "Cut")
5+
HotKeySet("{F3}", "Paste")
6+
HotKeySet("{F4}", "Undo")
7+
8+
While 1
9+
sleep(1)
10+
WEnd
11+
12+
Func Copy()
13+
send("^c")
14+
EndFunc
15+
16+
Func Cut()
17+
send("^x")
18+
EndFunc
19+
20+
Func Paste()
21+
send("^v")
22+
EndFunc
23+
24+
Func Undo()
25+
send("^z")
26+
EndFunc

anti.screensaver.au3

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
While 1
2+
;RunWait("start /min cmd /c dir c:\")
3+
send("{PRINTSCREEN}")
4+
;{NUMLOCK}
5+
;{BREAK}
6+
sleep(9*60*1000)
7+
WEnd

auto killer/auto_killer.au3

+64
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
#include <GUIConstantsEx.au3>
2+
#Include <GuiEdit.au3>
3+
#include <file.au3>
4+
5+
#RequireAdmin
6+
7+
Opt('MustDeclareVars', 1)
8+
9+
Global $version = "1.1"
10+
Global $file = "c:\tmp\auto_kill.txt"
11+
Global $Form1 = GUICreate("Auto Killer v" & $version, 250, 400, 200, 150)
12+
Global $editctrl = GUICtrlCreateEdit("", 10, 10, 230, 360)
13+
Global $filemenu = GUICtrlCreateMenu("File")
14+
Global $fileitem = GUICtrlCreateMenuItem("Settings", $filemenu)
15+
Global $helpitem = GUICtrlCreateMenuItem("Help", $filemenu)
16+
Global $exititem = GUICtrlCreateMenuItem("Exit", $filemenu)
17+
Global $count = 0;
18+
19+
local $Form1, $filemenu, $fileitem, $msg, $exititem, $line, $helpitem;
20+
21+
_GUICtrlEdit_AppendText($editctrl, @HOUR & ":" & @MIN & ":" & @SEC & " - Started Auto Killer" & @CRLF & @CRLF)
22+
GUISetState(@SW_SHOW)
23+
24+
while 1
25+
$count = $count + 1;
26+
gui_check()
27+
if($count > 60) Then
28+
kill()
29+
EndIf
30+
WEnd
31+
32+
Exit
33+
34+
func gui_check()
35+
$msg = GUIGetMsg()
36+
Select
37+
Case $msg = $GUI_EVENT_CLOSE
38+
Exit
39+
Case $msg = $fileitem
40+
run("notepad.exe " & $file);
41+
42+
Case $msg = $helpitem
43+
MsgBox(-1, "Help", "Add the full name of any process you want auto killed to the settings file.")
44+
45+
Case $msg = $exititem
46+
Exit
47+
EndSelect
48+
EndFunc
49+
50+
func kill()
51+
$count = 0;
52+
local $i, $line, $variable, $fh
53+
54+
$fh = FileOpen($file, 0)
55+
For $i = 1 to _FileCountLines($file)
56+
$line = FileReadLine($file, $i)
57+
If ProcessExists($line) Then
58+
ProcessClose($line)
59+
$variable = @HOUR & ":" & @MIN & ":" & @SEC & " - killed: " & $line & @CRLF
60+
_GUICtrlEdit_AppendText($editctrl,$variable)
61+
EndIf
62+
Next
63+
FileClose($fh)
64+
EndFunc

bandwidth_monitor.au3

+66
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
#include <GUIConstants.au3>
2+
3+
GUICreate("Lod3n's Bandwidth Monitor",220,100,0,0,-1,$WS_EX_TOOLWINDOW)
4+
5+
$label1 = GUICtrlCreateLabel ( "Waiting for data...", 10, 5,200,20)
6+
$progressbar1 = GUICtrlCreateProgress (10,20,200,20,$PBS_SMOOTH)
7+
8+
$label2 = GUICtrlCreateLabel ( "Waiting for data...", 10, 50,200,20)
9+
$progressbar2 = GUICtrlCreateProgress (10,65,200,20,$PBS_SMOOTH)
10+
11+
GUISetState ()
12+
13+
$wbemFlagReturnImmediately = 0x10
14+
$wbemFlagForwardOnly = 0x20
15+
$colItems = ""
16+
$strComputer = "localhost"
17+
$objWMIService = ObjGet("winmgmts:\\" & $strComputer & "\root\CIMV2")
18+
19+
$inmax = 0
20+
$outmax = 0
21+
22+
$lastin = 0
23+
$lastout = 0
24+
25+
while 1
26+
;$colItems = $objWMIService.ExecQuery("SELECT BytesReceivedPersec,BytesSentPersec FROM Win32_PerfFormattedData_Tcpip_NetworkInterface", "WQL", $wbemFlagReturnImmediately + $wbemFlagForwardOnly)
27+
$colItems = $objWMIService.ExecQuery("SELECT BytesReceivedPersec,BytesSentPersec FROM Win32_PerfRawData_Tcpip_NetworkInterface", "WQL", $wbemFlagReturnImmediately + $wbemFlagForwardOnly)
28+
29+
If IsObj($colItems) then
30+
For $objItem In $colItems
31+
$newin = $objItem.BytesReceivedPersec
32+
$newout = $objItem.BytesSentPersec
33+
34+
;new realtime counter code...
35+
if $lastin = 0 and $lastout = 0 Then
36+
$lastin = $newin
37+
$lastout = $newout
38+
endif
39+
$in = $newin - $lastin
40+
$out = $newout - $lastout
41+
$lastin = $newin
42+
$lastout = $newout
43+
44+
if $in <> 0 and $out <> 0 Then
45+
if $in > $inmax then $inmax = $in
46+
if $out > $outmax then $outmax = $out
47+
48+
$inP = int(($in / $inmax) * 100)
49+
$outP = int(($out / $outmax) * 100)
50+
;$in = $in/1024
51+
;$out = $out/1024
52+
$intext = "Bytes In/Sec: " & int($in) & " [" &$inP & "% of record]" & @CRLF
53+
$outtext = "Bytes Out/Sec: " & int($out) & " [" &$outP & "% of record]" &@CRLF
54+
55+
GUICtrlSetData ($progressbar1,$inP)
56+
GUICtrlSetData ($label1,$intext)
57+
GUICtrlSetData ($progressbar2,$outP)
58+
GUICtrlSetData ($label2,$outtext)
59+
60+
EndIf
61+
ExitLoop ; I only care about the first network adapter, yo
62+
Next
63+
EndIf
64+
sleep(1000) ; bytes PER SECOND
65+
If GUIGetMsg() = $GUI_EVENT_CLOSE Then ExitLoop
66+
WEnd

ie_get/ie_get.au3

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
2+
#AutoIt3Wrapper_UseUpx=y
3+
#AutoIt3Wrapper_Change2CUI=y
4+
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
5+
; ie_get.au3 by jacob jarick - used for getting webpage data when wget / curl will not work.
6+
#include <IE.au3>
7+
8+
Local $oErrorHandler = ObjEvent("AutoIt.Error", "_ErrFunc")
9+
10+
Local $oIE = _IECreate($CmdLine[1], 0, 0, 1, -1)
11+
12+
ObjEvent("AutoIt.Error","MyErrFunc")
13+
_IELoadWait($oIE)
14+
Local $sHTML = _IEDocReadHTML($oIE)
15+
_IEQuit($oIE)
16+
ConsoleWrite ( $sHTML);
17+
18+
19+
exit
20+
21+
22+
Func _ErrFunc($oError)
23+
; Do anything here.
24+
ConsoleWrite(@ScriptName & " (" & $oError.scriptline & ") : ==> COM Error intercepted !" & @CRLF & _
25+
@TAB & "err.number is: " & @TAB & @TAB & "0x" & Hex($oError.number) & @CRLF & _
26+
@TAB & "err.windescription:" & @TAB & $oError.windescription & @CRLF & _
27+
@TAB & "err.description is: " & @TAB & $oError.description & @CRLF & _
28+
@TAB & "err.source is: " & @TAB & @TAB & $oError.source & @CRLF & _
29+
@TAB & "err.helpfile is: " & @TAB & $oError.helpfile & @CRLF & _
30+
@TAB & "err.helpcontext is: " & @TAB & $oError.helpcontext & @CRLF & _
31+
@TAB & "err.lastdllerror is: " & @TAB & $oError.lastdllerror & @CRLF & _
32+
@TAB & "err.scriptline is: " & @TAB & $oError.scriptline & @CRLF & _
33+
@TAB & "err.retcode is: " & @TAB & "0x" & Hex($oError.retcode) & @CRLF & @CRLF)
34+
EndFunc ;==>_ErrFunc

vmware_citrix_hack.au3

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
$sleep_time = 10 * 60;
2+
While 1
3+
sleep($sleep_time * 1000)
4+
$click = MsgBox(1, "Jacobs VMware Hack", "CTRL+ALT will be sent to the active window in 10 seconds\nClick Cancel to stop", 10)
5+
if($click <> 2) Then send("{CTRLDOWN}{LALT}{CTRLUP}")
6+
WEnd
7+
8+

0 commit comments

Comments
 (0)