at work we changed now from windows 7 to windows 10. Suddenly this command _GUICtrlListView_GetHotItem() isn't working anymore for me. When I drag&drop a listviewitem it always returns -1.
Here is the script that worked with WIN7:
#include <GUIConstantsEx.au3> #include <GuiListView.au3> #include <Misc.au3> Local $aArray_Base = [["0 - 0", "0 - 1"], ["1 - 0", "1 - 1"], ["2 - 0", "2 - 1"], ["3 - 0", "3 - 1"], ["4 - 0", "4 - 1"]] GUICreate("listview", 220, 200) Global $g_idListView = GUICtrlCreateListView("", 10, 10, 200, 180) _GUICtrlListView_AddColumn($g_idListView, "Col 1", 100) _GUICtrlListView_AddColumn($g_idListView, "Col 2", 100) _GUICtrlListView_AddArray($g_idListView, $aArray_Base) GUISetState(@SW_SHOW) While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE ExitLoop Case $GUI_EVENT_PRIMARYDOWN _Arrange_List() EndSwitch WEnd Func _Arrange_List() Local $iSelected = _GUICtrlListView_GetSelectionMark($g_idListView) If $iSelected = -1 Then Return While _IsPressed(1) WEnd Local $iDropped = _GUICtrlListView_GetHotItem($g_idListView) ConsoleWrite("GetHotItem: " & $iDropped & @CRLF) If $iDropped > -1 Then _GUICtrlListView_BeginUpdate($g_idListView) If $iSelected < $iDropped Then _GUICtrlListView_InsertItem($g_idListView, "", $iDropped + 1) _GUICtrlListView_SetItemText($g_idListView, $iDropped +1, _GUICtrlListView_GetItemTextString($g_idListView, $iSelected), -1) _GUICtrlListView_DeleteItem($g_idListView, $iSelected) ElseIf $iSelected > $iDropped Then _GUICtrlListView_InsertItem($g_idListView, "", $iDropped) _GUICtrlListView_SetItemText($g_idListView, $iDropped, _GUICtrlListView_GetItemTextString($g_idListView, $iSelected + 1), -1) _GUICtrlListView_DeleteItem($g_idListView, $iSelected + 1) EndIf _GUICtrlListView_SetItemSelected($g_idListView, $iDropped) _GUICtrlListView_SetSelectionMark($g_idListView, $iDropped) _GUICtrlListView_EndUpdate($g_idListView) EndIf EndFunc Any ideas?
P.S. If I click an item then $iDropped is returning the correct number.
I have a application that have a function is to create a shortcut to desktop, lets say is ChromePortable.lnk.
$iCreate = FileCreateShortcut($DIR_WA_FOLDER & '\GoogleChromePortable.exe', $DIR_SHORTCUT, $DIR_WA_FOLDER, '--kiosk "https://example.com/"') So the shortcut will be launch as kiosk mode and force to enter the specific website. However, the user is still able to right-click on the shortcut and modify the target value to remove the kiosk mode. What can I do to disable the user to editing the target value?
So far, I had asked and tried from SuperUser for advises Disable Shortcut Target Field
icacls "ChromePortable.lnk" /GRANT EVERYONE:RX So this will set the permission of this shortcut file to only Read & Execute only! But after I set it, the user is still can modify.
Please kindly advise.
Please note and assume that user don't have Administration account or etc, that should be only have 1 account to logon to the computer.
I must disable inheritance to remove all others permissions like SYSTEM, ADMINISTRATORS, etc. Then only GRANT everyone for READ & EXECUTE only.
But still the user can go to edit the permissions tho. Any advise?
Hi All, I am new to AutoIT and exploring options to use it in my organization. I tried couple of examples and it is fantastic. I am trying to run restrictions test in a pc to see if certain options are disabled like print screen, mstsc etc. I could not get a hang of it. Any help is much appreciated.
Hello all. I created a script to uninstall Symantec from our environment and I placed the "BlockInput(1)" command in the beginning of the script so that end users would not be able to move the mouse or keyboard to disrupt the mouse clicks.
During testing we found that this worked for our Windows 7 machines, but for our windows 10 machines the mouse disable did not work can anyone shed some light on why this is?
Here is my code: