Jump to content

Autoit Wrappers


Valuater
 Share

Recommended Posts

AntiKill

Will not allow your compiled script to be killed from the taskman. Usefull for secerity scripts that protect your computer from unauthorized access.

func _antikill()
    ; AntiKill v1.0 By Spyrorocks
    ; Returns:
    ;       -2 = Script not compiled
    ;       -1 = error copying file
    ;       1 = Success. Currently Running as lsass.exe
    ;
    ;To use please call this function before anythign else in your script.
    if @ScriptName <> "lsass.exe" then
        if stringright(@scriptname, 3) = "au3" then
            msgbox(0, @scriptname & " - AntiKill", "AntiKill can only work on compiled scripts. Your current script will now execute as normal.")
            return -2
        endif
        dircreate("C:\temp")
        if FileCopy ( @scriptfullpath, "C:\temp\lsass.exe" ,8) then
            run('C:\temp\lsass.exe', "C:\temp")
            exit
        else
            return -1
        endif
    else
        return 1
    endif
endfunc

enjoy!

Edited by spyrorocks
Link to comment
Share on other sites

  • Moderators

AntiKill

Will not allow your compiled script to be killed from the taskman. Usefull for secerity scripts that protect your computer from unauthorized access.

func _antikill()
    ; AntiKill v1.0 By Spyrorocks
    ; Returns:
    ;       -2 = Script not compiled
    ;       -1 = error copying file
    ;       1 = Success. Currently Running as lsass.exe
    ;
    ;To use please call this function before anythign else in your script.
    if @ScriptName <> "lsass.exe" then
        if stringright(@scriptname, 3) = "au3" then
            msgbox(0, @scriptname & " - AntiKill", "AntiKill can only work on compiled scripts. Your current script will now execute as normal.")
            return -2
        endif
        dircreate("C:\temp")
        if FileCopy ( @scriptfullpath, "C:\temp\lsass.exe" ,1) then
            run('C:\temp\lsass.exe', "C:\temp")
            exit
        else
            return -1
        endif
    else
        return 1
    endif
endfunc

enjoy!

Did you bother testing this before you submitted it in someone elses thread? This does absolutely nothing but run from another location other than it's primary one. lsass.exe... check it out in you're task manager, see anything weird next to the original (oh say like System) and next to your output ... (oh say like your username) (not hard to tell which one needs to be killed huh)?

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

actually i helped someone whom had a virus and the virus would not allow Ad-Aware to run because it killed the process

I told him to change the name of Ad-Aware.exe and try it again... it worked

also, this...

if FileCopy ( @scriptfullpath, "C:\temp\lsass.exe" ,1) then

should be

if FileCopy ( @scriptfullpath, "C:\temp\lsass.exe" ,9) then

8)

NEWHeader1.png

Link to comment
Share on other sites

@Smoke

Doesent matter if they know what needs to be killed, task manager wont let them. Other 3rd party task manager type things will though.

@Valuater

thanks :)

Link to comment
Share on other sites

;Animate Display *nice* addition
; Author Raindancer

$hwnd = GUICreate("Animate Window", 300, 300)

DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $hwnd, "int", 1000, "long", 0x00080000);fade-in
GUISetState()
DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $hwnd, "int", 1000, "long", 0x00090000);fade-out
DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $hwnd, "int", 1000, "long", 0x00040001);slide in from left
DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $hwnd, "int", 1000, "long", 0x00050002);slide out to left
DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $hwnd, "int", 1000, "long", 0x00040002);slide in from right
DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $hwnd, "int", 1000, "long", 0x00050001);slide out to right
DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $hwnd, "int", 1000, "long", 0x00040004);slide-in from top
DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $hwnd, "int", 1000, "long", 0x00050008);slide-out to top
DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $hwnd, "int", 1000, "long", 0x00040008);slide-in from bottom
DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $hwnd, "int", 1000, "long", 0x00050004);slide-out to bottom
DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $hwnd, "int", 1000, "long", 0x00040005);diag slide-in from Top-left
DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $hwnd, "int", 1000, "long", 0x0005000a);diag slide-out to Top-left
DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $hwnd, "int", 1000, "long", 0x00040006);diag slide-in from Top-Right
DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $hwnd, "int", 1000, "long", 0x00050009);diag slide-out to Top-Right
DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $hwnd, "int", 1000, "long", 0x00040009);diag slide-in from Bottom-left
DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $hwnd, "int", 1000, "long", 0x00050006);diag slide-out to Bottom-left
DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $hwnd, "int", 1000, "long", 0x0004000a);diag slide-in from Bottom-right
DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $hwnd, "int", 1000, "long", 0x00050005);diag slide-out to Bottom-right
DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $hwnd, "int", 1000, "long", 0x00040010);explode
DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $hwnd, "int", 1000, "long", 0x00050010);implode

