Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
NguyenTuyen86 opened this issue Jul 8, 2024 · 3 comments
Open

Comments

@NguyenTuyen86
Copy link

"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
Copy link
Owner

tablacus commented Jul 9, 2024

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
Copy link
Author

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

@KnIfER
Copy link

KnIfER commented Aug 4, 2024

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,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants