ストップウォッチとVLC transcriberを統合する

 

ぽちぽちぽち···Oh hi! I didn’t realize you were there.

今日は,前回紹介したVLCtranscriberストップウォッチ機能を実装するよ!

1484125041403

 

追記 2017/01/17

最新のバージョン(2017/01/17)はこちら.

https://dl.dropboxusercontent.com/u/85699252/vlc%20transcriber%20and%20timer%20neokix%2020170117.exe

変更部分:
.F1,F12 をタイマー操作に変更
・ヘルプボタンを実装
(最新版のショートカットキーはヘルプボタンからご覧になれます)

 

追記 2017/01/20

今後のバージョンの公開はトップページ→[倉庫]にて行います.

——————–

これでSGWatchともおさらばだね!
といっても僕はずぶの素人だから,ここからスクリプトを拝借して,自分ごのみに調教するよ!

・Simple Millisecond Timer / Stopwatch – Scripts and Functions – AutoHotkey Community : https://autohotkey.com/board/topic/97904-simple-millisecond-timer-stopwatch/

→これにショートカットキーを追加したよ!

ということで,3時間かけて試行錯誤の結果,Ctrl+9で(リ)スタート,Ctrl+0でストップできるタイマーを実装し,かつVLCを非アクティブウインドウからコントロールできるスクリプトが完成したよ!

.exe形式の実行ファイルはこちら
https://dl.dropboxusercontent.com/u/85699252/vlc%20transcriber%20and%20timer%20neokix%2020170111.exe

 

[注意!]
間違って消さないように,[×]ボタンでは終了できなくしたよ!タスクトレイから終了(Exit)をえらんでね!
vlc-transcriber-and-timer

ショートカット一覧は以下の通り

押し間違え防止
Ins→Backspace
NumpadIns→Right
Printscreen→Volume_Down
Pause→Volume_Up
カナkey → 全角/半角key
変換key → F7

VLCプレイヤーの操作
Ctrl+Up→Play&Pause
Crtl+. → Speed up
Ctrl+, → Speed down
無変換key/Home→3秒戻し
Ctrl+Right→3秒進む
Alt+F12→次のフレーム

タイマーの操作
Ctrl+9→タイマースタート
Ctrl+0→タイマーストップ

参考
・Simple Millisecond Timer / Stopwatch – Scripts and Functions – AutoHotkey Community : https://autohotkey.com/board/topic/97904-simple-millisecond-timer-stopwatch/
・Stopwatch/Timer – Scripts and Functions – AutoHotkey Community : https://autohotkey.com/board/topic/33920-stopwatchtimer/
・#IfWinActive / #IfWinExist – AutoHotkey Wiki : http://ahkwiki.net/-IfWinActive

ソースコードはこちら
https://dl.dropboxusercontent.com/u/85699252/vlc%20transcriber%20and%20timer%20neokix.ahk

;;VLCtranscriber and timer neokix 20170111

;;All thanks to kojimu(http://d.hatena.ne.jp/kojimu/20110425/1303762269) and Cruncher1(https://autohotkey.com/board/topic/97904-simple-millisecond-timer-stopwatch/)!
;;Also, thanks to this superb icon, ava1219 (http://www.iconarchive.com/show/littlear-icons-by-ava1219/folder-document-icon.html)

;;Reminder
; Window Key-> #
; Ctrl Key -> ^
; Alt Key -> !

#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
#Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.

;;;;;;
;;Millisecond Timer

AdjTime = 0

;Timer GUI
Gui , Timer:Font , s18 , Courier Bold
Gui , Timer:Add , Text , Center w250 , 00:00:00:000
Gui , Timer:Font , s10 , Verdana
Gui , Timer:Add , Button , x20 y50 w90 gStop Section , Stop
Gui , Timer:Add , Button , x20 y50 w90 gStart, Start
Gui , Timer:Add , Button , w60 ys gCopy, Copy
Gui , Timer:Add , Button , w60 ys gReset , Reset
Gui , Timer:+AlwaysOnTop
Gui , Timer:Show , , Timer
Control , Hide , , Button1 , Timer
Exit

;Defining Shortcuts
#IfWinExist Timer
^9::
SetTitleMatchMode, 2
GoSub, Start
return

#IfWinExist Timer
^0::
SetTitleMatchMode, 2
GoSub, Stop
return

Start:
Control , Hide , , Button2 , Timer
Control , Show , , Button1 , Timer
GuiControl , Focus , Button1
StopClock = 0
ControlGetText , DisplayTime , Static1
ST := A_TickCount ; Start Time
While StopClock = 0
ControlSetText , Static1 , % FormatCT((A_TickCount – ST) + AdjTime)
StopClock = 0
Exit

Stop:
Reset:
Control , Show , , Button2 , Timer
Control , Hide , , Button1 , Timer
GuiControl , Focus , Button2
StopClock = 1
IF (A_ThisLabel = “Reset”)
{
AdjTime = 0
ControlSetText , Button2 , Start
ControlSetText , Static1 , 00:00:00:000
}else{
AdjTime := 0
ControlSetText , Button2 , Restart
}

Exit

Copy:
ControlGetText , Clipboard , Static1
MsgBox, 262192, Time Copied to Clipboard, Copied to Clipboard: %Clipboard%, 2
Exit

TimerGuiClose:
Exit

FormatCT(ms) ; Formats milliseconds into 00:00:00:000 (last three digits are milliseconds)
{
StringRight , mil , ms , 3
StringTrimRight , sec , ms , 3
min := Floor(sec/60)
sec := sec-(min*60)
hrs := Floor(min/60)
min := min-(hrs*60)
While StrLen(sec) <> 2
sec := “0” . sec
While StrLen(mil) <> 3
mil := “0” . mil
While StrLen(min) <> 2
min := “0” . min
While StrLen(hrs) <> 2
hrs := “0” . hrs
return , hrs . “:” . min . “:” . sec . “:” . mil
}
;;;;;;

; Making keybord better
; Insert to Backspace
Ins::
Send, {BS}
Return

; NumpadIns to Right
NumpadIns::
Send, {Right}
Return

; Volume down
Printscreen::
Send, {Volume_Down}
Return

; Volume up
Pause::
Send, {Volume_Up}
Return

; カナkey to 全角/半角key
vkF2sc070::
Send, {vkF3sc029}
Return

; 変換key to F7
vk1Csc079::
Send, {F7}
Return

; VLC Player Control
; Play and Pause
^Up::
SetTitleMatchMode, 2
ControlSend, , {space}, VLCメディアプレイヤー
Return

; Speeding up (0.10x)
^.::
SetTitleMatchMode, 2
ControlSend, , ], VLCメディアプレイヤー
Return

; Slowing down (0.10x)
^,::
SetTitleMatchMode, 2
ControlSend, , [, VLCメディアプレイヤー
Return

; 3seconds back using 無変換key
vk1Dsc07B::
SetTitleMatchMode, 2
ControlSend, , +{Left}, VLCメディアプレイヤー
Return

; 3 seconds back using Home key
Home::
SetTitleMatchMode, 2
ControlSend, , +{Left}, VLCメディアプレイヤー
Return

; 3 seconds ahead
^Right::
SetTitleMatchMode, 2
ControlSend, , +{Right}, VLCメディアプレイヤー
Return

; next frame
!F12::
SetTitleMatchMode, 2
ControlSend, , e, VLCメディアプレイヤー
Return

 

ストップウォッチとVLC transcriberを統合する” への1件のフィードバック

コメントを残す

このサイトはスパムを低減するために Akismet を使っています。コメントデータの処理方法の詳細はこちらをご覧ください