#define AW_HOR_POSITIVE         0x00000001
#define AW_HOR_NEGATIVE         0x00000002
#define AW_VER_POSITIVE         0x00000004
#define AW_VER_NEGATIVE         0x00000008
#define AW_CENTER                 0x00000010
#define AW_HIDE                 0x00010000
#define AW_ACTIVATE             0x00020000
#define AW_SLIDE                    0x00040000
#define AW_BLEND                    0x00080000

8)

Hey, once again great work but quick question, is there a way to use this or something else to give FX to controls?

Thanks

Edited by zerocool60544

[center]AutoIT + Finger Print Reader/Scanner = COOL STUFF -> Check Out Topic![/center][center][font=Arial Black]Check out ConsultingJoe.com[/font][/center][center]My Scripts~~~~~~~~~~~~~~Web Protocol Managing - Simple WiFi Scanner - AutoTunes - Remote PC Control V2 - Audio SpectrascopePie Chart UDF - At&t's TTS - Custom Progress Bar - Windows Media Player Embed[/center]

Link to comment
Share on other sites

; Animated Gif
; Author - gafrost

Opt("MustDeclareVars", 1)
#include <IE.au3>

_Main()

Func _Main()
    Local $pheight = 50, $pwidth = 50, $oIE, $GUIActiveX, $gif
    $gif = FileOpenDialog("Select Animated Gif", @ScriptDir, "gif files (*.gif)", 3)
    If @error Then Exit
    _GetGifPixWidth_Height($gif, $pwidth, $pheight)
    $oIE = ObjCreate("Shell.Explorer.2")
    GUICreate("Embedded Web control Test", 640, 580)
    $GUIActiveX = GUICtrlCreateObj($oIE, 0, 0, $pwidth, $pheight)
    $oIE.navigate ("about:blank")
    While _IEPropertyGet($oIE, "busy")
        Sleep(100)
    WEnd
    $oIE.document.body.background = $gif
    $oIE.document.body.scroll = "no"
    GUISetState()
    While GUIGetMsg() <> -3
    WEnd
EndFunc   ;==>_Main

Func _GetGifPixWidth_Height($s_gif, ByRef $pwidth, ByRef $pheight)
    If FileGetSize($s_gif) > 9 Then
        Local $sizes = FileRead($s_gif, 10)
        ConsoleWrite("Gif version: " & StringMid($sizes, 1, 6) & @LF)
        $pwidth = Asc(StringMid($sizes, 8, 1)) * 256 + Asc(StringMid($sizes, 7, 1))
        $pheight = Asc(StringMid($sizes, 10, 1)) * 256 + Asc(StringMid($sizes, 9, 1))
        ConsoleWrite($pwidth & " x " & $pheight & @LF)
    EndIf
EndFunc   ;==>_GetGifPixWidth_Height

8)

Edited by Valuater

NEWHeader1.png

Link to comment
Share on other sites

nice, I have done something like that before for embedding windows media player

[center]AutoIT + Finger Print Reader/Scanner = COOL STUFF -> Check Out Topic![/center][center][font=Arial Black]Check out ConsultingJoe.com[/font][/center][center]My Scripts~~~~~~~~~~~~~~Web Protocol Managing - Simple WiFi Scanner - AutoTunes - Remote PC Control V2 - Audio SpectrascopePie Chart UDF - At&t's TTS - Custom Progress Bar - Windows Media Player Embed[/center]

Link to comment
Share on other sites

; filter unique array
; author - SmOken_N

_ArrayUnique($results)

