Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 07/03/2020 in all areas

  1. a possible way #include <WinAPISys.au3> #include <WindowsConstants.au3> GUICreate("Test", 100, 80, 50, 50, -1, $WS_EX_TOPMOST) Global $hBtn = GUICtrlCreateButton("Kill it", 10, 10, 80, 60) GUISetState() ; set up a call to the button control function ; it is also called regardless RunWait() pauses the execution of the script ; ----------------------------------------- $hTimerProc = DllCallbackRegister('_Check_button', 'none', 'hwnd;uint;uint_ptr;dword') $iTimerID = _WinAPI_SetTimer(0, 0, 50, DllCallbackGetPtr($hTimerProc)) ; run your program with long-term execution (this one is an endless ping example) RunWait("ping.exe localhost -t") ; use ffmpeg.exe here instead MsgBox(0, "Done", "Program killed") Func _Check_button($hWnd, $iMsg, $iTimerID, $iTime) #forceref $hWnd, $iMsg, $iTimerID, $iTime If GUIGetMsg() = $hBtn Then _WinAPI_KillTimer(0, $iTimerID) ; stop checking the button ProcessClose("Ping.exe") ; use ffmpeg.exe here instead EndIf EndFunc ;==>_Check_button
    2 points
  2. Very much appreciated. Follow your advice , Now it Works good.
    1 point
  3. Try this : Global $sOrig, $sConv $sOrig = "?q=Kim+lo%E1%BA%A1i" $sConv = _Decode($sOrig) MsgBox(BitOR(4096,64), "Conversion :", "Original " & $sOrig & @CRLF & "Converted " & $sConv) Func _Decode($sData) Local $aData = StringSplit($sData,"%") $sData = "" For $i = 2 To $aData[0] $aData[1] &= Chr(Dec(StringLeft($aData[$i],2))) & StringTrimLeft($aData[$i],2) Next Return BinaryToString(StringToBinary($aData[1],1),4) EndFunc @ngocthang26 EDIT : Show result in a MsgBox (not as ConsoleWrites)
    1 point
  4. Subz

    Search ListView

    Basic example: #include <Array.au3> #include <GUIConstantsEx.au3> #include <GuiListView.au3> #include <WindowsConstants.au3> Global $g_idListView, $g_idSearch Example() Func Example() GUICreate("listview items", 220, 250) $g_idListView = GUICtrlCreateListView("Section Name|Description", 10, 10, 200, 150) ;,$LVS_SORTDESCENDING) Local $idButton = GUICtrlCreateButton("Search", 75, 170, 70, 20) Local $idItem1 = GUICtrlCreateListViewItem("item2|col22|col23", $g_idListView) Local $idItem2 = GUICtrlCreateListViewItem("item1|col12|col13", $g_idListView) Local $idItem3 = GUICtrlCreateListViewItem("item3|col32|col33", $g_idListView) $g_idSearch = GUICtrlCreateInput("", 20, 200, 150) GUISetState(@SW_SHOW) While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE ExitLoop Case $idButton _Search() EndSwitch WEnd EndFunc Func _Search() Local $sSearch = GUICtrlRead($g_idSearch) ;~ No Search text added, so return to Gui If StringStripWS($sSearch, 8) = "" Then Return Local $sConfig = @ScriptDir & "\Config.ini" Local $sDesc, $aSectionNames = IniReadSectionNames($sConfig) If @error Then Return ;~ Delete all items from the list view _GUICtrlListView_DeleteAllItems($g_idListView) For $i = 1 To $aSectionNames[0] If StringInStr($aSectionNames[$i], $sSearch) Then $sDesc = IniRead($sConfig, $aSectionNames[$i], "Desc", "") If StringStripWS($sDesc, 8) = "" Then ContinueLoop GUICtrlCreateListViewItem($aSectionNames[$i] & "|" & $sDesc, $g_idListView) EndIf Next EndFunc
    1 point
  5. @Letraindusoir You can include the following in the goog:ChromeOptions: "excludeSwitches": ["enable-automation"], "useAutomationExtension": false My current wording of $sDesiredCapabilities looks like this and it works for me. $sDesiredCapabilities = '{"capabilities": {"alwaysMatch": {"unhandledPromptBehavior": "ignore", ' & _ '"goog:chromeOptions": {"w3c": true, "excludeSwitches": ["enable-automation"], "useAutomationExtension": false, ' & _ '"prefs": {"credentials_enable_service": false}, "args": ["start-maximized"] }}}}'
    1 point
  6. So far nobody helped so either your question is not clear or you have not shown effort what you tried. Your question seems to be create a treeview in a json similar layout and details should be shown out of an array. If thats the question just Take example in help file or search forum for treeview. Show what you tried and you will get more help and suggestions.
    1 point
  7. (Sorry I know I'm about 500 years late to the party here) If you really want to use pre-ES6 syntax var Model = (function () { function Model(name) { this.model = document.createElement("div"); } Model.prototype.append = function (parent) { document.getElementById(parent).appendChild(this.model); }; return Model; }());
    1 point
×
×
  • Create New...