Jump to content

yutijang

Members
  • Posts

    6
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

yutijang's Achievements

Seeker

Seeker (1/7)

1

Reputation

  1. @argumentum Thank you for the quick response! After further research, it seems that a machine learning process is required to either add or create new content for the objects in the .weights file.
  2. Hello, thank you for sharing this awesome UDF! How can I train it to recognize new objects, specifically the ones I designate for the UDF to detect?
  3. Hello, I found solution, i do not know if it's right or not but it working for me. It's here Func _WM_NOTIFY($hWnd, $iMsg, $wParam, $lParam) #forceref $hWnd, $iMsg, $wParam Local $hWndFrom, $iIDFrom, $iCode, $tNMHDR, $hWndListView, $tInfo $hWndListView = $hListView If Not IsHWnd($hListView) Then $hWndListView = GUICtrlGetHandle($hListView) $tNMHDR = DllStructCreate($tagNMHDR, $lParam) $hWndFrom = HWnd(DllStructGetData($tNMHDR, "hWndFrom")) $iIDFrom = DllStructGetData($tNMHDR, "IDFrom") $iCode = DllStructGetData($tNMHDR, "Code") Switch $hWndFrom Case $hWndListView Switch $iCode Case $LVN_KEYDOWN $tStruct = DllStructCreate($tagNMLVKEYDOWN, $lParam) $iKey = DllStructGetData($tStruct, "VKey") Switch $iKey Case 38 ;Up key Case 40 ;Down key Case 46 ;Delete key _GUICtrlListView_DeleteItemsSelected($hListView) EndSwitch Case $NM_CLICK ;Left click ;MsgBox(0,"","") Case $NM_RCLICK ; Right click. Sent by a list-view control when the user clicks an item with the left mouse button ListView_RClick() Return 0 EndSwitch Case Else Local $tNMHEADER = DllStructCreate($tagNMHEADER, $lParam) ; Look for header resize code $iCode = DllStructGetData($tNMHEADER, "Code") Switch $iCode Case $HDN_BEGINTRACKW ; Now get column being resized Local $iCol = DllStructGetData($tNMHEADER, "Item") If $iCol = 0 Or $iCol = 1 Then ; Prevent resizing Return True Else ; Allow resizing Return False EndIf EndSwitch EndSwitch $tNMHDR = 0 $hWndFrom = 0 $iIDFrom = 0 $iCode = 0 Return $GUI_RUNDEFMSG EndFunc ;==>WM_NOTIFY Thanks for reading! Sorry for my bad English.
  4. Hello everyone! I have two function WM_NOTIFY, the one use for restrict change column width on list view. Another one use for Vkey, left click, right click on list view items. I found them in this great forum. So, how i mix them to one function only? Func _WM_NOTIFY_($hWnd, $iMsg, $wParam, $lParam) ; Get details of message Local $tNMHEADER = DllStructCreate($tagNMHEADER, $lParam) ; Look for header resize code $iCode = DllStructGetData($tNMHEADER, "Code") Switch $iCode Case $HDN_BEGINTRACKW ; Now get column being resized Local $iCol = DllStructGetData($tNMHEADER, "Item") If $iCol = 0 Or $iCol = 1 Then ; Prevent resizing Return True Else ; Allow resizing Return False EndIf EndSwitch EndFunc Func _WM_NOTIFY($hWnd, $iMsg, $wParam, $lParam) #forceref $hWnd, $iMsg, $wParam Local $hWndFrom, $iIDFrom, $iCode, $tNMHDR, $hWndListView, $tInfo $hWndListView = $hListView If Not IsHWnd($hListView) Then $hWndListView = GUICtrlGetHandle($hListView) $tNMHDR = DllStructCreate($tagNMHDR, $lParam) $hWndFrom = HWnd(DllStructGetData($tNMHDR, "hWndFrom")) $iIDFrom = DllStructGetData($tNMHDR, "IDFrom") $iCode = DllStructGetData($tNMHDR, "Code") Switch $hWndFrom Case $hWndListView Switch $iCode Case $LVN_KEYDOWN $tStruct = DllStructCreate($tagNMLVKEYDOWN, $lParam) $iKey = DllStructGetData($tStruct, "VKey") Switch $iKey Case 38 ;Up key Case 40 ;Down key Case 46 ;Delete key _GUICtrlListView_DeleteItemsSelected($hListView) EndSwitch Case $NM_CLICK ;Left click ;MsgBox(0,"","") Case $NM_RCLICK ; Right click. Sent by a list-view control when the user clicks an item with the left mouse button ListView_RClick() Return 0 EndSwitch EndSwitch $tNMHDR = 0 $hWndFrom = 0 $iIDFrom = 0 $iCode = 0 Return $GUI_RUNDEFMSG EndFunc ;==>WM_NOTIFY I tried mix them and failed, i do not know any solution for this. Hope for yours help! Thank so much! Sorry for my English.
  5. How about this #include <GUIConstants.au3> #include <MsgBoxConstants.au3> Opt("GUIOnEventMode", 1) Global const $hGUI1_Title = "Gui 1" Global const $hGUI2_Title = "Gui 2" $hGUI1 = GUICreate($hGUI1_Title, 200, 200, 100, 100) GUISetOnEvent($GUI_EVENT_CLOSE, "On_Close") Local $idButton2 = GUICtrlCreateButton("Show Gui 2", 10, 60, 80, 30) GUICtrlSetOnEvent(-1, "ShowGUI2") GUISetState(@SW_SHOW) Local $hGUI2 = GUICreate($hGUI2_Title, 200, 200, 350, 350) GUISetOnEvent($GUI_EVENT_CLOSE, "On_Close") GUISetState(@SW_HIDE) While 1 Sleep(10) WEnd Func ShowGUI2() Local $pos_hGUI1 = WinGetPos($hGUI1_Title) WinMove($hGUI2, "", $pos_hGUI1[0], $pos_hGUI1[1]) GUISetState(@SW_SHOW, $hGUI2) GUISetState(@SW_HIDE, $hGUI1) EndFunc Func On_Close() Switch @GUI_WinHandle Case $hGUI1 Exit Case $hGUI2 Local $pos_hGUI2 = WinGetPos($hGUI2_Title) WinMove($hGUI1, "", $pos_hGUI2[0], $pos_hGUI2[1]) GUISetState(@SW_SHOW, $hGUI1) GUISetState(@SW_HIDE, $hGUI2) EndSwitch EndFunc
  6. Convert your image to binary strings, put it in your main script and compile, i think
×
×
  • Create New...