Open selected file in SPEK

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
User avatar
jeeswg
Posts: 6902
Joined: 19 Dec 2016, 01:58
Location: UK

Re: Open selected file in SPEK

30 Sep 2018, 17:05

@HefaistoS: I managed to create a script that programmatically drags and drops to Spek. Cheers.
drag-and-drop programmatically by using OleDropTargetInterface - AutoHotkey Community
https://autohotkey.com/boards/viewtopic.php?f=6&t=56720
homepage | tutorials | wish list | fun threads | donate
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA
HefaistoS
Posts: 18
Joined: 18 Jul 2017, 03:12

Re: Open selected file in SPEK

04 Oct 2018, 03:52

jeeswg wrote:@HefaistoS: I managed to create a script that programmatically drags and drops to Spek. Cheers.
drag-and-drop programmatically by using OleDropTargetInterface - AutoHotkey Community
https://autohotkey.com/boards/viewtopic.php?f=6&t=56720
Thanks jeeswg for notifying me!!
At this moment i use the script that you originally made it (i've made some little adjustments on it:) and it works really good!! For me it seems easier. I'm curios if your new script has other benefits to the initial script.
Kudos!

Code: Select all

`:: ;explorer - open selected file in SPEK
Process, Exist, spek.exe
If ErrorLevel <> 0
{
	#IfWinActive, ahk_class CabinetWClass
	WinGet, curent, ID, A
	Clipboard := ""
	Send, ^c
	ClipWait
	vPath := Clipboard
	if !FileExist(vPath)
		return
	WinGet, hWnd, ID, Spek - ahk_class wxWindowNR
	if !hWnd
	{
		return
	}
	WinActivate, % "ahk_id " hWnd
	WinWaitActive, % "ahk_id " hWnd
	PostMessage, 0x111, 5000,,, % "ahk_id " hWnd ;WM_COMMAND
	WinWaitActive, Open File ahk_class #32770 ahk_exe spek.exe
	WinGet, hWnd2, ID, Open File ahk_class #32770 ahk_exe spek.exe
	ControlSetText, Edit1, % vPath, % "ahk_id " hWnd2
	ControlClick, Button1, % "ahk_id " hWnd2
	WinActivate, % "ahk_id " curent
	return
	#IfWinActive
}
else
{
	Run, C:\Program Files (x86)\Spek\spek.exe
}

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: OrangeCat and 274 guests