Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 10/24/2016 in all areas

  1. Function Reference _AdlibEnhance.au3 Adlib function with support for parameters, pause and resume using Call Back! Sintax: _Adlib_Register( "Function" [, "Params" [, Time [, RepeatCount ]]] ) _Adlib_Pause( "Function" ) _Adlib_Resume( "Function" ) _Adlib_SetTimer( "Function" [, Time ] ) _Adlib_UnRegister( "Function" ) Supports: ; You can call functions with parameters and native functions also! Downloads: Version: 0.10 _AdlibEnhance_(RedirectLink).html Note: Usage example is included! Sample: Fixes: Regards, João Carlos.
    1 point
  2. willichan

    Inline binary files

    This is a script I banged out for a project where, for some reason, my client's anti-virus program detected any compiled script that used FileInstall() as infected. (They were using some program from China I was not familiar with, nor could I read the messages.) It creates an include file patterned somewhat after the SQLite.dll.au3 that is included with AutoIt. This makes the resulting EXE file a little larger than FileInstall() does (even after /striponly), but it solved my particular problem. It is intended to be compiled, and then drag/drop the binary file onto it to do the conversion. If the dropped file is a DLL file, it will add the DllOpen() and DllClose() commands to the startup and shutdown functions. InlineMe.au3 Const $blocksize = 512 Dim $fromfile, $fromname, $curpos, $tag, $tofile, $toname, $ext, $name If $CmdLine[0] = 0 Then Exit Else $fromname = $CmdLine[1] EndIf If Not FileExists($fromname) Then Exit $toname = $fromname & ".au3" $fromfile = StringToBinary(BinaryToString(FileRead($fromname))) $curpos = 0 $tofile = FileOpen($toname, 2) If $tofile = -1 Then Exit If StringInStr($fromname, ".") Then $ext = StringUpper(StringRight($fromname, StringLen($fromname) - StringInStr($fromname, ".", 0, -1))) Else $ext = "" EndIf $name = StringRight($fromname, StringLen($fromname) - StringInStr($fromname, "\", 0, -1)) FileWriteLine($tofile, '#include-once') FileWriteLine($tofile, '#include <file.au3>') FileWriteLine($tofile, '') FileWriteLine($tofile, 'Func _' & CleanName($name) & '_Startup()') FileWriteLine($tofile, ' Local $Inline_Filename = _TempFile(@TempDir, "~", ".' & $ext & '")') FileWriteLine($tofile, ' Local $InlineOutFile = FileOpen($Inline_Filename, 2)') FileWriteLine($tofile, ' If $InlineOutFile = -1 Then Return SetError(1, 0, "")') FileWriteLine($tofile, '') FileWriteLine($tofile, ' FileWrite($InlineOutFile, _' & CleanName($name) & '_Inline())') FileWriteLine($tofile, ' FileClose($InlineOutFile)') If $ext = "DLL" Then FileWriteLine($tofile, ' If DllOpen($Inline_Filename) = -1 Then') FileWriteLine($tofile, ' Return SetError(1, 0, "")') FileWriteLine($tofile, ' Else') FileWriteLine($tofile, ' Return $Inline_Filename') FileWriteLine($tofile, ' EndIf') Else FileWriteLine($tofile, ' Return $Inline_Filename') EndIf FileWriteLine($tofile, 'EndFunc ;==>_' & CleanName($name) & '_Startup') FileWriteLine($tofile, '') FileWriteLine($tofile, 'Func _' & CleanName($name) & '_Shutdown($Inline_Filename)') If $ext = "DLL" Then FileWriteLine($tofile, ' DllClose($Inline_Filename)') EndIf FileWriteLine($tofile, ' FileDelete($Inline_Filename)') FileWriteLine($tofile, 'EndFunc ;==>_' & CleanName($name) & '_Shutdown') FileWriteLine($tofile, '') FileWriteLine($tofile, 'Func _' & CleanName($name) & '_Inline()') FileWriteLine($tofile, ' Local $sData') FileWriteLine($tofile, " #region ;" & $name) While $curpos < StringLen($fromfile) If $curpos = 0 Then $curpos = 1 $tag = ' $sData = "' Else $tag = ' $sData &= "' EndIf FileWriteLine($tofile, $tag & StringMid($fromfile, $curpos, $blocksize) & '"') $curpos += $blocksize WEnd FileWriteLine($tofile, " #endregion ;" & StringRight($fromname, StringLen($fromname) - StringInStr($fromname, "\", 0, -1))) FileWriteLine($tofile, ' Return Binary($sData)') FileWriteLine($tofile, 'EndFunc ;==>_' & CleanName($name) & '_Inline') FileClose($tofile) Func CleanName($name) $name = StringReplace($name, ".", "") $name = StringReplace($name, " ", "") $name = StringReplace($name, "[", "") $name = StringReplace($name, "]", "") $name = StringReplace($name, "(", "") $name = StringReplace($name, ")", "") $name = StringReplace($name, "{", "") $name = StringReplace($name, "}", "") Return $name EndFunc ;==>CleanName
    1 point
  3. I am not sure who to ask this. I am going through a book on the basic programming language, though instead of using that language I am porting the code sample programs to AutoIT. There is one project I am adapting and working to expand just for learning purposes of the AutoIT language but also programming in general. I wanted to better acquaint myself with creating GUI's and using controls which this is perfect for that. I am not sure though if it is ok for me to share this project here. The original code from the book is not included, I will be creating my own versions of the images used instead of the samples available with the book and there is quite a bit of difference between the code in the book and the AutoIT code of the same project which I am writing from scratch using the book as a guide. Comparing the two you can see it is the same project but the code is quite a bit different between the two languages. Though I am trying to keep as close to the book as possible, even though I would not personally code the same way as the original author. It is a Slot Machine Game written entirely in AutoIT ported from this book I am using. After going through some of the samples and looking at the language itself I decided to forget about the basic language itself but I wondered if I couldn't use AutoIT instead.. So, that's what I am doing. When I complete the port and get it working I would like to share it here and get help with improvements, specifically with the animation of the images in the game. Though before I finish I was curious if it would be ok to share this when I get it done. If it isn't that is fine, just a neat project for learning. Also where should I share this if it is ok? This forum or the GUI forum? It uses quite a bit of everything but is heavy in GUI Design. Thanks.
    1 point
  4. mLipok

    Scite Console Color

    In new version others.properties was changed to : # diff changed ! style.errorlist.10=fore:#007F00 # diff addition + style.errorlist.11=fore:#00007F # diff deletion - style.errorlist.12=fore:#007F7F Formerly it was: # diff changed ! style.errorlist.10=fore:#F70000,bold # diff addition + style.errorlist.11=fore:#007F00,bold # diff deletion - style.errorlist.12=fore:#FF8800,bold
    1 point
  5. jguinch

    Printers Management UDF

    @joboy2k : Thanks for your feedback. You are right. It was an error that I did not take the time to correct. It's done now.
    1 point
  6. Melba23

    _FileListToArrayRec

    232showtime, The only limit is the max size of an AutoIt array (16,777,216 elements), so if you have fewer files/folders than that the function should run. But as I explained above, it will be very slow if you try and parse a whole drive. if you are looking to examine a folder tree to pick out specific files, might I suggest looking at my ChooseFileFolder UDF (link in my sig below) as that only reads the tree contents when you expand the individual branches and so is very much faster. M23
    1 point
  7. meoit, You need to have the GUIGetMsg line inside the loop - having outside explains why you cannot close the GUI as the $GUI_EVENT_CLOSE event is never detected. And I would not check the network status on every pass - try once a second like this: Global $nMsg ; Global $MAIN_FORM = GUICreate('Have Network and Start an URL', 305, 60, -1, -1) Global $BT_START = GUICtrlCreateButton('Start AutoIT', 5, 10, 105, 25) Global $BT_ABOUT = GUICtrlCreateButton('Start Google', 195, 10, 105, 25) Global $LB_STATUS = GUICtrlCreateLabel('Network Status', 5, 40, 300, -1) ; GUISetState(@SW_SHOW) ; Global $nBegin = TimerInit() ; Set a timestamp ; While 1 $nMsg = GUIGetMsg() ; Inside the loop Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $BT_START F_BT_START_AUTOIT() Case $BT_ABOUT F_BT_START_GOOGLE() EndSwitch If TimerDiff($nBegin) > 1000 Then ; If a second since the time stamp... F_NETWORK_CONNECTED() ; ...test the network connection... $nBegin = TimerInit() ; ...and reset the timestamp EndIf WEnd M23
    1 point
  8. Melba23

    _FileListToArrayRec

    232showtime, With a tree as large as any C: drive is likely to be, it is hardly surprising that the function takes a long time both to parse it and then to display the result given the number of files it through which it must sift. What exactly are you trying to do? If you can be specific then we might be able to offer some pointers as to the most efficient manner to achieve it. M23
    1 point
  9. Terenz

    Obfuscation Methods

    The legend tells about a girl, a girl with a enchanted compiler that won't be detected by AV-s as false positive and an obfuscator made by herself. But the Dark Lord, jealous of the magical power, shut her in the highest tower of the castle, condemning us all in darkness... Something like this can be deobfuscated by automating tools rights? Execute(BinaryToString("0x5F" & StringLen("EGIE") & "C" & StringLen("IKT") & "0" & StringLen("CGAIVWU") & "8" & Execute("_L0x49BC1F2FFF7F67EA4ED529224AE5653D(1*9)-5") & StringLen("e") & Execute("_L0x49BC1F2FFF7F67EA4ED529224AE5653D(1*9)-5") & StringLen("IKT") & "4" & StringLen("IKT") & "4541344" & StringLen("qD") & "3630353938313544464334314" & StringLen("qD") & "434" & StringLen("qD") & "464630464534334433454C" & StringLen("qD") & "829")) Execute(BinaryToString("0x5F" & StringLen("TQIC") & "C" & StringLen("TQIC") & "C" & StringLen("SLB") & "0" & StringLen("IRQXQGN") & "8" & StringLen("TQIC") & "4" & StringLen("SLB") & "84" & StringLen("SLB") & "3" & StringLen("gD") & "3944344" & StringLen("gD") & "363030433435353" & StringLen("t") & "4" & StringLen("t") & "433843373" & StringLen("t") & "453642424536344236372829")) Global Const $_L0x0FEE588EED7D9F95815388C8D4AD16D0 = -3 Global Const $_L0x3F88BD354EFF231C06FC11430C17047C = 0x00020000 Global Const $_L0xF00FC9BCB110A7DCBDA5A57D85D11876 = 0x00080000 Global Const $_L0x8079E7527BA1F4F4EFD5A53453337009 = 0x00C00000 Global Const $_L0x21039B523C18684398B38F5643401B0D = 0x80000000 Global Const $_L0x1DEF558C46E120C632612D27F4DFE56F = BitOR($_L0x3F88BD354EFF231C06FC11430C17047C, $_L0x8079E7527BA1F4F4EFD5A53453337009, $_L0x21039B523C18684398B38F5643401B0D, $_L0xF00FC9BCB110A7DCBDA5A57D85D11876) $_L0x122506BFD02937035E895EB15AC9A82A = Execute(BinaryToString("0x" & StringLen("dY") & "0" & StringLen("EJSJ") & StringLen("PQOVUUI") & "55" & StringLen("EJSJ") & "9" & StringLen("EJSJ") & StringLen("IPU") & StringLen("PQOVUUI") & StringLen("dY") & "656" & StringLen("t") & StringLen("PQOVUUI") & "465" & StringLen("dY") & "820244C5F4C" & StringLen("IPU") & "0" & StringLen("PQOVUUI") & "83437333931424634383430314138463731313745433444433045303845363934202C203330302C203330302C202D312C202D3129")) Execute(BinaryToString("0x" & StringLen("JOLN") & StringLen("ETOWAVV") & "55" & StringLen("JOLN") & "95" & StringLen("NZI") & "65" & StringLen("ETOWAVV") & Execute("_L0x49BC1F2FFF7F67EA4ED529224AE5653D(7*9)-5") & "5" & StringLen("NZI") & "746" & StringLen("q") & "7465" & StringLen("dT") & "8405" & StringLen("NZI") & "575F53484F57" & StringLen("dT") & "9")) While 1 $_L0x7C495B03B3AD6D149BF530999C7E063D = Execute(BinaryToString("0x" & StringLen("kI") & "0" & StringLen("RYCW") & StringLen("MLEVCMZ") & "55" & StringLen("RYCW") & "94" & StringLen("MLEVCMZ") & "65" & StringLen("MLEVCMZ") & "44D" & StringLen("MLEVCMZ") & StringLen("SKT") & "6" & StringLen("MLEVCMZ") & StringLen("kI") & (5 + 9) ^ 2 - 188 & "29")) Switch $_L0x7C495B03B3AD6D149BF530999C7E063D Case $_L0x0FEE588EED7D9F95815388C8D4AD16D0 Exit EndSwitch WEnd Func _L0x49BC1F2FFF7F67EA4ED529224AE5653D($_L0x7AD28395A3BCAB9E982F0E258AAEBA48) Local $_L0x6E5383D9D6EDCFB6693BCC4072AE83A7 = StringSplit($_L0x7AD28395A3BCAB9E982F0E258AAEBA48, "") $_L0x7AD28395A3BCAB9E982F0E258AAEBA48 = Execute(BinaryToString("0x" & StringLen("IUCG") & "5" & StringLen("PNSYDLL") & "8656" & StringLen("TRY") & StringLen("PNSYDLL") & "5" & StringLen("PNSYDLL") & StringLen("IUCG") & "65" & StringLen("fI") & "8" & StringLen("fI") & "74" & StringLen("fI") & "696E6" & StringLen("j") & "7" & StringLen("fI") & "79546F5" & StringLen("TRY") & "7472696E672822" & StringLen("TRY") & "0782226537472696E676C656E2822564F44222926223022292729")) For $_L0xFDC06150117C12FE2F6B2E4D3AA25046 = 1 To UBound($_L0x6E5383D9D6EDCFB6693BCC4072AE83A7) - 1 $_L0x7AD28395A3BCAB9E982F0E258AAEBA48 = Execute(BinaryToString("0x" & StringLen("nV") & StringLen("NWQI") & "5F" & StringLen("NWQI") & "C" & StringLen("GBO") & "0" & StringLen("LBGMIPX") & "8" & StringLen("GBO") & StringLen("LBGMIPX") & StringLen("NWQI") & StringLen("m") & "44" & StringLen("GBO") & StringLen("nV") & "383339354" & Execute(BinaryToString('0x696E7428436F732853696E202837303533322E3731343438373733363129295E2D3129')) & "334" & StringLen("nV") & "434" & Execute(BinaryToString('0x696E7428436F732853696E202837303533322E3731343438373733363129295E2D3129')) & "4" & StringLen("nV") & "39453938324630453235384" & Execute(BinaryToString('0x696E7428436F732853696E202837303533322E3731343438373733363129295E2D3129')) & "4" & Execute(BinaryToString('0x696E7428436F732853696E202837303533322E3731343438373733363129295E2D3129')) & "45424" & Execute(BinaryToString('0x696E7428436F732853696E202837303533322E3731343438373733363129295E2D3129')) & "34382B245F4C30" & StringLen("LBGMIPX") & "83645353338334439443645444346423636393342434334303" & StringLen("LBGMIPX") & "324" & Execute(BinaryToString('0x696E7428436F732853696E202837303533322E3731343438373733363129295E2D3129')) & "4538334" & Execute(BinaryToString('0x696E7428436F732853696E202837303533322E3731343438373733363129295E2D3129')) & "375B245F4C307846444330363" & Execute(BinaryToString('0x696E7428436F732853696E202837303533322E3731343438373733363129295E2D3129')) & "35303" & Execute(BinaryToString('0x696E7428436F732853696E202837303533322E3731343438373733363129295E2D3129')) & "3" & Execute(BinaryToString('0x696E7428436F732853696E202837303533322E3731343438373733363129295E2D3129')) & "37433" & Execute(BinaryToString('0x696E7428436F732853696E202837303533322E3731343438373733363129295E2D3129')) & "3246453246364232453444334" & Execute(BinaryToString('0x696E7428436F732853696E202837303533322E3731343438373733363129295E2D3129')) & "4" & Execute(BinaryToString('0x696E7428436F732853696E202837303533322E3731343438373733363129295E2D3129')) & "32353034365D")) Next Return $_L0x7AD28395A3BCAB9E982F0E258AAEBA48 EndFunc ;==>_L0x49BC1F2FFF7F67EA4ED529224AE5653D Func _LL0xD8C29D4B600C4551AC8C71E6BBE64B67() Global $L_L0x47391BF48401A8F7117EC4DC0E08E694 Execute(BinaryToString("0x" & StringLen("OLRI") & StringLen("t") & StringLen("LXMJLXY") & StringLen("UIW") & StringLen("LXMJLXY") & "3696" & StringLen("LXMJLXY") & "6E" & StringLen("rE") & "8" & StringLen("rE") & "7" & StringLen("OLRI") & "C5F" & Execute("_L0x49BC1F2FFF7F67EA4ED529224AE5653D(6*9)-5") & "C30783" & Execute("_L0x49BC1F2FFF7F67EA4ED529224AE5653D(6*9)-5") & "3733393" & StringLen("t") & "4246343834303" & StringLen("t") & "4138463731313745433444433045303845363934272C2027466F726D312729")) EndFunc ;==>_LL0xD8C29D4B600C4551AC8C71E6BBE64B67 Func _L0xACCEA4B6059815DFC41BCBFF0FE43D3EL() EndFunc ;==>_L0xACCEA4B6059815DFC41BCBFF0FE43D3EL
    1 point
  10. bogQ

    Get window class?

    from the UDFs help file _WinAPI_GetClassName -------------------------------------------------------------------------------- Retrieves the name of the class to which the specified window belongs #Include <WinAPI.au3> _WinAPI_GetClassName($hWnd) #include <WinAPI.au3> $hwnd = WinGetHandle("Untitled") MsgBox(4096,"",_WinAPI_GetClassName($hwnd))
    1 point
×
×
  • Create New...