Post by garry » 24 Jan 2024, 08:51
array example
Code: Select all
#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.
;-------------------------------
e=
(Ltrim join`r`n
https://www.youtube.com/watch?v=iR0w0mWB3uA - 李香蘭 Li Xiang Lan 1920 - 2014
https://www.youtube.com/watch?v=NklP8BDourg - Suo Luo He Zhi Lian
https://www.youtube.com/watch?v=EFSZnC3-E4A - Lilian de Celis - El Relicario
https://www.youtube.com/watch?v=Fs8cYa1Z2Tk - 春風吻上我的臉 - 姚莉 / 鍾情
)
Arr:=StrSplit(e,"`n")
tot:=arr.maxindex(),a1:=arr[1],a2:=arr[2],a3:=arr[3],a4:=arr[4]
msgbox,Total=%tot%`n%a1%`n%a2%`n%a3%`n%a4%`n`nRun A4= > 春風吻上我的臉 - 姚莉 / 鍾情
try,
run,%a4%
return
;=======================================================
array example
[code]#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.
;-------------------------------
e=
(Ltrim join`r`n
https://www.youtube.com/watch?v=iR0w0mWB3uA - 李香蘭 Li Xiang Lan 1920 - 2014
https://www.youtube.com/watch?v=NklP8BDourg - Suo Luo He Zhi Lian
https://www.youtube.com/watch?v=EFSZnC3-E4A - Lilian de Celis - El Relicario
https://www.youtube.com/watch?v=Fs8cYa1Z2Tk - 春風吻上我的臉 - 姚莉 / 鍾情
)
Arr:=StrSplit(e,"`n")
tot:=arr.maxindex(),a1:=arr[1],a2:=arr[2],a3:=arr[3],a4:=arr[4]
msgbox,Total=%tot%`n%a1%`n%a2%`n%a3%`n%a4%`n`nRun A4= > 春風吻上我的臉 - 姚莉 / 鍾情
try,
run,%a4%
return
;=======================================================[/code]