Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 03/11/2014 in all areas

  1. Hi mates, well this is my first contribution. a simple UDF to use Virustotal API v2.0 The response return is not parsed|splitted. requires >WinHttp UDF Functions List: Update: Now a Only Function using a flags for respective mode. VT() Use respective flag($Type) VT(ByRef $aAPI, $Type, $sResource, $sAPIkey,$Comments="") flags($Type) $fReport = retrieve a scan report on a given file $fScan = submit a file for Scanning $fRescan = Rescan files in VirusTotal's file store $uReport = retrieve a scan report on a given URL $uScan = submit a URL for Scanning $Comment = Make a commnet on files and URLs Example: #include <Crypt.au3> #include "VT.au3" Example() Func Example() _Crypt_Startup() Local $sFilePath = @WindowsDir & "\Explorer.exe" Local $bHash = _Crypt_HashFile($sFilePath, $CALG_MD5) _Crypt_Shutdown() Local $hVirusTotal = VT_Open() Local $APIkey='Your API key' ConsoleWrite(VT($hVirusTotal, $fReport, '20c83c1c5d1289f177bc222d248dab261a62529b19352d7c0f965039168c0654',$APIkey) & @CRLF) ConsoleWrite(VT($hVirusTotal, $fScan, $sFilePath,$APIkey) & @CRLF) ConsoleWrite(VT($hVirusTotal, $fRescan, hex($bHash),$APIkey) & @CRLF) ConsoleWrite(VT($hVirusTotal, $uReport, "http://www.virustotal.com",$APIkey) & @CRLF) ConsoleWrite(VT($hVirusTotal, $uScan, "http://www.google.com",$APIkey) & @CRLF) ConsoleWrite(VT($hVirusTotal, $Comment, hex($bHash) ,$APIkey,"Hello Word | Hola Mundo") & @CRLF) VT_Close($hVirusTotal) ; EndFunc ;==>Example Saludos VT.au3
    1 point
  2. Danyfirex

    Guitar Tab Tester

    Hi all, last night I was playing with >MIDI UDF by Ascend4nt, and thought about making a game to learn the notes on the fretboard of the guitar (in the final I did not the game) but I made a guitar tablature tester. (Maybe I I add the game later.) Functions. Play notes. Play notes. while MouseDown+MouseMove Play Tabs. Change Speed. Highlight Note. Note: The tab file are into the tabs folder (see the file format if you want add more tabs) It does not supports sound effects as (slide,bend,pull off) Only clean notes. Update Version 0.1.3 (02/03/2014) Latest version! Version 0.1.3 (02/03/2014) Changed: _PlayTab Funcion rewritten Added: Play/Stop while Tab is sounding Added: Change Timing while Tab is sounding Added: Number Fret marks Added: Some tabs Guitar Tab Tester 0.1.3.rar Update Version 0.1.2 (18/02/2014) Older version! Version 0.1.2 (18/02/2014) Fixed: Notes up 9 fret Doesn't Sound Fixed: Notes Highlighting Added: English Notation Added: Some tabs Changed: GUI Look Changed: Code Structure Guitar Tab Tester 0.1.2.rar Capture: Well I hope You understand it was a hard fight vs Google traslate. (sorry for my English) suggestions, criticism, comments, help are wellcome. Saludos
    1 point
  3. Do you mean something like this ? #include <GUIConstantsEx.au3> #Include <Array.au3> $gui = GUICreate( "Renommer fichiers par lots", 400, 400) Local $e1 = GUICtrlCreateEdit("a", 20, 20, 100, 100) Local $e2 = GUICtrlCreateEdit('', 20, 150, 100, 100) $data2 = "15" & @crlf& "25"& @crlf& "42" GUICtrlSetData($e2, $data2) GUISetState() $a2 = StringRegExp(GuiCtrlRead($e2), '(?i)[^\r\n]+', 3) Dim $array[UBound($a2)][2] For $i = 0 to UBound($a2)-1 $array[$i][0] = GuiCtrlRead($e1) $array[$i][1] = $a2[$i] Next _ArrayDisplay($array) $txt = "" For $i = 0 to UBound($array)-1 $txt &= $array[$i][0] & $array[$i][1] & @crlf Next Msgbox(0,"", $txt) While 1 $msg = GUIGetMsg() Switch $msg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd
    1 point
  4. Danyfirex

    VirusTotal API 2.0 UDF

    mmm Really the UDF was created over Windows 7 x86. I remember a day when a was playing with the Winhttp UDF, and get some error over x64. I think the problem is into Winhttp UDF. So as soon I'll be over Windows x64 at my work I'll try to see where the problem is... Are you compiling Your Script as x64 or x86? Saludos
    1 point
  5. Danyfirex

    VirusTotal API 2.0 UDF

    @luger do you mean Runing your script under x64 or really sending a x64 file?
    1 point
  6. Palestinian, It might help to visualize a 2D array as a spreadsheet where rows are D1 and columns are D2 such that $MC[3][2] will get the value from the second row, column 1 (arrays are '0' offset). The doc the MBALZESHARI pointed you to explains all of that, as does the example from DW1. Building on the topic you previously posted I have added a button to dump the array to the console... #include <GuiEdit.au3> #include <GUIConstantsEx.au3> #include <array.au3> #AutoIt3Wrapper_Add_Constants=n Local $gui010 = GUICreate('', 400, 500) Local $aSize = WinGetClientSize($gui010) Local $Medical = GUICtrlCreateEdit('', 20, 20, 100, 60) Local $Medical2 = GUICtrlCreateEdit('', 20, 150, 100, 60) Local $dumparray = GUICtrlCreatebutton('Dump array MC to Console in Column Format', 20, 250, 360, 20) GUISetState() Local $finalMC1, $finalMC2, $MC[0][2] While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit case $dumparray _arraydisplay($MC) for $1 = 0 to ubound($MC) - 1 for $2 = 0 to ubound($MC,2) - 1 ConsoleWrite(stringformat('%-10s',$MC[$1][$2])) Next ConsoleWrite(@LF) next EndSwitch $finalMC1 = GUICtrlRead($Medical) $finalMC2 = GUICtrlRead($Medical2) If _GUICtrlEdit_LineLength($Medical) = 1 And _GUICtrlEdit_GetModify($Medical) > 0 Then GUICtrlSetState($Medical2, $GUI_FOCUS) _GUICtrlEdit_SetModify($Medical, False) EndIf If _GUICtrlEdit_LineLength($Medical2) = 2 And _GUICtrlEdit_GetModify($Medical2) > 0 Then ReDim $MC[UBound($MC) + 1][2] $MC[UBound($MC) - 1][0] = $finalMC1 $MC[UBound($MC) - 1][1] = $finalMC2 GUICtrlSetState($Medical, $GUI_FOCUS) _GUICtrlEdit_SetModify($Medical2, False) EndIf WEnd Look at the CASE statment for the button to see if that makes sense. Also, You might describe in language what you are trying to do because your use of the edit controls can probably be improved. kylomas edit: spelling
    1 point
  7. May I suggest you look on YouTube for AUtoIt. I strongly suspect you will find videos on arrays. That make it much clearer for you.
    1 point
  8. I hope this example will help. If it does not, can you be more specific on your confusion? #include <array.au3> Local $aTest[4][4] = [['a','b','c','d'],['e','f','g','h'],['i','j','k','l'],['m','n','o','p']] _ArrayDisplay($aTest) ;Loop through each array item one by one For $i1 = 0 To UBound($aTest,1) - 1 ConsoleWrite("--Current index of dimension 1: " & $i1 & '/' & UBound($aTest,1) - 1 & @CRLF) For $i2 = 0 To UBound($aTest,2) - 1 ConsoleWrite('Dimension 2 index: ' & $i2 & '/' & UBound($aTest,2) - 1 & ' = ' & $aTest[$i1][$i2] & @CRLF) Next Next
    1 point
  9. lcty

    Nested AD Groups

    Thanks for your quick answers! I really appreciate that!! czardas, your recursive loop makes sense. You probably got me an idea! I'm going to try something and post it here if it was successfull. ... and water, as you are the developer of the AD UDF - thank you very much for sharing this, you made my life a lot easier!!
    1 point
  10. Use these directives : #Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_Run_Obfuscator=y #Obfuscator_Parameters=/striponly #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
    1 point
  11. BrewManNH

    Problem with exit codes

    That's why you don't get the exit code you want. When you use #requireadmin in a script, the script is immediately exited and then reran with a request to elevate permissions for it. Your RunWait sees the first exit, and doesn't know it has restarted.
    1 point
  12. Driveskull, Well, when you do - and there is a specific problem to solve - feel free to open a new thread and ask about it. But until then this has gone on long enough. M23
    1 point
  13. Of course it's a bug. It means that leading zeroes are significant. It also means there are two distinct representations for some values. 2's complement representation uses a given bit size. With typed languages like C there is no problem as the size of the storage element is well defined. Since AutoIt uses dynamic typing there is no such fixed bit size. Local Const $32bit = 0xffffffff Local Const $33bit = 0x00ffffffff ConsoleWrite($32bit & " and " & $33bit & " are " & (($32bit = $33bit) ? "equal" : "different") & @LF) Using leading zeroes like this is contrary to every convention available. It is also contrary to the description made in the help.
    1 point
  14. If you use 0 instead of $PROCESS_NAME_NATIVE then you get the Win32 path format Func _WinAPI_QueryFullProcessImageName($hProcess) Local Const $PROCESS_NAME_NATIVE = 1 Local $dwSize = 65535 Local $aRet = DllCall("kernel32.dll", "BOOL", "QueryFullProcessImageName", "handle", $hProcess, "dword", 0, "str", "", "dword*", $dwSize) Return $aRet[3] EndFunc
    1 point
  15. Palestinian, You will get more expediant help by posting runnable code. I've added a gui def and re-aligned some of the variable def's to get something runnable. If your intent is to add the values read from each edit control to a 2D array then the following does just that. #include <GuiEdit.au3> #include <GUIConstantsEx.au3> #include <array.au3> #AutoIt3Wrapper_Add_Constants=n local $gui010 = guicreate('',400,500) Local $aSize = WinGetClientSize($gui010) local $Medical = guictrlcreateedit('Medical',20,20,100,60) local $Medical2 = guictrlcreateedit('Medical2',20,150,100,60) guisetstate() local $finalMC1, $finalMC2, $MC[0][2] while 1 switch guigetmsg() case $GUI_EVENT_CLOSE Exit EndSwitch $finalMC1 = GUICtrlRead($Medical) $finalMC2 = GUICtrlRead($Medical2) If _GUICtrlEdit_LineLength($Medical2) = 2 And _GUICtrlEdit_GetModify($Medical2) > 0 Then ReDim $MC[UBound($MC) + 1][2] $MC[UBound($MC) - 1][0] = $finalMC1 $MC[UBound($MC) - 1][1] = $finalMC2 GUICtrlSetState($Medical, $GUI_FOCUS) _GUICtrlEdit_SetModify($Medical2, False) _arraydisplay($MC) EndIf wend If you need help with existing, runnable code, then post it. kylomas edit: incidentally, _GuiCtrlEdit_GetModify returns true or false so the coding should look like.. If _GUICtrlEdit_LineLength($Medical2) = 2 And _GUICtrlEdit_GetModify($Medical2) Then
    1 point
  16. Danp2

    Insert string in access DB

    Suggest that you review >this thread. I have been using this UDF to successfully read from and update an Access database. Edit: Here's some code showing how to insert a record where $UserName is a string containing the value to be written -- ; Try inserting a new record $Result = _SQL_Execute(-1, "insert into usersettings (Name) VALUES ( '" & $UserName & "')" )
    1 point
  17. I use QueryFullProcessImageName. Here a fast example: #include <WinAPIProc.au3> Run("calc.exe") Global $hWnd = WinWait("[CLASS:CalcFrame]") Global $sProcess = __WinAPI_GetWindowFileName($hWnd) ConsoleWrite($sProcess & @LF) Func _WinAPI_QueryFullProcessImageName($hProcess) Local Const $PROCESS_NAME_NATIVE = 1 Local $dwSize = 65535 Local $aRet = DllCall("kernel32.dll", "BOOL", "QueryFullProcessImageName", "handle", $hProcess, "dword", $PROCESS_NAME_NATIVE, "str", "", "dword*", $dwSize) Return $aRet[3] EndFunc Func __WinAPI_GetWindowFileName($hWnd) Local $PID = 0 Local $Result = DllCall("user32.dll", "bool", "IsWindow", "hwnd", $hWnd) If $Result[0] Then $Result = DllCall("user32.dll", "dword", "GetWindowThreadProcessId", "hwnd", $hWnd, "dword*", 0) $PID = $Result[2] EndIf If Not $PID Then Return SetError(1, 0, '') $Result = __WinAPI_GetProcessFileName($PID) If @error Then Return SetError(@error, @extended, '') Return $Result EndFunc ;==>_WinAPI_GetWindowFileName Func __WinAPI_GetProcessFileName($PID = 0) If Not $PID Then $PID = @AutoItPID Local $hProcess = DllCall('kernel32.dll', 'handle', 'OpenProcess', 'dword', __Iif($__WINVER < 0x0600, 0x00000410, 0x00001010), _ 'bool', 0, 'dword', $PID) If @error Or Not $hProcess[0] Then Return SetError(@error + 20, @extended, '') ;~ Local $Path = _WinAPI_GetModuleFileNameEx($hProcess[0]) Local $Path = _WinAPI_QueryFullProcessImageName($hProcess[0]) Local $iError = @error DllCall("kernel32.dll", "bool", "CloseHandle", "handle", $hProcess[0]) If $iError Then Return SetError(@error, 0, '') Return $Path EndFunc ;==>_WinAPI_GetProcessFileName
    1 point
  18. AutoIt SysInfo Clock is a small tool in widget style to show the clock, current CPU usage, CPU speed, memory usage and network activity (tcp, ip and udp). Additionally you can use it as an alarm clock. To stop alarm clock tone press the left LED (mail) or wait 60 seconds. The current CPU usage code is beta and might be not working for some CPUs! Main window: Move mouse to area below seconds and press rmb to select different color scheme. Alarm Clock window: Tray menu: Credits: see scroller (select About). Special thanks to trancexx for helping me to read out current CPU speed using the WinAPI stuff, AndyG for troubleshooting performance counter issue, czardas for composing "Für Elise" and Ascend4nt for the support! Download source code + compiled version: Click Me (previous downloads: 1386) (Please don't use any download manager!) Compiled version only: MediaFire.com or 4Shared.com Coded on Win7 x64 using Aero / Win8.1 x64 and AutoIt v3.3.12.0. Br, UEZ This project is discontinued! Change log: v0.9.5.0 build 2013-06-14: initial release v0.9.6.0 build 2013-06-15: added _WinAPI_CreateRoundRectRgn() to fix transparency issue on non Aero desktops, small internal modifications and added check for whether performance counters are enabled v0.9.6.5 build 2013-06-15: fixed a bug when "Reset Windows Position" was selected twice and color of scroller will fit to clock color schema v0.9.8.0 build 2013-06-20: added little music to About part -> many thanks to czardas for mus++ and arranging "Für Elise", added date to clock, replaced CPU usage code -> thanks Ascend4nt v0.9.9.0 build 2013-06-21: added 2 more color schemas (mint and purple), added network traffic LED, compiled exe now included in archive v0.9.9.0 build 2013-06-22: forgot to increase a variable in ini section v0.9.9.0 build 2013-06-24: found also missing modification in context menue after adding two more color schemas v0.9.9.0 build 2013-06-26: Ops, forgot to change also radio item proper check in clock color schema sub menu v0.9.9.1 build 2013-06-27: added option to select whether SysInfo Clock should start at windows startup v0.9.9.2 build 2013-07-01: added yellow-red mark to the small info indicators and additional info when hovering about the small indicators, small internal changes v0.9.9.5 build 2013-07-05: added features: singleton, update check, visit web site, bring GUI to front and fixed some smaller bugs + some internal changes v0.9.9.6 build 2013-07-11: added alarm clock feature v0.9.9.7 build 2014-06-23: adapted code to run on AutoIt version 3.3.12.0 v0.9.9.7 build 2014-08-27: some internal "cosmetic" changes -> this project is discontinued!
    1 point
  19. #Include <WinAPIEx.au3> ConsoleWrite(_DosPathNameToPathName('\Device\HarddiskVolume2\Program Files\SomeProgram\exe.exe') & @CR) Func _DosPathNameToPathName($sPath) Local $sName, $aDrive = DriveGetDrive('ALL') If Not IsArray($aDrive) Then Return SetError(1, 0, $sPath) EndIf For $i = 1 To $aDrive[0] $sName = _WinAPI_QueryDosDevice($aDrive[$i]) If StringInStr($sPath, $sName) = 1 Then Return StringReplace($sPath, $sName, StringUpper($aDrive[$i]), 1) EndIf Next Return SetError(2, 0, $sPath) EndFunc ;==>_DosPathNameToPathNameWinAPIEx.au3
    1 point
×
×
  • Create New...