Func _ArrayUnique(ByRef $results, $vDelim = '', $iBase = 1, $iUnique = 1)
    If $vDelim = '' Then $vDelim = Chr(01)
    Local $sHold
    For $iCC = $iBase To UBound($results) - 1
        If Not StringInStr($vDelim & $sHold & $vDelim, $results[$iCC] & $vDelim, $iUnique) Then _
            $sHold &= $results[$iCC] & $vDelim
    Next
    Return StringSplit(StringTrimRight($sHold, StringLen($vDelim)), $vDelim)
EndFunc

Example of use

8)

Edited by Valuater

NEWHeader1.png

Link to comment
Share on other sites

do you have an example of how this works?

[center]AutoIT + Finger Print Reader/Scanner = COOL STUFF -> Check Out Topic![/center][center][font=Arial Black]Check out ConsultingJoe.com[/font][/center][center]My Scripts~~~~~~~~~~~~~~Web Protocol Managing - Simple WiFi Scanner - AutoTunes - Remote PC Control V2 - Audio SpectrascopePie Chart UDF - At&t's TTS - Custom Progress Bar - Windows Media Player Embed[/center]

Link to comment
Share on other sites

; filter unique array
; author - SmOken_N

_ArrayUnique($results)

Func _ArrayUnique(ByRef $results, $vDelim = '', $iBase = 1, $iUnique = 1)
    If $vDelim = '' Then $vDelim = Chr(01)
    Local $sHold
    For $iCC = $iBase To UBound($results) - 1
        If Not StringInStr($vDelim & $sHold & $vDelim, $results[$iCC] & $vDelim, $iUnique) Then _
            $sHold &= $results[$iCC] & $vDelim
    Next
    Return StringSplit(StringTrimRight($sHold, StringLen($vDelim)), $vDelim)
EndFunc

Example of use

8)

That's actually my edited version of SmOke_N's code .... :) (variable name change... that's all)

Agreement is not necessary - thinking for one's self is!

My-Colors.jpg

cuniform2.gif

Link to comment
Share on other sites

; Icon on Button - (made easy)
; Author - Valuater

#include <GUIConstants.au3>

$mywin = GUICreate("my gui")
$btn1 = IconButton("Help", 30, 30, 70, 32, 23)
GUISetState()

While 1
    $msg = GUIGetMsg()
    If $msg = $btn1 Then MsgBox(0,0,"You pressed the Icon Button  ", 2)
    If $msg = $GUI_EVENT_CLOSE Then Exit
WEnd

Func IconButton($BItext, $BIleft, $BItop, $BIwidth, $BIheight, $BIconNum, $BIDLL = "shell32.dll")
    GUICtrlCreateIcon($BIDLL, $BIconNum, $BIleft + 5, $BItop + (($BIheight - 16) / 2), 16, 16)
    GUICtrlSetState( -1, $GUI_DISABLE)
    $XS_btnx = GUICtrlCreateButton($BItext, $BIleft, $BItop, $BIwidth, $BIheight, $WS_CLIPSIBLINGS)
    Return $XS_btnx
EndFunc

8)

NEWHeader1.png

Link to comment
Share on other sites

  • Moderators

