as of 20201015 0857
App2Pwb(URL)
{
For pwb in ComObjCreate("Shell.Application" ).Windows
{
If InStr(pwb.FullName,"iexplore.exe" ) && InStr(pwb.LocationURL, URL)
Return pwb
}
}
;Menu, Tray, icon, Shell32.dll
;Menu, Tray, icon, accessibilitycpl.dll ; netshell.dll ;imageres.dll
Menu, Tray, icon, ieframe.dll, 41 ;check mark
;Menu, Tray, icon, netshell.dll, 94 ;cross mark
;(note) icons are here
; https://diymediahome.org/windows-icons-reference-list-with-details-locations-images/
zPath:="C:\Users\kcchang\Downloads\"
zPath:="C:\Users\Kicheon\OneDrive\_kdb_20200929 1051_bloomberg\"
;################################################################
;################################################################
^f12::
MsgBox, Help
,`n[01]Win+b`tBloomberg Loginn
,`n[02]f11`t`tGoogle site url copied
,`n[03]Alt+m`tSave mail as
,`n[99]Auto Corrections such as ▶ ★ ○ α β ...
return
^f11::
MsgBox, path copied on clipboard https://sites.google.com/site/kicheonchang/home
Clipboard:= "https://sites.google.com/site/kicheonchang/home"
return
#b::
#Include AH_BloombergLogin_v00.ahk
;################################################################
;################################################################
!m:: ; Alt m
/*
Gui,Add,text,,Please select the type of file name
Gui,Add,Radio,vx1 checked, YYYYMMDD
Gui,add,radio,vx2,YYYYMMDD HHMM
Gui,add,button,gBtn,OK
gui,show,,Select option
return
Btn:
Gui,submit,nohide
zOpt:=x1*1+x2*2
gui,hide
WinActivate, "Select option"
gui,destroy
*/
zOpt:=2
ToolTip,★process`nstart,0,0
zUrl:="https://mail.kdb.co.kr/mail/mainframe"
web:=app2pwb(zUrl)
web.visible:=True
/*
btn:=web.document.getElementById("ext-gen286") ;this differs depending on who's pc
MsgBox,% btn.innerText
ToolTip,★process`next-gen286
if (btn="") {
btn:=web.document.getElementById("ext-gen263")
ToolTip,★process`next-gen263
}
*/
cls:=web.document.getElementsByClassName("x-btn-text")
loop,% cls.length
{
;if(cls[A_Index-1].innerText="PC에 저장") {
if(cls[A_Index-1].innerText="Save to PC") {
zID:=cls[A_Index-1].id
break
}
}
ToolTip,★process`nDI is %zID%,0,0
btn:=web.document.getElementById(zID) ;this differs depending on who's pc
/*
;zTmp:=web.document.getElementsByClassName("x-btn-text")
;zTmp:=web.document.getElementsByTagName("button")
;zTmp:=web.document.getElementsByTagName("table")
;zTmp:=web.document.getElementsByTagName("td")
;MsgBox,% zTmp.length
;zFlag:=FALSE
loop,% zTmp.length
{
zStr:=xTmp[A_Index-1].rows
MsgBox,% zTmp.length ", " a_index ", " zStr
if InStr(xTmp[A_Index-1].innerText,"PC에 저장") {
btn:=xTmp[A_Index-1]
;zFlag:=TRUE
break
}
}
;MsgBox,% zFlag
if (btn="") {
Msgbox, cannot find button will exit app
exitApp
}
*/
btn.click()
sleep,1000
;send,{Alt}n
;send,+n
send,{Alt down}n{Alt up}
sleep,500
send,{tab}
sleep,500
send,{down}
sleep,500
send,a
sleep,500
;WinWait, 다른 이름으로 저장
WinWait, Save As
sleep,500
Clipboard:= ""
send,^a
sleep,500
send,^c
send,^x
sleep,500
ClipWait,1
zY:=SubStr(clipboard,2,4)
zM:=SubStr(clipboard,7,2)
zD:=SubStr(clipboard,10,2)
zH:=SubStr(clipboard,13,2)
zMin:=SubStr(clipboard,16,2)
zTitle:=SubStr(clipboard,19,100)
Clipboard:=zY zM zD "_" zTitle
if(zOpt=2)
Clipboard:=zY zM zD " " zH zMin "_외메," zTitle
ClipWait,1
send,^v
sleep,500
send,{Enter}
ToolTip
return
;################################################################
;################################################################
::\semo::△
::\nemo::□
::\one::○
::\star::★
::\heart::♥
::\finger::☞
::\chamgo::※
::\>::▶
::\=>::⇒
::\->::→
::\up::↑
::\down::↓
::\<-::←
::\since::∵
::\thus::∴
::\inf::∞
::\1::①
::\2::②
::\3::③
::\4::④
::\5::⑤
::\6::⑥
::\7::⑦
::\8::⑧
::\9::⑨
::\alpha::α
::\beta::β
::\gamma::γ
::\theta::θ
::\delta::δ
::\epsilon::ε
::\lambda::λ
::\mu::μ
::\times::×
;################################################################
;################################################################
::\\\\::
zTmp:=Clipboard
Clipboard = ""
Clipboard = %zPath%
send, ^v
sleep,500
;send,% zPath
Clipboard = ""
Clipboard = %zTmp%
return
;################################################################
;################################################################
::0000::
zTimestamp := A_year A_Mon A_DD " " A_Hour A_Min ; A_Sec
zSpace:=Chr(32) ;space
send, %zTimestamp%%zSpace%
return
;################################################################
;################################################################
ExitApp
^ESC::ExitApp
'[PA] 업무자동화 > [AH]Autohotkey' 카테고리의 다른 글
AH Windows 시작프로그램에 등록 (0) | 2020.10.17 |
---|---|
AH Monitoring Active Window Name (0) | 2020.10.15 |
AH move mouse (0) | 2020.09.25 |
AH Util_External PC (0) | 2020.09.25 |
Control 땡땡 (0) | 2020.08.05 |