Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 11/02/2019 in all areas

  1. ISI360

    ISN AutoIt Studio

    Ok thanks. I will check that.. You can activate the dark theme in the program settings -> Display -> Skin. EDIT: Can confirm the toolbar bug. Will be fixed in the next update.
    1 point
  2. Does the DDNS update API require a POST or can you use a GET? If you can use a GET, then it is much simpler to use the InetRead() function than it is to run an external command.
    1 point
  3. Thanks everyone for your efforts! After playing with all the different approaches I still have the impression that it is some overhead (in coding and during run time) just to get the name of the currently running function. Pitty there is no macro for this. I have played with a very simple solution: The error number needs to be unique in the scope of the UDF. Now the error numbers are created like this nnmm: nn is the number assigned to a function, mm is the existing error number. So @error = 5 in the 15th function of the UDF becomes @error = 1505 (the limitation of 99 errors shouldn't be a problem). I have already updated the TaskScheduler UDF and all example scripts now provide @error and @extended and the full error text. Hope to soon release the new version for you to play with! Thanks for taking the time to find a solution
    1 point
  4. Thanks for detailed explanation. I use Koda actively and I have the problem you described too, so I can understand your goal very well.
    1 point
  5. Request: to apply the background color to style.errorlist.32=back:#color,$(font.monospace) when applied, so the console also has the change ( or a control just for that, but either way is ok ), from the SciTE Config utility. i'm not sure who maintains the code for that ( @Jos or @Melba23 ). Thanks =)
    1 point
  6. Just a small comment to this thread. With Yashied's solution in post #16 you can get NM_RETURN notifications in both a ListView and a TreeView.
    1 point
  7. In order to use the return key in ListView, you must replace its default WindowProc procedure as follows. Func _WindowProc($hWnd, $iMsg, $wParam, $lParam) Switch $iMsg Case $WM_GETDLGCODE Switch $wParam Case $VK_RETURN Return $DLGC_WANTALLKEYS EndSwitch EndSwitch Return _WinAPI_CallWindowProc($pDefWindowProc, $hWnd, $iMsg, $wParam, $lParam) EndFunc ;==>_WindowProc But unfortunately DllCallbackRegister() will not work properly here. But you can write your own DLL. Global Comctl32.l = OpenLibrary(#PB_Any, "comctl32.dll") ProcedureDLL.i SubclassProc(*HWnd, Msg.l, *WParam, *LParam, *ID, *IParam) Select Msg Case #WM_GETDLGCODE Select *WParam Case #VK_RETURN ProcedureReturn #DLGC_WANTALLKEYS EndSelect EndSelect ProcedureReturn CallFunction(Comctl32, "DefSubclassProc", *HWnd, Msg, *WParam, *LParam) EndProcedure WSP.dll And a simple example. #Include <APIConstants.au3> #Include <GUIListView.au3> #Include <GUIConstantsEx.au3> #Include <ListViewConstants.au3> #Include <WinAPIEx.au3> OnAutoItExitRegister('AutoItExit') $hForm = GUICreate('MyGUI', 300, 300) $hLV = GUICtrlGetHandle(GUICtrlCreateListView('Name', 0, 0, 300, 300, -1, 0)) For $i = 1 To 4 _GUICtrlListView_AddItem($hLV, 'Item' & $i) Next $hDll = _WinAPI_LoadLibrary(@ScriptDir & 'WSP.dll') If $hDll Then $pSubclassProc = _WinAPI_GetProcAddress($hDll, 'SubclassProc') If Not @error Then _WinAPI_SetWindowSubclass($hLV, $pSubclassProc, 1000) Else _WinAPI_FreeLibrary($hDll) EndIf EndIf $Dummy = GUIctrlCreateDummy() GUIRegisterMsg($WM_NOTIFY, 'WM_NOTIFY') GUISetState() While 1 Switch GUIGetMsg() Case 0 ContinueLoop Case $GUI_EVENT_CLOSE Exit Case $Dummy MsgBox(0, '', _GUICtrlListView_GetItemText($hLV, GUICtrlRead($Dummy)) & ' is activated.') EndSwitch WEnd Func WM_NOTIFY($hWnd, $iMsg, $wParam, $lParam) Local $tNMIA = DllStructCreate($tagNMITEMACTIVATE, $lParam) Local $hTarget = DllStructGetData($tNMIA, 'hWndFrom') Local $ID = DllStructGetData($tNMIA, 'Code') Switch $hTarget Case $hLV Switch $ID Case $LVN_ITEMACTIVATE Local $Item = DllStructGetData($tNMIA, 'Index') If _GUICtrlListView_GetItemSelected($hLV, $Item) Then GUICtrlSendToDummy($Dummy, $Item) EndIf EndSwitch EndSwitch Return $GUI_RUNDEFMSG EndFunc ;==>WM_NOTIFY Func AutoItExit() If $pSubclassProc Then _WinAPI_RemoveWindowSubclass($hLV, $pSubclassProc, 1000) EndIf EndFunc ;==>AutoItExit @Melba23 Yes it works, but it has several drawbacks: _GUICtrlListView_GetSelectedIndices() may be too slow for a large number of items.You should check the current focus.
    1 point
×
×
  • Create New...