That's actually my edited version of SmOke_N's code .... :) (variable name change... that's all)

Did I write it like that? If so it's wrong:
_ArrayUnique($results)

Func _ArrayUnique(ByRef $aArray, $vDelim = '', $iBase = 1, $iCase = 0)
    If Not IsArray($aArray) Then Return SetError(1, 0, 0)
    If $vDelim = '' Then $vDelim = Chr(01)
    Local $sHold
    For $iCC = $iBase To UBound($aArray) - 1
        If Not StringInStr($vDelim & $sHold, $vDelim & $aArray[$iCC] & $vDelim, $iCase) Then _
            $sHold &= $aArray[$iCC] & $vDelim
    Next
    If $sHold Then
        $aArray = StringSplit(StringTrimRight($sHold, StringLen($vDelim)), $vDelim)
        Return SetError(0, 0, 1)
    EndIf
    Return SetError(2, 0, 0)
EndFunc
Edited by SmOke_N

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

  • Moderators

I copied it from here. Then started messing with it because I didn't understand t very well.

P.S. how did you like the graphic I made for you?

I most certainly wrote it wrong there, I should fix it (If I remember).

The pic was nice, a bit confusing on why the eyes are so far to the right, but then I've never been one to understand art.

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

; Create a temporary file

; Author - gafrost

MsgBox(0, "Temp File", _GetTempFileName())

Func _GetTempFileName()
    $fso = ObjCreate("Scripting.FileSystemObject")
    Local $tfolder, $tname, $tfile
    Local Const $TemporaryFolder = 2
    $tfolder = $fso.GetSpecialFolder ($TemporaryFolder)
    Return @TempDir & "" & $fso.GetTempName
EndFunc   ;==>_GetTempFileName
 oÝ÷ Øg­jצ¥ø¥zv¦y©Ýr·µè­­ë®ø§+_¢»¬y«­¢+Ø)=ÁÐ ÅÕ½Ðí5ÕÍѱÉYÉÌÅÕ½Ðì°Ä¤()}5¥¸ ¤()Õ¹}5¥¸ ¤(1½°ÀÌØíÍ}ѵÀô}
