I am working a lot with SEO so I made myself a shortcut for quickly checking on websites, issue is for some reason the second IF statement inside the function is not working properly ( if I type in "seo" it asks me for the domain I want to check and runs properly, but if I type in "whois" the Inputbox does not pop and it jumps straight to the whois.domaintools.com website ( without the URL extension )
here is the code I made so far
collectAction(){
InputBox, userAction, ,Which action would you like to perform?, , 300, 120, ,, Arial,
if(userAction="seo")
InputBox, seoUrl, ,Please enter the domain you want to check., , 300, 120, ,, Arial,
Run, https://freetools.seobility.net/en/seocheck/check?url=https`%3A`%2F`%2Fwww.%seoUrl%`%2F&crawltype=1
return
if(userAction="whois")
InputBox, whoisUrl, ,Please enter the domain you want to check., , 300, 120, ,, Arial,
Run, https://whois.domaintools.com/%whoisUrl%
return
}
thanks in advance!
p.s if this info has any impact on the process i am calling this function with a hotkey (F1)
2
Answers
changing two consecutive if statemets to if – else works
function call example:
You need to wrap the commands in the if clause between {} block