Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 01/01/2018 in all areas

  1. Danyfirex

    Hash HMAC

    Hello guys. Here is a small function to create a hash hmac similar to hash_hmac PHP function. Supported are: SHA512,SHA256,SHA1,SHA384,MD5 and RIPEMD160. Local $sSecret = "SecretKey" Local $sMessage = "AutoIt Rocks!!!" ConsoleWrite("HMAC-SHA256: " & @TAB & @TAB & _HashHMAC("SHA512", $sMessage, $sSecret) & @CRLF) ConsoleWrite("HMAC-SHA256: " & @TAB & @TAB & _HashHMAC("SHA256", $sMessage, $sSecret) & @CRLF) ConsoleWrite("HMAC-SHA1: " & @TAB & @TAB & _HashHMAC("SHA1", $sMessage, $sSecret) & @CRLF) ConsoleWrite("HMAC-SHA384: " & @TAB & @TAB & _HashHMAC("SHA384", $sMessage, $sSecret) & @CRLF) ConsoleWrite("HMAC-MD5: " & @TAB & @TAB & _HashHMAC("MD5", $sMessage, $sSecret) & @CRLF) ConsoleWrite("HMAC-RIPEMD160: " & @TAB & _HashHMAC("RIPEMD160", $sMessage, $sSecret) & @CRLF) Func _HashHMAC($sAlgorithm, $bData, $bKey, $bRaw_Output = False) Local $oHashHMACErrorHandler = ObjEvent("AutoIt.Error", "_HashHMACErrorHandler") Local $oHMAC = ObjCreate("System.Security.Cryptography.HMAC" & $sAlgorithm) If @error Then SetError(1, 0, "") $oHMAC.key = Binary($bKey) Local $bHash = $oHMAC.ComputeHash_2(Binary($bData)) Return SetError(0, 0, $bRaw_Output ? $bHash : StringLower(StringMid($bHash, 3))) EndFunc ;==>_HashHMAC Func _HashHMACErrorHandler($oError) ;Dummy Error Handler EndFunc ;==>_HashHMACErrorHandler It requires .NET Framework 2.0 or higher. Saludos
    1 point
  2. 1 point
  3. ;HotKeySet("{F9}", "Position") Position() Func Position() $aPos = MouseGetPos() $aPos1 = MouseGetPos() $aPos2 = MouseGetPos() MsgBox(64, '', $aPos[0]&' - '&$aPos[1]&@CRLF&$aPos1[0]&' - '&$aPos1[1]&@CRLF&$aPos2[0]&' - '&$aPos2[1]) EndFunc Sure but have no idea why store 2 or 3.
    1 point
  4. Hi, As you stated ..."Serious warning: the SQL involved is NOT for heartfainted people."... you are not kidding are you... hehehe well done...yes a great example of what might be accomplished using SQLite, thanks again mate...
    1 point
  5. I don't know if this is posted before, so I apologize in advance if it has. I was just browsing sourceforge today and came across this Autoit Library project named Pal, Peter's AutoIt Library. Below is the description of the project: Pal is an AutoIt library with functions on the following topics (browse the Pal Wiki for info):- window and screen settings such as size- mouse and gui settings such as color- GUI controls such as png/jpg buttons and hyperlinks- logics and mathematics such as clamping and tweening- string, xml string and file string manipulation- convenient dialogues such as Ok, Sure, download and progress bar- data lists: lists, stacks, shift registers and key maps- debugging functions Though I didn't myself write this, I thought it looked interesting and would share its existance with the community.
    1 point
  6. You may say: How i am suppossed to click the OK Button without moving my mouse? Simple, press ENTER key to press the OK button without the mouse. May sound obvious but some people dont know Hope it helped you
    1 point
  7. ¡Hi Gadoz! Seems you're having problems? Try locating the While loop right after the HotKeySet statements. When you run the script, it saves the MousePosition before you ask for it, that's why you're having problems when saving the wanted coordenates. Try this script: #RequireAdmin Global $aPos = 0 Global $aPos1 = 0 HotKeySet("{F9}", "Position") HotKeySet("{F8}", "Start") HotKeySet("{F11}", "End") Call ("SleepForUser") Func SleepForUser() While 1   Sleep (100) WEnd EndFunc Func Position0() MsgBox (0, "Waiting for user", "Put your mouse at the wanted position to save Pos0" ) $aPos = MouseGetPos() MsgBox (0, "Waiting for user", "Put your mouse at the wanted position to save Pos1" ) $aPos1 = MouseGetPos() MsgBox(0, "Success", "Sucessfully saved mouse locations") Call("SleepForUser") EndFunc Func Start() MouseClick("Left", $aPos[0], $aPos[1], 2) MouseClick("Left", $aPos[0], $aPos1[], 2) Call ("SleepForUser") EndFunc Func End () Exit EndFunc It saves 2 different mouse locations: Generates 2 MSGBOXes After saving aPos functions it waits for user response. Hope that's what you need ¡Good luck and happy scripting!
    1 point
  8. jchd

    while loop

    You're still ignoring the best advice, already given here Now, no your intend is unclear: as you repeatedly increment the same values in the same file, you could as well replace once by the final values (resp. 9.166 and 13.166). That, or save to distinct files at every step in your loop.
    1 point
  9. Maybe this could be useful to you. AutoIt Scriptomatic is a wonderful and "hide" tool that you can use to check and learn from a lot of WMI examples... and if you installed Full Scite4AutoIt version the you have it already. ShellExecute(@ProgramFilesDir & "\AutoIt3\Examples\COM\Scriptomatic.au3") And here just a screenshot so you know what I mean: Cheers, sahsanu
    1 point
×
×
  • Create New...