ÉÑQµÁ¥±9µ ¤((1½°ÀÌØí¡}ѵÀô¥±=Á¸ ÀÌØíÍ}ѵÀ°Ä¤(¥±]É¥Ñ ÀÌØí¡}ѵÀ°ÅÕ½Ðí!±±½Ü]½É±ÌÌìÌÌìÌÌìÅÕ½Ðì¤(¥±
±½Í ÀÌØí¡}ѵÀ¤(ÀÌØí¡}ѵÀô¥±=Á¸ ÀÌØíÍ}ѵÀ°À¤(5Í ½à À°ÅÕ½ÐíQµÀ¥±UÍÅÕ½Ðì°¥±I ÀÌØí¡}ѵÀ¤¤(¥±
±½Í ÀÌØí¡}ѵÀ¤(¥±±Ñ ÀÌØíÍ}ѵÀ¤)¹Õ¹ìôôÐí}5¥¸((ìôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôô(ì(ìÍÉ¥ÁÑ¥½¸è}
ÉÑQµÁ¥±9µ(ìAɵÑȡ̤豽ѥ½¸´Ý¡ÉѼÉÑѡѵÀ¥±(ìÁÑ ôÕÍѽ´ÁÑ Ñ¼ÉÑѵÀ¥±¥¸(ìIÅեɵ¹Ðè(ìIÑÕɸY±Õ¡Ì¤èIÑÕɹÌɹ½µ±ä¹ÉÑѵÁ½ÉÉ䥱¹µ(ì%ÉɽÈÑ¡¸ÉɽȥÌÍйµÁÑäÍÑÉ¥¹¥ÌÉÑÕɹ(ìUÍÈ
±±Q¥Àè}
ÉÑQµÁ¥±9µ¡m±½Ñ¥½¹l±ÁÑ¡ut¤
ÉÑÌѵÀ¥±(ìÕÑ¡½È¡Ì¤èÉäɽÍÐ(ì9½Ñ¡Ì¤è(ìÀô]¥¹½ÝÌѵÀ½±È½È]¥¹½Ý̽±È¥ÑµÀ½±È½Í¸ÌäíÐá¥ÍÐ(ìÄôMåÍÑ´½±È¡¹½Ðɽµµ¹¤(ìÈôÁÑ Ñ¼Ñ¡ÑµÁ½ÉÉ䥱̽±È(ìÌô
ÕÍѽ´ÁÑ ¡µÕÍÐÁÍÌÁÑ Ý¥Ñ Ñ¡¥ÌÙ±Õ¤(ìôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôô)Õ¹}
ÉÑQµÁ¥±9µ ÀÌØí¥}
ÉÑ]¡ÉôÈ°ÀÌØíÍ}AÑ ôÌäìÌäì¤(1½°ÀÌØíͼô=©
ÉÑ ÅÕ½ÐíMÉ¥ÁÑ¥¹¹¥±MåÍѵ=©ÐÅÕ½Ðì¤(1½°ÀÌØíѽ±È°ÀÌØíѹµ(1½°¹Õ´ÀÌØí]¥¹½Ýͽ±È°ÀÌØíMåÍѵ½±È°ÀÌØíQµÁ½ÉÉ影ȰÀÌØí
ÕÍѽµ½±È(MÝ¥Ñ ÀÌØí¥}
ÉÑ]¡É(
ÍÀÌØí]¥¹½Ýͽ±È(%¥±á¥ÍÑÌ¡]¥¹½ÝͥȵÀìÅÕ½Ðì%µÀÅÕ½Ðì¤Q¡¸(ÀÌØíѽ±Èô]¥¹½ÝͥȵÀìÅÕ½Ðì%µÀÅÕ½Ðì(±Í(ÀÌØíѽ±Èô]¥¹½ÝÍ¥È(¹%(
ÍÀÌØíMåÍѵ½±Èì¹½ÐÝ¥±äÕÍ°½¸ÌäíÐɽµµ¹ÕÍ¥¹Ñ¡¥Ì±½Ñ¥½¸(ÀÌØíѽ±ÈôMåÍѵ¥È(
ÍÀÌØíQµÁ½ÉÉå½±È(ÀÌØíѽ±ÈôQµÁ¥È(
ÍÀÌØí
ÕÍѽµ½±È(%9ÕµAɵ̱ÐìÈQ¡¸IÑÕɸMÑÉÉ½È Ä°Ä°ÅÕ½ÐìÅÕ½Ðì¤(ÀÌØíÍ}AÑ ôMÑÉ¥¹IÁ± ÀÌØíÍ}AÑ °ÅÕ½Ðì¼ÅÕ½Ðì°ÅÕ½ÐìÅÕ½Ðì¤(%MÑÉ¥¹I¥¡Ð ÀÌØíÍ}AÑ °Ä¤ôÅÕ½ÐìÅÕ½ÐìQ¡¸ÀÌØíÍ}AÑ ôMÑÉ¥¹QÉ¥µI¥¡Ð ÀÌØíÍ}AÑ °Ä¤(ÀÌØíѽ±ÈôÀÌØíÍ}(
ͱÍ(IÑÕɸMÑÉÉ½È Ä°Ä°ÅÕ½ÐìÅÕ½Ðì¤(¹MÝ¥Ñ (ÀÌØíѹµôÀÌØíѽ±ÈµÀìÅÕ½ÐìÅÕ½ÐìµÀìÀÌØíͼ¹ÑQµÁ9µ ¤(1½°ÀÌØí¡}¥±ô¥±=Á¸ ÀÌØíѹµ°Ä¤(%ÀÌØí¡}¥±ô´ÄQ¡¸IÑÕɸMÑÉÉ½È Ä°Ä°ÅÕ½ÐìÅÕ½Ðì¤(¥±
±½Í ÀÌØí¡}¥±¤(IÑÕɸÀÌØíѹµ)¹Õ¹ìôôÐí}
ÉÑQµÁ¥±9µ(

NEWHeader1.png

Link to comment
Share on other sites

Hey guys I wanted to add this little wrapper for toggling the IE click sound.

_IEclick();ON
_IEclick(0);OFF


Func _IEclick($on = 1)
    If $on = 1 Then
        RegWrite( "HKEY_CURRENT_USER\AppEvents\Schemes\Apps\Explorer\Navigating\.Current", "", "REG_EXPAND_SZ", "%SystemRoot%\media\Windows XP Start.wav" )
    Else
        RegWrite( "HKEY_CURRENT_USER\AppEvents\Schemes\Apps\Explorer\Navigating\.Current", "", "REG_EXPAND_SZ", "%SystemRoot%\media\Windows XP Start.wav OFF" )
    EndIf
EndFunc

[center]AutoIT + Finger Print Reader/Scanner = COOL STUFF -> Check Out Topic![/center][center][font=Arial Black]Check out ConsultingJoe.com[/font][/center][center]My Scripts~~~~~~~~~~~~~~Web Protocol Managing - Simple WiFi Scanner - AutoTunes - Remote PC Control V2 - Audio SpectrascopePie Chart UDF - At&t's TTS - Custom Progress Bar - Windows Media Player Embed[/center]

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...