Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 09/28/2017 in all areas

  1. In case you're wondering why this change works, it's because the 2 controls have the same value, even though you deleted one, the Form2 input2 and the Form3 $g_idOutputEdit both equal 8, so the WM_COMMAND is writing the contents to both inputs.
    2 points
  2. #include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <ComboConstants.au3> #include <StringConstants.au3> #include <Crypt.au3> #include <WinAPI.au3> Global $g_iAlgorithm = $CALG_SHA1, $g_idInputEdit = -1, $g_idOutputEdit = -1 $Form1 = GUICreate("Form1", 441, 333) $ButtonGui2Open = GUICtrlCreateButton("ButtonGui2Open", 112, 152, 201, 41) $ButtonCryptGuiOpen = GUICtrlCreateButton("ButtonCryptGuiOpen", 112, 200, 201, 41) $Input1 = GUICtrlCreateInput("", 104, 32, 225, 21) $Input2 = GUICtrlCreateInput("", 104, 64, 225, 21) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $ButtonCryptGuiOpen GUIRegisterMsg($WM_COMMAND, "WM_COMMAND") _Form3() GUIRegisterMsg($WM_COMMAND, "") Case $ButtonGui2Open _Form2() EndSwitch WEnd Func _Form2() GUISetState(@SW_DISABLE, $Form1) $aMetagGui = GUICreate("Form2", 706, 350, -1, -1, -1, -1, $Form1) $Input1 = GUICtrlCreateInput("", 16, 64, 169, 21) GUICtrlSendMsg($Input1, $EM_SETCUEBANNER, False, "sample asdf.") $Input2 = GUICtrlCreateInput("", 16, 131, 169, 21) ; GUICtrlSendMsg($Input2, $EM_SETCUEBANNER, False, "samle asdf.") $Label1 = GUICtrlCreateLabel("(Title)", 16, 40, 84, 17) $Label2 = GUICtrlCreateLabel("(Description)", 16, 107, 145, 17) GUISetState(@SW_SHOW, $aMetagGui) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE GUISetState(@SW_ENABLE, $Form1) GUIDelete($aMetagGui) ExitLoop EndSwitch WEnd EndFunc ;==>_Form2 Func _Form3() GUISetState(@SW_DISABLE, $Form1) Local $aForm3 = GUICreate("Form3", 550, 320, -1, -1, -1, -1, $Form1) $g_idInputEdit = GUICtrlCreateEdit("", 0, 0, 550, 150, $ES_WANTRETURN) $g_idOutputEdit = GUICtrlCreateEdit("", 0, 150, 550, 150, $ES_READONLY) Local $idCombo = GUICtrlCreateCombo("", 0, 300, 100, 20, $CBS_DROPDOWNLIST) GUICtrlSetData($idCombo, "MD2|MD4|MD5|SHA1", "SHA1") GUISetState(@SW_SHOW, $aForm3) _Crypt_Startup() Local $dHash = 0, _ $sRead = "" While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE GUISetState(@SW_ENABLE, $Form1) GUIDelete($aForm3) _Crypt_Shutdown() ExitLoop Case $idCombo Switch GUICtrlRead($idCombo) Case "MD2" $g_iAlgorithm = $CALG_MD2 Case "MD4" $g_iAlgorithm = $CALG_MD4 Case "MD5" $g_iAlgorithm = $CALG_MD5 Case "SHA1" $g_iAlgorithm = $CALG_SHA1 EndSwitch $sRead = GUICtrlRead($g_idInputEdit) If StringStripWS($sRead, $STR_STRIPALL) <> "" Then $dHash = _Crypt_HashData($sRead, $g_iAlgorithm) GUICtrlSetData($g_idOutputEdit, StringTrimLeft($dHash, 2)) EndIf EndSwitch WEnd EndFunc ;==>_Form3 Func WM_COMMAND($hWnd, $iMsg, $wParam, $lParam) #forceref $hWnd, $iMsg, $lParam Switch _WinAPI_LoWord($wParam) Case $g_idInputEdit Switch _WinAPI_HiWord($wParam) Case $EN_CHANGE Local $dHash = _Crypt_HashData(GUICtrlRead($g_idInputEdit), $g_iAlgorithm) GUICtrlSetData($g_idOutputEdit, StringTrimLeft($dHash, 2)) EndSwitch EndSwitch EndFunc ;==>WM_COMMAND
    2 points
  3. Hotfix update is live now! Just research for updates in your ISN, should find a new one. This should fix the non working parameters error.
    1 point
  4. So what exactly is the intent of this script? Jos
    1 point
  5. Microsoft activation information scraping doesn't sound very legitimate. Could you explain how this is legitimate? Jos
    1 point
  6. Json(2015.01.08).zip
    1 point
  7. money

    _ReduceMemory UDF

    A joke... Here's my take on this: ;_ReduceMemory Example Global $Ret = _ReduceMemory() ConsoleWrite('_ReduceMemory: Return='& $Ret &' @error=' & @error &@lf) Sleep(10000) ;_ReduceMemory UDF Func _ReduceMemory($PID = 0) ; Discussion: http://www.autoitscript.com/forum/topic/13399-reducememory-udf ; Description: Removes as many pages as possible from the working set of the specified process. ; Return: Success = 1, Failure = 0 ; Based on _WinAPI_EmptyWorkingSet by Yashied w/ proper access flags Local $Ret If (Not $PID) Then $Ret = DllCall("kernel32.dll", "handle", "GetCurrentProcessId") If @error Or (Not $Ret[0]) Then Return SetError(1, 0, 0) $PID = $Ret[0] EndIf Local $hProcess = DllCall('kernel32.dll', 'ptr', 'OpenProcess', 'dword', 0x00000700, 'int', 0, 'dword', $PID) If (@error) Or (Not $hProcess[0]) Then Return SetError(2, 0, 0) Local $Ret = DllCall(@SystemDir & '\psapi.dll', 'int', 'EmptyWorkingSet', 'ptr', $hProcess[0]) If (@error) Or (Not $Ret[0]) Then $Ret = 0 DllCall('kernel32.dll', 'int', 'CloseHandle', 'ptr', $hProcess[0]) If Not IsArray($Ret) Then Return SetError(3, 0, 0) Return 1 EndFunc ;==>_ReduceMemory
    1 point
×
×
  • Create New...