Jump to content

There's nothing here yet

  • Similar Content

    • By Yodavish
      I have this AutoIt script that works on Windows 7. However, when I test it on Windows 10, the objEvent will not execute the function it's supposed to call. So I have a webpage the script will check if it is active, then it will search if a popup button exist (elementId), if so, assign it to the event handler so that when that button is clicked, then handler function will move the focus back to the main GUI again.
      If WinActive("Website Title - Internet Explorer") Then    $ie = _IEAttach("Website Title")    $objElement= _IEGetObjById ($ie, "elementId")    local $oEvent = ObjEvent($objElement, "_MY_EVENT_HANDLER_") EndIf Func _MY_EVENT_HANDLER_onclick($oEvtObj)     msgbox(0,"Alert Window", "Button Clicked!") setMainWindow() ; sets focus back to main GUI EndFunc  
      I've verified, on Windows 10, that it does see the object element. But it will not trigger the event. Could it be related to some timing issues due to Windows 10 Internet Explorer over Windows 7 Internet Explorer? 
      Windows 7 IE version 11.0.9600.19507
      Windows 10 IE version 11.418.18362.0
      AutoIt v 3.3
       
    • By somebadhat
      Restore blank Windows 10 start menu icons.
      ; RESTORE BLANK WINDOWS 10 START MENU ICONS. ; TOGGLE SETTINGS-START-"USE START FULL SCREEN" TWICE ; THIS WILL RESTORE SOME OF THE BLANK ICONS ; FOR THOSE THAT IT DOES NOT REDO "CHANGE ICON" FROM THE PROPERTIES DIALOG BOX FOR EACH MISSING ICON. ; "C:\Program Files (x86)\AutoIt3\AutoIt3_x64.exe" "F:\MYAPPS\WINDOWS\StartMenu1.au3" ; windows 10 and autoit3 ; begin restore blank icons on start menu Run(@ComSpec & " /c start ms-settings:personalization-start", "", @SW_SHOWMINIMIZED) Sleep(500) WinWaitActive("Settings") Sleep(1000) ; WinWaitActive ("[CLASS:ApplicationFrameInputSinkWindow]", "") ; ; BEGIN https://www.autoitscript.com/forum/topic/1353-check-if-a-computer-is-online/ $Computer = "8.8.8.8" AutoItSetOption ("SendKeyDelay" , "125") ;was 55, 500 If RunWait("ping.exe -n 1 " & $Computer, "", @SW_HIDE) == 0 Then WinActivate("Settings") send("{tab}{down 5}{tab 6}") sleep(500) send("{space}{tab 10}") ; if online. Move to "use start full screen", toggle it and (improves reliability) return cursor to "find a setting" search box. Else WinActivate("Settings") send("{tab}{down 5}{tab 6}") sleep(500) send("{space}{tab 6}") ; if offline. Move to "use start full screen", toggle it and (improves reliability) return cursor to "find a setting" search box. EndIf ; END https://www.autoitscript.com/forum/topic/1353-check-if-a-computer-is-online/ ; ; MouseClick("left", 379, 490, 1, 0) ; Toggle "use start full screen". Autoitv3 Window Info MouseClick Coords are 23px north. If y=467 use y=490 Sleep(500) ; Msgbox(0,"Operation halted","Continue?") ; PAUSE FOR DEBUG ; WinClose("[CLASS:ApplicationFrameWindow]", "") ; Send("{LWIN 2}") ; OPEN AND CLOSE THE START MENU Send("{LWIN}") ; OPEN START MENU sleep(500) Send("{LWIN}") ; CLOSE START MENU Sleep(1000) ; Run(@ComSpec & " /c start ms-settings:personalization-start", "", @SW_SHOWMINIMIZED) ; Sleep(500) ; WinWaitActive ("Settings") ; WinWaitActive ("[CLASS:ApplicationFrameInputSinkWindow]", "") ; ; BEGIN https://www.autoitscript.com/forum/topic/1353-check-if-a-computer-is-online/ $Computer = "8.8.8.8" AutoItSetOption ("SendKeyDelay" , "125") ;was 125, 55, 500 If RunWait("ping.exe -n 1 " & $Computer, "", @SW_HIDE) == 0 Then WinActivate("Settings") sleep(500) send("{tab 7}") ; if online. Move to "use start full screen", sleep(500) send("{space}{tab 10}") ; if online. Toggle "use start full screen" and (improves reliability) return cursor to "find a setting" search box. Else WinActivate("Settings") sleep(500) send("{tab 7}") ; if offline. Move to "use start full screen", sleep(500) send("{space}{tab 6}") ; if offline. Toggle "use start full screen" and (improves reliability) return cursor to "find a setting" search box. EndIf ; END https://www.autoitscript.com/forum/topic/1353-check-if-a-computer-is-online/ ; ; MouseClick("left", 379, 490, 1, 0) ; Toggle "use start full screen". Autoitv3 Window Info MouseClick Coords are 23px north. If y=467 use y=490 Sleep(500) ; Msgbox(0,"Operation halted","Continue?") ; PAUSE FOR DEBUG WinClose("[CLASS:ApplicationFrameWindow]", "") ; end restore blank icons on start menu Exit
    • By DavidFromLafayette
      My company is moving from WIN7 to WIN10, I have had a script that runs in the middle of the night, when the computer is locked, to open an Excel spreadsheet, read a few cells, and generate an email.  This has worked fine under WIN7, when I try to run under WIN10 it freezes when it gets to a line to handle an array.  When I run without the computer locked the script runs as expected.  After doing a lot of investigating, it looks like the following line reads a "0" from the Excel file instead of a text string, only when the computer is locked.
      Any ideas?
      $Driver1 = _Excel_RangeRead($oWorkbook, "Template", "H12")
      This is how I am opening the Excel file:
      Local $oExcel = _Excel_Open(False)
      Sleep(10000)
      $oWorkbook = _Excel_BookOpen($oExcel, $sFilePath, True, False)
    • By Sori
      Not going to dump the code down because it's essentially a keylogger.
      <snip>
    • By Simpel
      Hi,
      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[5][2] = [["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?
      Regards, Simpel
       
      P.S. If I click an item then $iDropped is returning the correct number.
×
×
  • Create New...