Post by garry » 05 Feb 2018, 16:16
ejemplo
Code: Select all
e4x=
(Ltrim Join`r`n
- SI8787 dsajdklsajdklsajkldaskj
- SI9898 jdksjadklsajdklsaj
SI8r98 nmskjdksjkds
)
clipboard=
stringreplace,e4x,e4x,-,,all
Loop,parse,e4x,`n,`r
{
T=%A_LoopField%
t=%t%
stringmid,k,t,1,2
e .= k . "`r`n"
}
;msgbox,%e%
clipboard=%e% ;- save to clipboard
gosub,sendtonotepad
return
sendtonotepad:
pr=notepad.exe
sc=ahk_exe notepad.exe
IfWinNotExist,%sc%
{
Run, %pr%,,,pid1
scx:= "ahk_pid " . PID1
WinWait,%scx%
}
IfWinNotActive ,%scx%,,WinActivate,%scx%
WinWaitActive,%scx%
send,^v ;- send to notepad (SI)
clipboard=
return
;========================================================
ejemplo
[code]e4x=
(Ltrim Join`r`n
- SI8787 dsajdklsajdklsajkldaskj
- SI9898 jdksjadklsajdklsaj
SI8r98 nmskjdksjkds
)
clipboard=
stringreplace,e4x,e4x,-,,all
Loop,parse,e4x,`n,`r
{
T=%A_LoopField%
t=%t%
stringmid,k,t,1,2
e .= k . "`r`n"
}
;msgbox,%e%
clipboard=%e% ;- save to clipboard
gosub,sendtonotepad
return
sendtonotepad:
pr=notepad.exe
sc=ahk_exe notepad.exe
IfWinNotExist,%sc%
{
Run, %pr%,,,pid1
scx:= "ahk_pid " . PID1
WinWait,%scx%
}
IfWinNotActive ,%scx%,,WinActivate,%scx%
WinWaitActive,%scx%
send,^v ;- send to notepad (SI)
clipboard=
return
;========================================================
[/code]