Regexmatch without limit for number of keywords
Posted: 17 Oct 2021, 17:25
1. How do I define separate keywords using π²πΆππ΅π²πΏ comma, space, or new line return? In this context, is it true that I can only choose one?
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.
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