/* openallurl.ahk 選択範囲内の全てのリンクされていないURLを新しいタブで開く [Hotclick Popup Menu] Item, "選択テキスト内のURLを全て開く" = Copy & Execute program, "C:\ahk\AutoHotkey.exe", "C:\ahk\openallurl.ahk" */ #NoTrayIcon Hotkey, IfWinActive, ahk_class OpWindow lines := RegExReplace( Clipboard, "(`r`n)+", "`r") Loop, parse, lines, `r, { match_result := RegExMatch( A_LoopField, "t?p?s?:?//([-_.!~*'()a-zA-Z0-9;/?:@&=+$,`%#]+)", $ ) If match_result != 0 { Clipboard = http://%$1% wait( 10 ) Send, {LCtrl Down}t{LCtrl Up} ;新しいタブ wait( 40 ) Send, {LCtrl Down}b{LCtrl Up} ;貼り付けて移動 wait( 40 ) } } wait( time ) { begin := A_TickCount Loop { if A_TickCount - begin > time break } }