2. How do I make it such that each keyword must be ≤ 5 letters (no numbers), and I can have as many keywords input as I want?
3. How do I loop through both keywords and the URLs at the same time as per comments?
My attempt below.
Thank you.
Code: Select all
InputBox, Keywords, Search Keyword(s), Enter keyword(s). Separate multiple keywords with comma, space, or new line return.,, 390, 135
if ErrorLevel ; The user pressed Cancel.
return
RegExMatch(Keywords, "((^[a-zA-Z]{1,5})$),(^[a-zA-Z]{1,5})$),(^[a-zA-Z]{1,5})$)", Keyword) { ; match 5 letters only
; not sure how to loop the keywords through multiple URLs here, and if there's a better way to code this portion
URL1 := "https://www.test.com/search/" . keyword1 .
URL2 := "https://www.anothersite.com/search/" . keyword1 .
Run, %URL1%
Run, %URL2%
WinWaitActive, ahk_exe chrome.exe
return
Code: Select all
sample input
A
C
MSI
GPI
Z
CRSD
GAWFQ