side-white / AHK

0 stars 0 forks source link

NOTE #1

Open side-white opened 6 years ago

side-white commented 6 years ago

TEST

side-white commented 6 years ago

tooltip,reloaded,0,0 sleep,1000 tooltip,

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Win+z=Test ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

z::

RETURN ; Clipboard= ; send,^c ; ClipWait, ; org:=Clipboard ; ;msgbox,org=%Clipboard% ; send,{up} ; send,^c ; ClipWait, ; dst:=Clipboard ; ;msgbox,dst=%Clipboard% ; Clipboard:=org ; send,^v{down} ; Clipboard:=dst ; send,^v{up}

;ie := ComObjActive("InternetExplorer.Application")
;ie.Visible := true
;MsgBox, exist

;}

;WinActivate ;winwaitactive,ahk_exe iexplore.exe ;WinWaitActive ;sleep,100 ;send,{f6} ;sleep,100 ;send,^c ;ClipWait, 0.2 ;fileappend, %Clipboard%`n, D:\test.txt, UTF-8 F1::press_F1() ~F5::reload_ahk()

g::google()

f::run,C:\Users\Documents\7_Programs\Everything\Everything.exe

c::run,control.exe

t::run_taskmgr()

^#c::copy_url() ~printscreen::screen_shot() ~!PrintScreen::screen_shot()

w::window_spy()

s::run_sublime()

b::bracket()

;;;要調整

u::get_url()

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KeyChange;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; sc029::Send, 0 +!^sc029::Send, 0 +!^1::send, 1 +!^2::send, 2 +!^3::send, 3 +!^q::send, 4 +!^4::send, 4 +!^w::send, 5 +!^e::send, 6 +!^a::send, 7 +!^s::send, 8 +!^d::send, 9 +!^sc07B::send,.

;sc03a::send,{capslock} ^sc03A::vkF3sc029 !sc03A::vkF3sc029 +sc03A::Capslock

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ReloadInfo;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

Return ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;Functions;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; press_F1(){ if (A_PriorHotkey <> "~F1" or A_TimeSincePriorHotkey > 150) { ;Too much time between presses, so this isn't a double-press. KeyWait, F1 return } send, {F1} return ;;;;;;;;;;;;;;;;;;;;;;????????????? }

reload_ahk(){ if (A_PriorHotkey <> "~F5" or A_TimeSincePriorHotkey > 150) { ;Too much time between presses, so this isn't a double-press. KeyWait, F5 return } Ifwinactive,ahk_exe sublime_text.exe { send, ^s } reload

return

}

google(){ bk = %ClipboardAll% Clipboard = Send,^c ClipWait,0.2 Run,http://www.google.com/search?q=%Clipboard% Clipboard = %bk% Return }

run_taskmgr(){ Ifwinactive,ahk_exe taskmgr.exe { WinClose } else { run,taskmgr.exe winactivate,ahk_exe taskmgr.exe } return }

run_sublime(){ Ifwinactive,ahk_exe sublime_text.exe { WinMinimize } else if WinExist("ahk_exe sublime_text.exe") { winactivate } else { run,C:\Users\Documents\7_Programs\Sublime Text\sublime_text.exe } return }

copy_url(){ send ^c ClipWait,0.2 clipboard=%clipboard% ;%null% tooltip,%clipboard% sleep,3000 tooltip, return }

screen_shot(){ ;send,{printscreen} ;sleep,100 run,mspaint.exe winwaitactive,ahk_exe mspaint.exe sleep,100 send,^v return }

window_spy(){ ;Ifwinactive,ahk_exe AU3_Spy.exe ;{ ; WinClose ;} ;else if WinExist("ahk_exe AU3_Spy.exe") { WinClose } else { run,C:\Users\Documents\7_Programs\AutoHotkey\AU3_Spy.exe WinWaitActive, ahk_exe AU3_Spy.exe WinMove, 1562, 548 } return }

TIFFizm(mode){ Ifwinactive,ahk_exe TIFFizm.exe { MouseGetPos, xpos, ypos if (mode=1){ click,l,140,90 } else if (mode=2){ click,l,160,90 } else if (mode=3){ click,l,195,90 } else { click,l,255,90 } MouseMove, xpos, ypos } return }

bracket(){ bk = %ClipboardAll% Clipboard = Send,^x ;sleep,100 ClipWait,0.1 send,(^v) Clipboard = %bk% return }

get_url(){ For window in ComObjCreate("Shell.Application").Windows wds .= window.LocationName " :: " window.LocationURL "`n" MsgBox % wds WinGetActiveTitle, Title MsgBox, The active window is "%Title%". }

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; FileSearch(path,pattern){ ;Dim FSO As Object, Folder As Variant, file As Variant FSO := ComObjCreate("Scripting.FileSystemObject")

;For Each Folder In FSO.GetFolder(path).subfolders
;    FileSearch(Folder.path, Target)
;Next Folder
For  file In FSO.GetFolder(path).Files{
    FLNM:= FILE.NAME
    ;msgbox, %flnm%
    if regexmatch(flnm,pattern)
        return flnm
}
;    If file.Name Like Target Then
;        'Debug.Print File.Name
;        FileSearch = file.Name
;    End If
;Next
return

}