Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 04/19/2014 in all areas

  1. Mobius

    AutoCamo - 98.18b

    Last updated 9/10/21 * Image may not represent current product Features Simple Integrated countermeasures against file and memory analysis based decompilers. Add basic types of resources into the interpreter or other types as raw data. Define multiple programs to execute pre and post build. Create and include pe version information. User defined patches that can be implemented globally on the interpreter and compiler or selectively. Handles its own basic macro's as well as environment variables in most fields for easier path finding. Drag and drop configs (script bound or separate) to the input edit box or to the icon to load them. Configuration settings can be copied to the clipboard or saved as config files or Au3 scripts. Settings can now be saved directly to an AutoIt3 script. Subsystem independant, can act as a gui or console tool. And much more. See next post for update information. A3C_97.16b.7z A3C_98_18_b.zip
    1 point
  2. Gianni

    just music

    just for fun a simple interface to http://mp3skull.com #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <GuiListView.au3> #include <GuiEdit.au3> #include <GuiTab.au3> #include <IE.au3> Opt("GUIOnEventMode", 1) ; some global variables Global $TabBrowser = False ; browser in a TabItem If $TabBrowser Then Global $oIE = _IECreateEmbedded() Else Global $oIE = _IECreate("http://mp3skull.com", 0, 0, 0, 0) ; run browser hidden EndIf Global $aLV_Click_Info Global $oForm Global $oInputFile Global $oQuery Global $oLinks = "" Local $Form1 = GUICreate("(web) Juke Box - (experimental)", 665, 545) GUISetOnEvent($GUI_EVENT_CLOSE, "Bye") Local $Label1 = GUICtrlCreateLabel("Type song title or artist to search and hit Enter", 8, 5, 650, 17) Global $Input1 = GUICtrlCreateInput("", 8, 24, 650, 21) GUICtrlSetTip(-1, "Insert a title here and hit 'Enter'") Global $StopButton = GUICtrlCreateButton("Stop playing music", 8, 522, 650, 21) GUICtrlSetOnEvent($StopButton, "StopButton") GUICtrlSetTip(-1, "Stop playing music") Global $compilation = GUICtrlCreateListView("Songs found", 8, 54, 650, 260) GUICtrlSetTip(-1, "DoubleClick on a link to play") _GUICtrlListView_SetColumnWidth($compilation, 0, 645) _GUICtrlListView_SetExtendedListViewStyle($compilation, BitOR($LVS_EX_GRIDLINES, $LVS_EX_FULLROWSELECT)) ; show grid; select whole row ; = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = Local $PageControl1 = GUICtrlCreateTab(8, 320, 650, 200);Creates a "Tab control" for the GUI. ; Global $TabSheet1 = GUICtrlCreateTabItem("Info") ; First tab Local $Info = "hello" & @CRLF & "Type song title or artist name" & @CRLF & "in the InputBox at top and hit 'Enter'" & _ @CRLF & "then DoubleClick on list to play music" & @CRLF & @CRLF & "have fun." Local $InfoBox = GUICtrlCreateEdit($Info, 13, 345, 638, 168, $ES_READONLY) GUICtrlSetFont(-1, 18, 0, 0, "Lucida Console") GUICtrlSetBkColor(-1, 0xEEEEEE) ; Color of background GUICtrlSetColor(-1, 0xFF0000) ; color of font ; Global $TabSheet3 = GUICtrlCreateTabItem("Activity log") ; second tab Global $crtLog1 = GUICtrlCreateEdit("awaiting commands" & @CRLF, 13, 345, 638, 168);,$ES_READONLY) ;Sets the font for a control. GUICtrlSetFont(-1, 9, 0, 0, "Lucida Console") GUICtrlSetBkColor(-1, 0x000000) ; Color of background (black) GUICtrlSetColor(-1, 0x00FF00) ; color of font (green) ; If $TabBrowser Then Global $TabSheet2 = GUICtrlCreateTabItem("Browser") ; third tab GUICtrlCreateObj($oIE, 13, 345, 638, 168) _IENavigate($oIE, "http://mp3skull.com/") _IE_ref_refresh() EndIf ; GUICtrlCreateTabItem("") ; end of tabitem definitions GUISetState(@SW_SHOW) ; = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = ; ; Setup the "Enter" key management Global $getEnter = GUICtrlCreateDummy() GUICtrlSetOnEvent(-1, "gotEnter") ; to call the function gotEnter() when Dummy control receives an "Enter" --+ Global $a_AccelKeys[1][2] = [["{ENTER}", $getEnter]] ; send the "Enter" keypresses to the Dummy control | GUISetAccelerators($a_AccelKeys) ; | ; | Func gotEnter() ; Here we manage the enter key <--------------------------------+ LogPrint("-> enter pressed somewhere" & @CRLF) If _GuiCtrlGetFocus($Form1) = $Input1 Then ; was cursor in control $Input1? _MyEnterFunc() ; if yes then call my enter function Else ; prosecute ahead the "Enter" key to the proper control GUISetAccelerators("") ControlSend($Form1, "", _GuiCtrlGetFocus($Form1), "{ENTER}") GUISetAccelerators($a_AccelKeys) EndIf EndFunc ;==>gotEnter Func _GuiCtrlGetFocus($hGui = "") ; Retrieves the internal handle of the control with the focus Local $InputID = ControlGetHandle($hGui, "", ControlGetFocus($hGui)) Return _ControlGetGuiID($InputID) ; --------------------------+ EndFunc ;==>_GuiCtrlGetFocus ; | Func _ControlGetGuiID($hCtrl) ; Transforms from Handle to ID <----+ Local $Result = DllCall("user32.dll", "int", "GetDlgCtrlID", "hwnd", $hCtrl) If @error = 0 Then Return $Result[0] Return SetError(1, 0, '') EndFunc ;==>_ControlGetGuiID ; GUIRegisterMsg($WM_NOTIFY, "_Check_Click") ; Register a user defined function for a known Windows Message ID (WM_MSG). ---------+ ; | ; WM_NOTIFY event handler for click example: http://www.autoitscript.com/forum/topic/143900-listview-onclick/#entry1013670 <---+ Func _Check_Click($hWnd, $iMsg, $iwParam, $ilParam) Local $tNMHDR = DllStructCreate($tagNMHDR, $ilParam) Local $hList = GUICtrlGetHandle($compilation) ; $fDblClk = False If HWnd(DllStructGetData($tNMHDR, "hWndFrom")) = $hList And DllStructGetData($tNMHDR, "Code") = $NM_CLICK Then ; event is from $hList and it is a $NM_CLICK ; is a Click $aLV_Click_Info = _GUICtrlListView_SubItemHitTest($hList) If $aLV_Click_Info[0] <> -1 Then LogPrint("Click on " & _GUICtrlListView_GetItemText($hList, $aLV_Click_Info[0]) & @CRLF) Else LogPrint("Click on empty" & @CRLF) EndIf EndIf ; what follows will check if it is a doubleClick and if is comming from the listview If HWnd(DllStructGetData($tNMHDR, "hWndFrom")) = $hList And DllStructGetData($tNMHDR, "Code") = $NM_DBLCLK Then ; event is from $hList and it is a $NM_DBLCLK ; is a DoubleClick $aLV_Click_Info = _GUICtrlListView_SubItemHitTest($hList) If $aLV_Click_Info[0] <> -1 Then LogPrint("DoubleClick on " & _GUICtrlListView_GetItemText($hList, $aLV_Click_Info[0]) & @CRLF) Else LogPrint("DoubleClick on empty" & @CRLF) EndIf SoundPlay("") SoundPlay(_GUICtrlListView_GetItemText($hList, $aLV_Click_Info[0])) ControlFocus("", "", $Input1) ; set focus on Input1 EndIf Return ; $GUI_RUNDEFMSG EndFunc ;==>_Check_Click ControlFocus("", "", $Input1) ; set focus on Input1 ; ---- MAIN LOOP ---- While 1 Sleep(1000) WEnd ; ---- END MAIN LOOP ---- Func _MyEnterFunc() ; This function is called everytime the "Enter" key is pressed in the $Input1 control Local $qry = _GUICtrlEdit_GetText($Input1) LogPrint('received "' & $qry & '" passing request to browser.....' & @CRLF) _IE_ref_refresh() _IEFormElementSetValue($oInputFile, $qry) _IEAction($oQuery, "click") Do Until Not _IEPropertyGet($oIE, "busy") LogPrint("Query sent using http://mp3skull.com" & @CRLF) _GUICtrlListView_DeleteAllItems(GUICtrlGetHandle($compilation)) $oLinks = "" LogPrint("wait response for 3 seconds" & @CRLF) Sleep(3000) $oLinks = _IELinkGetCollection($oIE) Local $iNumLinks = @extended LogPrint("Links loaded " & @CRLF) _IEAction($oIE, "stop") Local $row = 0 If $iNumLinks Then For $oLink In $oLinks If StringRight($oLink.href, 4) = ".mp3" Then _GUICtrlListView_AddItem($compilation, $oLink.href, $row) $row += 1 EndIf Next EndIf LogPrint("ListView populated with " & $row & " songs" & @CRLF) ControlFocus("", "", $Input1) ; set focus on Input1 EndFunc ;==>_MyEnterFunc Func StopButton() SoundPlay("") ; Stop playing music EndFunc ;==>StopButton Func LogPrint($line) ; _GUICtrlTab_ActivateTab($PageControl1,1) _GUICtrlTab_SetCurFocus($PageControl1, 1) If StringLen(GUICtrlRead($crtLog1)) > 25000 Then ; Max Len of a CtrlBox is 30000 char _GUICtrlEdit_SetText($crtLog1, StringRight(GUICtrlRead($crtLog1), 20000)) ; short the content of CtrlBox to 20000 char EndIf _GUICtrlEdit_AppendText($crtLog1, @HOUR & ":" & @MIN & ":" & @SEC & " " & $line) EndFunc ;==>LogPrint Func _IE_ref_refresh() ; http://mp3skull.com ; <form id="f1" method="GET" action="/search.php" $oForm = _IEFormGetObjByName($oIE, "f1") ; <input id="sfrm" type="text" style="font-size:18px; vertical-align:middle; width:470px;" value="" autocomplete="off" name="q"></input> $oInputFile = _IEFormElementGetObjByName($oForm, "sfrm") ; <input id="search_button" type="submit" style="font-size:18px; vertical-align:middle;" value="Search"></input> $oQuery = _IEFormElementGetObjByName($oForm, "search_button") EndFunc ;==>_IE_ref_refresh Func Bye() _IEQuit($oIE) Exit EndFunc ;==>Bye EDIT: bug removed from listing (thanks to >UEZ)
    1 point
  3. Hi ! Here's a short code that creates a MsgBox with a "don't show this message anymore" checkbox. Also provided, a function to clear this setting. Moreover, at the end of the script you'll find a GUID generator : you will have to use a different one for each of yours msgboxes, otherwise the "don't show..." will apply everywhere (and none of your boxes will show !) In the following code, uncomment the eighth line (;_RestoreDefaultSettings()) to clear the settings. $hGui=GUICreate("GUI principale", 300, 300) GUISetState() Local $sIdentifier = "{315Ef1E9-1078-4E74-8AB4-171BE0D793E71}" Local $iDefault = 1 ;_RestoreDefaultSettings() $msgNr=_MessageBoxCheck(33, 'TITRE', 'Bonjour,'&@CRLF&'Qui es-tu, toi qui joue avec le registre ?', $sIdentifier, $iDefault, $hGui) ConsoleWrite('MsgBox returned : '&$msgNr) ; #FUNCTION# ================================================================================================= ; Name...........: _MessageBoxCheck ; Description ...: Creates a MessageBox with a "Do not show me this message again" checkbox. ; Syntax.........: _MessageBoxCheck($iFlag, $sTitle, $sText, $sIdentifier, $iDefault, $hWnd, $iTimeout = 0) ; Parameters....: $iFlag - MsgBox flag ; $sTitle - MsgBox title ; $sText - MsgBox text ; $sIdentifier - Unique GUID, that identifies the MsgBox in the registry (for the "Do not show..." setting) ; $iDefault - Default button ; $hWnd - MsgBox's parent ; $iTimeout - Timeout value ; Return values .: Success - The index of the button ; Author ........: Perceval FARAMAZ (perfaram) ; Remarks .......: This function will create an classic MsgBox in case the MessageBoxCheckW interface is not available ; ================================================================================================= Func _MessageBoxCheck($iFlag, $sTitle, $sText, $sIdentifier, $iDefault, $hWnd, $iTimeout = 0) Local $msgN_Call = DllCall("shlwapi.dll", "int", "SHMessageBoxCheckW", _ "hwnd", $hWnd, "wstr", $sText, "wstr", $sTitle, _ "dword", $iFlag, "int", $iDefault, "wstr", $sIdentifier) If @error Or $msgN_Call[0] = -1 Then $iRet=MsgBox($iFlag, $sTitle, $sText, $iTimeout, $hWnd) Return SetError(1, 0, $iRet) ;fallback EndIf Return $msgN_Call[0] EndFunc ; #FUNCTION# ================================================================================================= ; Name...........: _RestoreDefaultSettings ; Description ...: Clear user's setting for "Do not show me this message again" checkbox. ; Author ........: Perceval FARAMAZ (perfaram) ; Remarks .......: You must change the GUID (in the registry path below), to match the one you used to call the MsgBoxCheck ; ================================================================================================= Func _RestoreDefaultSettings() RegDelete("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\DontShowMeThisDialogAgain", "{315Ef1E9-1078-4E74-8AB4-171BE0D793E71}") EndFunc ;taken from : http://www.autoitscript.com/forum/topic/134387-version-4-uuid-generator/ Func uuid() Return StringFormat('%04x%04x-%04x-%04x-%04x-%04x%04x%04x', _ Random(0, 0xffff), Random(0, 0xffff), _ Random(0, 0xffff), _ BitOR(Random(0, 0x0fff), 0x4000), _ BitOR(Random(0, 0x3fff), 0x8000), _ Random(0, 0xffff), Random(0, 0xffff), Random(0, 0xffff) _ ) EndFunc That's all, folks !
    1 point
  4. jchd

    AutoIt v3.3.11.4 Beta

    There is indeed significant dispersion in timed values. Local Const $limit = 50000 Local $values[51] Local $t, $n For $i = 1 To $limit $t = TimerInit() Sleep(10) $n = Round(TimerDiff($t)) $values[$n] += 1 Next For $i = 0 To UBound($values) - 1 $t = $values[$i] If $t Then $n = Round((800 * $t) / $limit) / 8 $values[$i] = (Int($n / 8)) ? _StringRepeat(ChrW(0x2588), Int($n / 8)) : '' $n = Mod($n, 8) If $n Then $values[$i] &= ChrW(0x2588 + 8 - $n) $values[$i] &= ' ' & $t EndIf Next _ArrayDisplay($values) I've found the need to increase possible times to 50ms since I've encountered values > 35ms. The sample above was obtained while doing other foreground task.
    1 point
  5. zamboni128, This is usually caused by a label overlapping the button - when 2 controls overlap AutoIt does not know which to action and so ignores both. When I look at your code I see this is indeed the case - colouring the label lets you see what is happening: $hProcessLabel4_1 = GUICtrlCreateLabel("0%", $iSettingsAreaLeft + 530, $iProgressAreaTop + 90,100,20,$SS_LEFT) GUICtrlSetBkColor(-1, 0xFF0000) ; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< Reduce the width of the label and the button becomes fully active - you can actually use the right edge now. If controls appear not to react the first check should always be for label overlap - it is most often the culprit. M23
    1 point
  6. JLogan3o13

    Unzip with 7za.exe

    You have bad placement of quotes. Run this, and you will see where your error is: ConsoleWrite(@DesktopDir&'\7za.exe x ' & @DesktopDir & '\Maps.zip "-o' & @MyDocumentsDir & '\Command and Conquer Generals Zero Hour Data"' & @CRLF)
    1 point
×
×
  • Create New...