tablacus / TablacusExplorer

A tabbed file manager with Add-on support
https://tablacus.github.io/explorer_en.html
MIT License
955 stars 101 forks source link

Tablacus causes Sketchup to freeze and the file cannot be opened #761

Open NguyenTuyen86 opened 2 months ago

NguyenTuyen86 commented 2 months ago

"When using Tablacus to open a Sketchup file, it causes Sketchup to freeze and the file cannot be opened. However, if you close Tablacus while Sketchup is frozen, Sketchup continues to run and successfully opens the file."

tablacus commented 2 months ago

Anti-virus software may be the cause of the freeze. I have come up with a workaround. Try the following: How do you open a SketchUp file? Double click?

  1. Open Tools -> Options -> Menus -> Default
  2. Enter SketchUp to Name field.
  3. Enter *.skp to Filter field.
  4. Select Selected items in Type.
  5. Enter %SystemRoot%\explorer.exe in Options field.
  6. Click the Add button.
  7. Click OK.

image

NguyenTuyen86 commented 2 months ago

Thank you for your feedback. I have tried the above method but the issue is still not resolved. Thanks!

KnIfER commented 1 month ago

you can use AutoHotKey to takeover hotkeys and launch application with selected file :

suppose you want to use wodplayer.exe to open flv files :

; ahkv1

    GroupAdd, texp_gp, ahk_exe explorer.exe
    GroupAdd, texp_gp, ahk_exe TEd32.exe
    GroupAdd, texp_gp, ahk_exe TEd64.exe

#IfWinActive, ahk_group texp_gp 
$Enter::
return
$Enter up::
    wb := WBGet_win()
    item := WBGet_sel(wb, 1)
    if(item && EndsWith(item.Path, ".flv")) {
        path := item.Path
        ; MsgBox % WBGet_sel(wb, 1).Path
        Run, "D:\Code\WODPlayer\bin\WODPlayer.exe" "%path%"
    } else {
        send {enter}
    }
return
#IfWinActive

; help mathods
EndsWith(str, t, only=false) {
    l := StrLen(str)
    n := StrLen(t)
    d := l - n
    if(d>=0 && indexOf(str, t, l-n) >= 0) { ; SubStr(str, 1-n, n)=t
        if(!only || indexOf(str, t)=d) {
            return 1
        }
    }
    return 0
}
Explorer_GetWindow(hwnd="")
{
    WinGet, hWnd, ID, A
    for Window in ComObjCreate("Shell.Application").Windows 
    try {
        if (window.hwnd==hwnd) {
            return window
        }
    }
}

WBGet(hwnd, Svr:=1) {               ;// based on ComObjQuery docs
    msg := DllCall("RegisterWindowMessage", "str", "WM_HTML_GETOBJECT")
         IID1 := "{0002DF05-0000-0000-C000-000000000046}"   ; IID_IWebBrowserApp
         IID2 := "{332C4427-26CB-11D0-B483-00C04FD90119}"   ; IID_IHTMLWindow2
   SendMessage msg, 0, 0, Internet Explorer_Server1, ahk_id %hwnd%
   if (ErrorLevel != "FAIL") {
      lResult:=ErrorLevel, VarSetCapacity(GUID,16,0)
      if DllCall("ole32\CLSIDFromString", "wstr","{332C4425-26CB-11D0-B483-00C04FD90119}", "ptr",&GUID) >= 0 {
         DllCall("oleacc\ObjectFromLresult", "ptr",lResult, "ptr",&GUID, "ptr",0, "ptr*",pdoc)
            return  ComObj(9,ComObjQuery(pwb:=ComObjQuery(pdoc,IID1,IID1),IID2,IID2),1)
                ,   ObjRelease(pdoc), ObjRelease(pwb)
      }
   }
}

WBGet_win() {
    IfWinActive ahk_exe explorer.exe 
    {
        return Explorer_GetWindow()
    } else {
        WinGet, hWnd, ID, A
        return WBGet(hWnd)
    }
}
WBGet_sel(wb, _1:=0) {
    IfWinActive ahk_exe explorer.exe 
    {
        ret :=  wb.Document.SelectedItems
    } else {
        ret := wb.te.Ctrl(CTRL_FV).SelectedItems
    }
    if(ret && _1) {
        ret := ret.item(0)
    }
    return ret
}

hope it helps,