Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 08/18/2015 in all areas

  1. If you comment out the WM_NOTIFY GUIRegisterMsg, does the script still hang? At a quick glance, your WM_NOTIFY looks OK, and shouldn't hang the program (although I don't know what Ticket_ShowTicketID() does. Side note.. a ticket system? Fun been rolling around a framework in my head for one myself.
    1 point
  2. I'm not going to do tests the OP already should have done before posting. I just point him into the right direction so he may learn something new today
    1 point
  3. #Include <GUIConstantsEx.au3> $Form1 = GUICreate("FruitMachine", 170, 235, 190, 200) local $fruit[5] $addfruit = GUICtrlCreateButton("Add", 21, 170, 130, 30) $fruitinput = GUICtrlCreateInput("Fruit", 21, 145, 130, 20) $selectfruit = GUICtrlCreateCombo($fruit, 21, 95, 130, 20) GUISetState() While True $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $addfruit __UpdateCombo() ;~ _ArrayInsert($fruit, UBound(($usernames)),GUICtrlRead($fruitinput)) endswitch ;~ for $i = 0 to $i-1 step 1 ;~ GUICtrlSetData($selectfruit, $fruit[$i]) #supposed to update combo box ;~ Next WEnd Func __UpdateCombo() Local $sFruit = GUICtrlRead($fruitinput) If Not $sFruit = "" Then GUICtrlSetData($selectfruit,$sFruit) EndFuncA little tip.....One post is all that is required.
    1 point
  4. water

    Ip Blocker

    Could you please give us a bit more information?
    1 point
  5. I struggled with this for quite a bit until I came up with this, works wonderfully (the code was originally posted somewhere else for one listview, I think. No idea who to credit). Note the switch for each $lstView (originally $lstApproved, $lstDeclined, $lstMisc) that get assigned to $hWndListView, $hWndListView2, $hWndListView. From there, its a matter of the $iCode, and then the Case for each thing that can happen. Add code as needed. Im my Case, when they doubleclick, it calls ShowTXNFile() with some parameters. Func WM_NOTIFY($hWnd, $iMsg, $iwParam, $ilParam) #forceref $hWnd, $iMsg, $iwParam Local $hWndFrom, $iIDFrom, $iCode, $tNMHDR, $hWndListView, $hWndListView2, $hWndListView3, $tInfo $hWndListView = $lstApproved If Not IsHWnd($lstApproved) Then $hWndListView = GUICtrlGetHandle($lstApproved) $hWndListView2 = $lstDeclined If Not IsHWnd($lstDeclined) Then $hWndListView2 = GUICtrlGetHandle($lstDeclined) $hWndListView3 = $lstMisc If Not IsHWnd($lstMisc) Then $hWndListView3 = GUICtrlGetHandle($lstMisc) $tNMHDR = DllStructCreate($tagNMHDR, $ilParam) $hWndFrom = HWnd(DllStructGetData($tNMHDR, "hWndFrom")) $iIDFrom = DllStructGetData($tNMHDR, "IDFrom") $iCode = DllStructGetData($tNMHDR, "Code") Switch $hWndFrom Case $hWndListView Switch $iCode Case $LVN_COLUMNCLICK ; A column was clicked $tInfo = DllStructCreate($tagNMLISTVIEW, $ilParam) _GUICtrlListView_SortItems($hWndFrom, DllStructGetData($tInfo, "SubItem")) _DebugPrint("$LVN_COLUMNCLICK" & @CRLF & "--> hWndFrom:" & @TAB & $hWndFrom & @CRLF & _ "-->IDFrom:" & @TAB & $iIDFrom & @CRLF & _ "-->Code:" & @TAB & $iCode & @CRLF & _ "-->Item:" & @TAB & DllStructGetData($tInfo, "Item") & @CRLF & _ "-->SubItem:" & @TAB & DllStructGetData($tInfo, "SubItem") & @CRLF & _ "-->NewState:" & @TAB & DllStructGetData($tInfo, "NewState") & @CRLF & _ "-->OldState:" & @TAB & DllStructGetData($tInfo, "OldState") & @CRLF & _ "-->Changed:" & @TAB & DllStructGetData($tInfo, "Changed") & @CRLF & _ "-->ActionX:" & @TAB & DllStructGetData($tInfo, "ActionX") & @CRLF & _ "-->ActionY:" & @TAB & DllStructGetData($tInfo, "ActionY") & @CRLF & _ "-->Param:" & @TAB & DllStructGetData($tInfo, "Param")) ; No return value Case $LVN_DELETEITEM ; An item is about to be deleted $tInfo = DllStructCreate($tagNMLISTVIEW, $ilParam) _DebugPrint("$LVN_DELETEITEM" & @CRLF & "--> hWndFrom:" & @TAB & $hWndFrom & @CRLF & _ "-->IDFrom:" & @TAB & $iIDFrom & @CRLF & _ "-->Code:" & @TAB & $iCode & @CRLF & _ "-->Item:" & @TAB & DllStructGetData($tInfo, "Item") & @CRLF & _ "-->SubItem:" & @TAB & DllStructGetData($tInfo, "SubItem") & @CRLF & _ "-->NewState:" & @TAB & DllStructGetData($tInfo, "NewState") & @CRLF & _ "-->OldState:" & @TAB & DllStructGetData($tInfo, "OldState") & @CRLF & _ "-->Changed:" & @TAB & DllStructGetData($tInfo, "Changed") & @CRLF & _ "-->ActionX:" & @TAB & DllStructGetData($tInfo, "ActionX") & @CRLF & _ "-->ActionY:" & @TAB & DllStructGetData($tInfo, "ActionY") & @CRLF & _ "-->Param:" & @TAB & DllStructGetData($tInfo, "Param")) ; No return value Case $LVN_HOTTRACK ; Sent by a list-view control when the user moves the mouse over an item $tInfo = DllStructCreate($tagNMLISTVIEW, $ilParam) ListView_HOTTRACK(DllStructGetData($tInfo, "SubItem")) ; _DebugPrint("$LVN_HOTTRACK" & @CRLF & "--> hWndFrom:" & @TAB & $hWndFrom & @CRLF & _ ; "-->IDFrom:" & @TAB & $iIDFrom & @CRLF & _ ; "-->Code:" & @TAB & $iCode & @CRLF & _ ; "-->Item:" & @TAB & DllStructGetData($tInfo, "Item") & @CRLF & _ ; "-->SubItem:" & @TAB & DllStructGetData($tInfo, "SubItem") & @CRLF & _ ; "-->NewState:" & @TAB & DllStructGetData($tInfo, "NewState") & @CRLF & _ ; "-->OldState:" & @TAB & DllStructGetData($tInfo, "OldState") & @CRLF & _ ; "-->Changed:" & @TAB & DllStructGetData($tInfo, "Changed") & @CRLF & _ ; "-->ActionX:" & @TAB & DllStructGetData($tInfo, "ActionX") & @CRLF & _ ; "-->ActionY:" & @TAB & DllStructGetData($tInfo, "ActionY") & @CRLF & _ ; "-->Param:" & @TAB & DllStructGetData($tInfo, "Param")) Return 0 ; allow the list view to perform its normal track select processing. ;Return 1 ; the item will not be selected. Case $LVN_KEYDOWN ; A key has been pressed $tInfo = DllStructCreate($tagNMLVKEYDOWN, $ilParam) _DebugPrint("$LVN_KEYDOWN" & @CRLF & "--> hWndFrom:" & @TAB & $hWndFrom & @CRLF & _ "-->IDFrom:" & @TAB & $iIDFrom & @CRLF & _ "-->Code:" & @TAB & $iCode & @CRLF & _ "-->VKey:" & @TAB & DllStructGetData($tInfo, "VKey") & @CRLF & _ "-->Flags:" & @TAB & DllStructGetData($tInfo, "Flags")) ; No return value Case $NM_CLICK ; Sent by a list-view control when the user clicks an item with the left mouse button $tInfo = DllStructCreate($tagNMITEMACTIVATE, $ilParam) _DebugPrint("$NM_CLICK" & @CRLF & "--> hWndFrom:" & @TAB & $hWndFrom & @CRLF & _ "-->IDFrom:" & @TAB & $iIDFrom & @CRLF & _ "-->Code:" & @TAB & $iCode & @CRLF & _ "-->Index:" & @TAB & DllStructGetData($tInfo, "Index") & @CRLF & _ "-->SubItem:" & @TAB & DllStructGetData($tInfo, "SubItem") & @CRLF & _ "-->NewState:" & @TAB & DllStructGetData($tInfo, "NewState") & @CRLF & _ "-->OldState:" & @TAB & DllStructGetData($tInfo, "OldState") & @CRLF & _ "-->Changed:" & @TAB & DllStructGetData($tInfo, "Changed") & @CRLF & _ "-->ActionX:" & @TAB & DllStructGetData($tInfo, "ActionX") & @CRLF & _ "-->ActionY:" & @TAB & DllStructGetData($tInfo, "ActionY") & @CRLF & _ "-->lParam:" & @TAB & DllStructGetData($tInfo, "lParam") & @CRLF & _ "-->KeyFlags:" & @TAB & DllStructGetData($tInfo, "KeyFlags")) ; No return value Case $NM_DBLCLK ; Sent by a list-view control when the user double-clicks an item with the left mouse button $tInfo = DllStructCreate($tagNMITEMACTIVATE, $ilParam) ShowTXNFile($FinalLoadedTXNInfo,_GUICtrlListView_GetItemText($lstApproved, DllStructGetData($tInfo, "Index"),$C_Ref),_GUICtrlListView_GetItemText($lstApproved, DllStructGetData($tInfo, "Index"),$C_Date)) ;~ ShowTXNFile(_GUICtrlListView_GetItemText($lstApproved, DllStructGetData($tInfo, "Index"),$C_FilePTR),_GUICtrlListView_GetItemText($lstApproved, DllStructGetData($tInfo, "Index"),$C_FullTXNData)) _DebugPrint("$NM_DBLCLK" & @CRLF & "--> hWndFrom:" & @TAB & $hWndFrom & @CRLF & _ "-->IDFrom:" & @TAB & $iIDFrom & @CRLF & _ "-->Code:" & @TAB & $iCode & @CRLF & _ "-->Index:" & @TAB & DllStructGetData($tInfo, "Index") & @CRLF & _ "-->SubItem:" & @TAB & DllStructGetData($tInfo, "SubItem") & @CRLF & _ "-->NewState:" & @TAB & DllStructGetData($tInfo, "NewState") & @CRLF & _ "-->OldState:" & @TAB & DllStructGetData($tInfo, "OldState") & @CRLF & _ "-->Changed:" & @TAB & DllStructGetData($tInfo, "Changed") & @CRLF & _ "-->ActionX:" & @TAB & DllStructGetData($tInfo, "ActionX") & @CRLF & _ "-->ActionY:" & @TAB & DllStructGetData($tInfo, "ActionY") & @CRLF & _ "-->lParam:" & @TAB & DllStructGetData($tInfo, "lParam") & @CRLF & _ "-->KeyFlags:" & @TAB & DllStructGetData($tInfo, "KeyFlags")) ; No return value Case $NM_KILLFOCUS ; The control has lost the input focus _DebugPrint("$NM_KILLFOCUS" & @CRLF & "--> hWndFrom:" & @TAB & $hWndFrom & @CRLF & _ "-->IDFrom:" & @TAB & $iIDFrom & @CRLF & _ "-->Code:" & @TAB & $iCode) ; No return value Case $NM_RCLICK ; Sent by a list-view control when the user clicks an item with the right mouse button $tInfo = DllStructCreate($tagNMITEMACTIVATE, $ilParam) _DebugPrint("$NM_RCLICK" & @CRLF & "--> hWndFrom:" & @TAB & $hWndFrom & @CRLF & _ "-->IDFrom:" & @TAB & $iIDFrom & @CRLF & _ "-->Code:" & @TAB & $iCode & @CRLF & _ "-->Index:" & @TAB & DllStructGetData($tInfo, "Index") & @CRLF & _ "-->SubItem:" & @TAB & DllStructGetData($tInfo, "SubItem") & @CRLF & _ "-->NewState:" & @TAB & DllStructGetData($tInfo, "NewState") & @CRLF & _ "-->OldState:" & @TAB & DllStructGetData($tInfo, "OldState") & @CRLF & _ "-->Changed:" & @TAB & DllStructGetData($tInfo, "Changed") & @CRLF & _ "-->ActionX:" & @TAB & DllStructGetData($tInfo, "ActionX") & @CRLF & _ "-->ActionY:" & @TAB & DllStructGetData($tInfo, "ActionY") & @CRLF & _ "-->lParam:" & @TAB & DllStructGetData($tInfo, "lParam") & @CRLF & _ "-->KeyFlags:" & @TAB & DllStructGetData($tInfo, "KeyFlags")) ;Return 1 ; not to allow the default processing Return 0 ; allow the default processing Case $NM_RDBLCLK ; Sent by a list-view control when the user double-clicks an item with the right mouse button $tInfo = DllStructCreate($tagNMITEMACTIVATE, $ilParam) _DebugPrint("$NM_RDBLCLK" & @CRLF & "--> hWndFrom:" & @TAB & $hWndFrom & @CRLF & _ "-->IDFrom:" & @TAB & $iIDFrom & @CRLF & _ "-->Code:" & @TAB & $iCode & @CRLF & _ "-->Index:" & @TAB & DllStructGetData($tInfo, "Index") & @CRLF & _ "-->SubItem:" & @TAB & DllStructGetData($tInfo, "SubItem") & @CRLF & _ "-->NewState:" & @TAB & DllStructGetData($tInfo, "NewState") & @CRLF & _ "-->OldState:" & @TAB & DllStructGetData($tInfo, "OldState") & @CRLF & _ "-->Changed:" & @TAB & DllStructGetData($tInfo, "Changed") & @CRLF & _ "-->ActionX:" & @TAB & DllStructGetData($tInfo, "ActionX") & @CRLF & _ "-->ActionY:" & @TAB & DllStructGetData($tInfo, "ActionY") & @CRLF & _ "-->lParam:" & @TAB & DllStructGetData($tInfo, "lParam") & @CRLF & _ "-->KeyFlags:" & @TAB & DllStructGetData($tInfo, "KeyFlags")) ; No return value Case $NM_RETURN ; The control has the input focus and that the user has pressed the ENTER key _DebugPrint("$NM_RETURN" & @CRLF & "--> hWndFrom:" & @TAB & $hWndFrom & @CRLF & _ "-->IDFrom:" & @TAB & $iIDFrom & @CRLF & _ "-->Code:" & @TAB & $iCode) ; No return value Case $NM_SETFOCUS ; The control has received the input focus _DebugPrint("$NM_SETFOCUS" & @CRLF & "--> hWndFrom:" & @TAB & $hWndFrom & @CRLF & _ "-->IDFrom:" & @TAB & $iIDFrom & @CRLF & _ "-->Code:" & @TAB & $iCode) ; No return value EndSwitch Case $hWndListView2 Switch $iCode Case $LVN_COLUMNCLICK ; A column was clicked $tInfo = DllStructCreate($tagNMLISTVIEW, $ilParam) _GUICtrlListView_SortItems($hWndFrom, DllStructGetData($tInfo, "SubItem")) _DebugPrint("$LVN_COLUMNCLICK" & @CRLF & "--> hWndFrom:" & @TAB & $hWndFrom & @CRLF & _ "-->IDFrom:" & @TAB & $iIDFrom & @CRLF & _ "-->Code:" & @TAB & $iCode & @CRLF & _ "-->Item:" & @TAB & DllStructGetData($tInfo, "Item") & @CRLF & _ "-->SubItem:" & @TAB & DllStructGetData($tInfo, "SubItem") & @CRLF & _ "-->NewState:" & @TAB & DllStructGetData($tInfo, "NewState") & @CRLF & _ "-->OldState:" & @TAB & DllStructGetData($tInfo, "OldState") & @CRLF & _ "-->Changed:" & @TAB & DllStructGetData($tInfo, "Changed") & @CRLF & _ "-->ActionX:" & @TAB & DllStructGetData($tInfo, "ActionX") & @CRLF & _ "-->ActionY:" & @TAB & DllStructGetData($tInfo, "ActionY") & @CRLF & _ "-->Param:" & @TAB & DllStructGetData($tInfo, "Param")) ; No return value Case $LVN_DELETEITEM ; An item is about to be deleted $tInfo = DllStructCreate($tagNMLISTVIEW, $ilParam) _DebugPrint("$LVN_DELETEITEM" & @CRLF & "--> hWndFrom:" & @TAB & $hWndFrom & @CRLF & _ "-->IDFrom:" & @TAB & $iIDFrom & @CRLF & _ "-->Code:" & @TAB & $iCode & @CRLF & _ "-->Item:" & @TAB & DllStructGetData($tInfo, "Item") & @CRLF & _ "-->SubItem:" & @TAB & DllStructGetData($tInfo, "SubItem") & @CRLF & _ "-->NewState:" & @TAB & DllStructGetData($tInfo, "NewState") & @CRLF & _ "-->OldState:" & @TAB & DllStructGetData($tInfo, "OldState") & @CRLF & _ "-->Changed:" & @TAB & DllStructGetData($tInfo, "Changed") & @CRLF & _ "-->ActionX:" & @TAB & DllStructGetData($tInfo, "ActionX") & @CRLF & _ "-->ActionY:" & @TAB & DllStructGetData($tInfo, "ActionY") & @CRLF & _ "-->Param:" & @TAB & DllStructGetData($tInfo, "Param")) ; No return value Case $LVN_HOTTRACK ; Sent by a list-view control when the user moves the mouse over an item $tInfo = DllStructCreate($tagNMLISTVIEW, $ilParam) ListView_HOTTRACK(DllStructGetData($tInfo, "SubItem")) ; _DebugPrint("$LVN_HOTTRACK" & @CRLF & "--> hWndFrom:" & @TAB & $hWndFrom & @CRLF & _ ; "-->IDFrom:" & @TAB & $iIDFrom & @CRLF & _ ; "-->Code:" & @TAB & $iCode & @CRLF & _ ; "-->Item:" & @TAB & DllStructGetData($tInfo, "Item") & @CRLF & _ ; "-->SubItem:" & @TAB & DllStructGetData($tInfo, "SubItem") & @CRLF & _ ; "-->NewState:" & @TAB & DllStructGetData($tInfo, "NewState") & @CRLF & _ ; "-->OldState:" & @TAB & DllStructGetData($tInfo, "OldState") & @CRLF & _ ; "-->Changed:" & @TAB & DllStructGetData($tInfo, "Changed") & @CRLF & _ ; "-->ActionX:" & @TAB & DllStructGetData($tInfo, "ActionX") & @CRLF & _ ; "-->ActionY:" & @TAB & DllStructGetData($tInfo, "ActionY") & @CRLF & _ ; "-->Param:" & @TAB & DllStructGetData($tInfo, "Param")) Return 0 ; allow the list view to perform its normal track select processing. ;Return 1 ; the item will not be selected. Case $LVN_KEYDOWN ; A key has been pressed $tInfo = DllStructCreate($tagNMLVKEYDOWN, $ilParam) _DebugPrint("$LVN_KEYDOWN" & @CRLF & "--> hWndFrom:" & @TAB & $hWndFrom & @CRLF & _ "-->IDFrom:" & @TAB & $iIDFrom & @CRLF & _ "-->Code:" & @TAB & $iCode & @CRLF & _ "-->VKey:" & @TAB & DllStructGetData($tInfo, "VKey") & @CRLF & _ "-->Flags:" & @TAB & DllStructGetData($tInfo, "Flags")) ; No return value Case $NM_CLICK ; Sent by a list-view control when the user clicks an item with the left mouse button $tInfo = DllStructCreate($tagNMITEMACTIVATE, $ilParam) _DebugPrint("$NM_CLICK" & @CRLF & "--> hWndFrom:" & @TAB & $hWndFrom & @CRLF & _ "-->IDFrom:" & @TAB & $iIDFrom & @CRLF & _ "-->Code:" & @TAB & $iCode & @CRLF & _ "-->Index:" & @TAB & DllStructGetData($tInfo, "Index") & @CRLF & _ "-->SubItem:" & @TAB & DllStructGetData($tInfo, "SubItem") & @CRLF & _ "-->NewState:" & @TAB & DllStructGetData($tInfo, "NewState") & @CRLF & _ "-->OldState:" & @TAB & DllStructGetData($tInfo, "OldState") & @CRLF & _ "-->Changed:" & @TAB & DllStructGetData($tInfo, "Changed") & @CRLF & _ "-->ActionX:" & @TAB & DllStructGetData($tInfo, "ActionX") & @CRLF & _ "-->ActionY:" & @TAB & DllStructGetData($tInfo, "ActionY") & @CRLF & _ "-->lParam:" & @TAB & DllStructGetData($tInfo, "lParam") & @CRLF & _ "-->KeyFlags:" & @TAB & DllStructGetData($tInfo, "KeyFlags")) ; No return value Case $NM_DBLCLK ; Sent by a list-view control when the user double-clicks an item with the left mouse button $tInfo = DllStructCreate($tagNMITEMACTIVATE, $ilParam) ShowTXNFile($FinalLoadedTXNInfo,_GUICtrlListView_GetItemText($lstDeclined, DllStructGetData($tInfo, "Index"),$C_Ref),_GUICtrlListView_GetItemText($lstDeclined, DllStructGetData($tInfo, "Index"),$C_Date)) _DebugPrint("$NM_DBLCLK" & @CRLF & "--> hWndFrom:" & @TAB & $hWndFrom & @CRLF & _ "-->IDFrom:" & @TAB & $iIDFrom & @CRLF & _ "-->Code:" & @TAB & $iCode & @CRLF & _ "-->Index:" & @TAB & DllStructGetData($tInfo, "Index") & @CRLF & _ "-->SubItem:" & @TAB & DllStructGetData($tInfo, "SubItem") & @CRLF & _ "-->NewState:" & @TAB & DllStructGetData($tInfo, "NewState") & @CRLF & _ "-->OldState:" & @TAB & DllStructGetData($tInfo, "OldState") & @CRLF & _ "-->Changed:" & @TAB & DllStructGetData($tInfo, "Changed") & @CRLF & _ "-->ActionX:" & @TAB & DllStructGetData($tInfo, "ActionX") & @CRLF & _ "-->ActionY:" & @TAB & DllStructGetData($tInfo, "ActionY") & @CRLF & _ "-->lParam:" & @TAB & DllStructGetData($tInfo, "lParam") & @CRLF & _ "-->KeyFlags:" & @TAB & DllStructGetData($tInfo, "KeyFlags")) ; No return value Case $NM_KILLFOCUS ; The control has lost the input focus _DebugPrint("$NM_KILLFOCUS" & @CRLF & "--> hWndFrom:" & @TAB & $hWndFrom & @CRLF & _ "-->IDFrom:" & @TAB & $iIDFrom & @CRLF & _ "-->Code:" & @TAB & $iCode) ; No return value Case $NM_RCLICK ; Sent by a list-view control when the user clicks an item with the right mouse button $tInfo = DllStructCreate($tagNMITEMACTIVATE, $ilParam) _DebugPrint("$NM_RCLICK" & @CRLF & "--> hWndFrom:" & @TAB & $hWndFrom & @CRLF & _ "-->IDFrom:" & @TAB & $iIDFrom & @CRLF & _ "-->Code:" & @TAB & $iCode & @CRLF & _ "-->Index:" & @TAB & DllStructGetData($tInfo, "Index") & @CRLF & _ "-->SubItem:" & @TAB & DllStructGetData($tInfo, "SubItem") & @CRLF & _ "-->NewState:" & @TAB & DllStructGetData($tInfo, "NewState") & @CRLF & _ "-->OldState:" & @TAB & DllStructGetData($tInfo, "OldState") & @CRLF & _ "-->Changed:" & @TAB & DllStructGetData($tInfo, "Changed") & @CRLF & _ "-->ActionX:" & @TAB & DllStructGetData($tInfo, "ActionX") & @CRLF & _ "-->ActionY:" & @TAB & DllStructGetData($tInfo, "ActionY") & @CRLF & _ "-->lParam:" & @TAB & DllStructGetData($tInfo, "lParam") & @CRLF & _ "-->KeyFlags:" & @TAB & DllStructGetData($tInfo, "KeyFlags")) ;Return 1 ; not to allow the default processing Return 0 ; allow the default processing Case $NM_RDBLCLK ; Sent by a list-view control when the user double-clicks an item with the right mouse button $tInfo = DllStructCreate($tagNMITEMACTIVATE, $ilParam) _DebugPrint("$NM_RDBLCLK" & @CRLF & "--> hWndFrom:" & @TAB & $hWndFrom & @CRLF & _ "-->IDFrom:" & @TAB & $iIDFrom & @CRLF & _ "-->Code:" & @TAB & $iCode & @CRLF & _ "-->Index:" & @TAB & DllStructGetData($tInfo, "Index") & @CRLF & _ "-->SubItem:" & @TAB & DllStructGetData($tInfo, "SubItem") & @CRLF & _ "-->NewState:" & @TAB & DllStructGetData($tInfo, "NewState") & @CRLF & _ "-->OldState:" & @TAB & DllStructGetData($tInfo, "OldState") & @CRLF & _ "-->Changed:" & @TAB & DllStructGetData($tInfo, "Changed") & @CRLF & _ "-->ActionX:" & @TAB & DllStructGetData($tInfo, "ActionX") & @CRLF & _ "-->ActionY:" & @TAB & DllStructGetData($tInfo, "ActionY") & @CRLF & _ "-->lParam:" & @TAB & DllStructGetData($tInfo, "lParam") & @CRLF & _ "-->KeyFlags:" & @TAB & DllStructGetData($tInfo, "KeyFlags")) ; No return value Case $NM_RETURN ; The control has the input focus and that the user has pressed the ENTER key _DebugPrint("$NM_RETURN" & @CRLF & "--> hWndFrom:" & @TAB & $hWndFrom & @CRLF & _ "-->IDFrom:" & @TAB & $iIDFrom & @CRLF & _ "-->Code:" & @TAB & $iCode) ; No return value Case $NM_SETFOCUS ; The control has received the input focus _DebugPrint("$NM_SETFOCUS" & @CRLF & "--> hWndFrom:" & @TAB & $hWndFrom & @CRLF & _ "-->IDFrom:" & @TAB & $iIDFrom & @CRLF & _ "-->Code:" & @TAB & $iCode) ; No return value EndSwitch Case $hWndListView3 Switch $iCode Case $LVN_COLUMNCLICK ; A column was clicked $tInfo = DllStructCreate($tagNMLISTVIEW, $ilParam) _GUICtrlListView_SortItems($hWndFrom, DllStructGetData($tInfo, "SubItem")) _DebugPrint("$LVN_COLUMNCLICK" & @CRLF & "--> hWndFrom:" & @TAB & $hWndFrom & @CRLF & _ "-->IDFrom:" & @TAB & $iIDFrom & @CRLF & _ "-->Code:" & @TAB & $iCode & @CRLF & _ "-->Item:" & @TAB & DllStructGetData($tInfo, "Item") & @CRLF & _ "-->SubItem:" & @TAB & DllStructGetData($tInfo, "SubItem") & @CRLF & _ "-->NewState:" & @TAB & DllStructGetData($tInfo, "NewState") & @CRLF & _ "-->OldState:" & @TAB & DllStructGetData($tInfo, "OldState") & @CRLF & _ "-->Changed:" & @TAB & DllStructGetData($tInfo, "Changed") & @CRLF & _ "-->ActionX:" & @TAB & DllStructGetData($tInfo, "ActionX") & @CRLF & _ "-->ActionY:" & @TAB & DllStructGetData($tInfo, "ActionY") & @CRLF & _ "-->Param:" & @TAB & DllStructGetData($tInfo, "Param")) ; No return value Case $LVN_DELETEITEM ; An item is about to be deleted $tInfo = DllStructCreate($tagNMLISTVIEW, $ilParam) _DebugPrint("$LVN_DELETEITEM" & @CRLF & "--> hWndFrom:" & @TAB & $hWndFrom & @CRLF & _ "-->IDFrom:" & @TAB & $iIDFrom & @CRLF & _ "-->Code:" & @TAB & $iCode & @CRLF & _ "-->Item:" & @TAB & DllStructGetData($tInfo, "Item") & @CRLF & _ "-->SubItem:" & @TAB & DllStructGetData($tInfo, "SubItem") & @CRLF & _ "-->NewState:" & @TAB & DllStructGetData($tInfo, "NewState") & @CRLF & _ "-->OldState:" & @TAB & DllStructGetData($tInfo, "OldState") & @CRLF & _ "-->Changed:" & @TAB & DllStructGetData($tInfo, "Changed") & @CRLF & _ "-->ActionX:" & @TAB & DllStructGetData($tInfo, "ActionX") & @CRLF & _ "-->ActionY:" & @TAB & DllStructGetData($tInfo, "ActionY") & @CRLF & _ "-->Param:" & @TAB & DllStructGetData($tInfo, "Param")) ; No return value Case $LVN_HOTTRACK ; Sent by a list-view control when the user moves the mouse over an item $tInfo = DllStructCreate($tagNMLISTVIEW, $ilParam) ListView_HOTTRACK(DllStructGetData($tInfo, "SubItem")) ; _DebugPrint("$LVN_HOTTRACK" & @CRLF & "--> hWndFrom:" & @TAB & $hWndFrom & @CRLF & _ ; "-->IDFrom:" & @TAB & $iIDFrom & @CRLF & _ ; "-->Code:" & @TAB & $iCode & @CRLF & _ ; "-->Item:" & @TAB & DllStructGetData($tInfo, "Item") & @CRLF & _ ; "-->SubItem:" & @TAB & DllStructGetData($tInfo, "SubItem") & @CRLF & _ ; "-->NewState:" & @TAB & DllStructGetData($tInfo, "NewState") & @CRLF & _ ; "-->OldState:" & @TAB & DllStructGetData($tInfo, "OldState") & @CRLF & _ ; "-->Changed:" & @TAB & DllStructGetData($tInfo, "Changed") & @CRLF & _ ; "-->ActionX:" & @TAB & DllStructGetData($tInfo, "ActionX") & @CRLF & _ ; "-->ActionY:" & @TAB & DllStructGetData($tInfo, "ActionY") & @CRLF & _ ; "-->Param:" & @TAB & DllStructGetData($tInfo, "Param")) Return 0 ; allow the list view to perform its normal track select processing. ;Return 1 ; the item will not be selected. Case $LVN_KEYDOWN ; A key has been pressed $tInfo = DllStructCreate($tagNMLVKEYDOWN, $ilParam) _DebugPrint("$LVN_KEYDOWN" & @CRLF & "--> hWndFrom:" & @TAB & $hWndFrom & @CRLF & _ "-->IDFrom:" & @TAB & $iIDFrom & @CRLF & _ "-->Code:" & @TAB & $iCode & @CRLF & _ "-->VKey:" & @TAB & DllStructGetData($tInfo, "VKey") & @CRLF & _ "-->Flags:" & @TAB & DllStructGetData($tInfo, "Flags")) ; No return value Case $NM_CLICK ; Sent by a list-view control when the user clicks an item with the left mouse button $tInfo = DllStructCreate($tagNMITEMACTIVATE, $ilParam) _DebugPrint("$NM_CLICK" & @CRLF & "--> hWndFrom:" & @TAB & $hWndFrom & @CRLF & _ "-->IDFrom:" & @TAB & $iIDFrom & @CRLF & _ "-->Code:" & @TAB & $iCode & @CRLF & _ "-->Index:" & @TAB & DllStructGetData($tInfo, "Index") & @CRLF & _ "-->SubItem:" & @TAB & DllStructGetData($tInfo, "SubItem") & @CRLF & _ "-->Value:" & @TAB & _GUICtrlListView_GetItemText($lstMisc, DllStructGetData($tInfo, "Index"),DllStructGetData($tInfo, "SubItem")) & @CRLF & _ "-->NewState:" & @TAB & DllStructGetData($tInfo, "NewState") & @CRLF & _ "-->OldState:" & @TAB & DllStructGetData($tInfo, "OldState") & @CRLF & _ "-->Changed:" & @TAB & DllStructGetData($tInfo, "Changed") & @CRLF & _ "-->ActionX:" & @TAB & DllStructGetData($tInfo, "ActionX") & @CRLF & _ "-->ActionY:" & @TAB & DllStructGetData($tInfo, "ActionY") & @CRLF & _ "-->lParam:" & @TAB & DllStructGetData($tInfo, "lParam") & @CRLF & _ "-->KeyFlags:" & @TAB & DllStructGetData($tInfo, "KeyFlags")) ; No return value Case $NM_DBLCLK ; Sent by a list-view control when the user double-clicks an item with the left mouse button $tInfo = DllStructCreate($tagNMITEMACTIVATE, $ilParam) ShowTXNFile($FinalLoadedTXNInfo,_GUICtrlListView_GetItemText($lstMisc, DllStructGetData($tInfo, "Index"),$C_Ref),_GUICtrlListView_GetItemText($lstMisc, DllStructGetData($tInfo, "Index"),$C_Date)) _DebugPrint("$NM_DBLCLK" & @CRLF & "--> hWndFrom:" & @TAB & $hWndFrom & @CRLF & _ "-->IDFrom:" & @TAB & $iIDFrom & @CRLF & _ "-->Code:" & @TAB & $iCode & @CRLF & _ "-->Index:" & @TAB & DllStructGetData($tInfo, "Index") & @CRLF & _ "-->SubItem:" & @TAB & DllStructGetData($tInfo, "SubItem") & @CRLF & _ "-->NewState:" & @TAB & DllStructGetData($tInfo, "NewState") & @CRLF & _ "-->OldState:" & @TAB & DllStructGetData($tInfo, "OldState") & @CRLF & _ "-->Changed:" & @TAB & DllStructGetData($tInfo, "Changed") & @CRLF & _ "-->ActionX:" & @TAB & DllStructGetData($tInfo, "ActionX") & @CRLF & _ "-->ActionY:" & @TAB & DllStructGetData($tInfo, "ActionY") & @CRLF & _ "-->lParam:" & @TAB & DllStructGetData($tInfo, "lParam") & @CRLF & _ "-->KeyFlags:" & @TAB & DllStructGetData($tInfo, "KeyFlags")) ; No return value Case $NM_KILLFOCUS ; The control has lost the input focus _DebugPrint("$NM_KILLFOCUS" & @CRLF & "--> hWndFrom:" & @TAB & $hWndFrom & @CRLF & _ "-->IDFrom:" & @TAB & $iIDFrom & @CRLF & _ "-->Code:" & @TAB & $iCode) ; No return value Case $NM_RCLICK ; Sent by a list-view control when the user clicks an item with the right mouse button $tInfo = DllStructCreate($tagNMITEMACTIVATE, $ilParam) _DebugPrint("$NM_RCLICK" & @CRLF & "--> hWndFrom:" & @TAB & $hWndFrom & @CRLF & _ "-->IDFrom:" & @TAB & $iIDFrom & @CRLF & _ "-->Code:" & @TAB & $iCode & @CRLF & _ "-->Index:" & @TAB & DllStructGetData($tInfo, "Index") & @CRLF & _ "-->SubItem:" & @TAB & DllStructGetData($tInfo, "SubItem") & @CRLF & _ "-->NewState:" & @TAB & DllStructGetData($tInfo, "NewState") & @CRLF & _ "-->OldState:" & @TAB & DllStructGetData($tInfo, "OldState") & @CRLF & _ "-->Changed:" & @TAB & DllStructGetData($tInfo, "Changed") & @CRLF & _ "-->ActionX:" & @TAB & DllStructGetData($tInfo, "ActionX") & @CRLF & _ "-->ActionY:" & @TAB & DllStructGetData($tInfo, "ActionY") & @CRLF & _ "-->lParam:" & @TAB & DllStructGetData($tInfo, "lParam") & @CRLF & _ "-->KeyFlags:" & @TAB & DllStructGetData($tInfo, "KeyFlags")) ;Return 1 ; not to allow the default processing Return 0 ; allow the default processing Case $NM_RDBLCLK ; Sent by a list-view control when the user double-clicks an item with the right mouse button $tInfo = DllStructCreate($tagNMITEMACTIVATE, $ilParam) _DebugPrint("$NM_RDBLCLK" & @CRLF & "--> hWndFrom:" & @TAB & $hWndFrom & @CRLF & _ "-->IDFrom:" & @TAB & $iIDFrom & @CRLF & _ "-->Code:" & @TAB & $iCode & @CRLF & _ "-->Index:" & @TAB & DllStructGetData($tInfo, "Index") & @CRLF & _ "-->SubItem:" & @TAB & DllStructGetData($tInfo, "SubItem") & @CRLF & _ "-->NewState:" & @TAB & DllStructGetData($tInfo, "NewState") & @CRLF & _ "-->OldState:" & @TAB & DllStructGetData($tInfo, "OldState") & @CRLF & _ "-->Changed:" & @TAB & DllStructGetData($tInfo, "Changed") & @CRLF & _ "-->ActionX:" & @TAB & DllStructGetData($tInfo, "ActionX") & @CRLF & _ "-->ActionY:" & @TAB & DllStructGetData($tInfo, "ActionY") & @CRLF & _ "-->lParam:" & @TAB & DllStructGetData($tInfo, "lParam") & @CRLF & _ "-->KeyFlags:" & @TAB & DllStructGetData($tInfo, "KeyFlags")) ; No return value Case $NM_RETURN ; The control has the input focus and that the user has pressed the ENTER key _DebugPrint("$NM_RETURN" & @CRLF & "--> hWndFrom:" & @TAB & $hWndFrom & @CRLF & _ "-->IDFrom:" & @TAB & $iIDFrom & @CRLF & _ "-->Code:" & @TAB & $iCode) ; No return value Case $NM_SETFOCUS ; The control has received the input focus _DebugPrint("$NM_SETFOCUS" & @CRLF & "--> hWndFrom:" & @TAB & $hWndFrom & @CRLF & _ "-->IDFrom:" & @TAB & $iIDFrom & @CRLF & _ "-->Code:" & @TAB & $iCode) ; No return value EndSwitch EndSwitch Return $GUI_RUNDEFMSG EndFunc ;==>WM_NOTIFY
    1 point
  6. Start by removing the MsgBox(). As the helpfile says for GUIRegisterMsg():
    1 point
  7. Or you could do it this way if you don't need/want an array. $string = "hello" For $I = 1 To StringLen($string) ConsoleWrite(StringMid($string, $I, 1) & @CRLF) Next
    1 point
  8. water

    Coloured text for e-mail

    I would create the HTML Mail file containing the whole message (including "Dear xxx ..."). Where you want to insert name and password use place holders %Firstname% and %Password%. The following script will replace them with the value of the corresponding variables. Global $Name = InputBox("Name", "Enter the Person's Name") Global $SLGPass = InputBox("Password", "Enter the New Password (6 Char Min)") Global $sBody = FileRead(@ScriptDir & "\Mail.html") ; Read the whole file into a variable $sBody = StringReplace($sBody, "%Firstname%", $Name) ; Replace place holder with Name $sBody = StringReplace($sBody, "%Password%", $SLGPass) ; Replace place holder with Password _OL_ItemModify($oOL, $oItem, Default, "HTMLBody=" & $sBody)
    1 point
  9. Out of curiosity, why is that important?
    1 point
  10. It is indeed not build to run multiple time and create the log file, but thought I had fixed it in a way for now that only the first instance would generate the log. What is the issue you are having? EDIT: made a simply fix by just adding a sequence-number to the name in case the file is locked: au3stripper_x.log. Let me know if the new Beta works for you. Jos
    1 point
  11. 1 point
  12. mikell

    Datetime GUI selector

    ? $idStart = GUICtrlCreateDate("2015/07/03 12:13:30", 2, 15, 186, 21, $DTS_UPDOWN) $sStyle = "yyyy/MM/dd HH:mm:ss" GUICtrlSendMsg($idStart, $DTM_SETFORMATW, 0, $sStyle)
    1 point
  13. ​That is what I am running. I see no reason to update to 8.1. This Laptop has booting issues. It doesn't want to complete a Restore Point so I can just imagine how it would do with a live OS update through the store. Afa day to dayuse, it ain't broke so I'm not gonna' fix it.
    1 point
  14. AdamUL

    RunAs

    jsnyder213, Sorry for the late reply. Now to answer one of your questions. The reason my the script I gave you executes correctly, and your's didn't is due to UAC (User Account Control). A process will not execute with full admin rights unless it is requested from the user executing the process, and that user has to have the rights to request elevation. This is why you see "Run as administrator" in the context menu, when you right click on some file types. In the script, the ShellExecuteWait with the "runas" verb, request the elevation. Since we are running it in a non-admin user context, we have to re-execute the script as the admin user. Now that the script is running by a user that can request elevation, the script re-executes itself again, requesting the admin token. There are other ways of doing this, but for me I believe this is the simplest in turns of scripting. There is one thing I should of mentioned that may be related to your CD issue. After the script has re-executed itself as a different user, the user that it is running as must have rights to access to the file locations of the other files that may be used in the script. Also, I try to use full paths when calling file, like the MSIs. I'm glad that jguinch was able to help you. Adam
    1 point
  15. Just a small remark if I may. More correct usage of the operator would be: GUICreate(($mode = 1) ? "Test Mode 1" : "Test Mode 2", 300, 300) Purpose of ternary operator is not to replace If...Then.
    1 point
×
×
  • Create New...