ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

DonationCoder.com Software > Find And Run Robot

How can I enter 2 seperate arguments?

(1/3) > >>

kartal:
Hi
I am having little issue here. I use $$1 and $$2 to pass 2 arguments to command line emailer. First one is an email adress second one is the title of email.
I can send email successfully If my title is just one word. If my title is more than one word Farr only passes first word of the title. I want Farr to pass the full title to emailer. I use
sendemail-tab-email adress-space-title(may contain spaces)

1000>>>sendemail>->sendemail $$1 $$2| PathTo\sendEmail.exe -s mail.mymail.com:2025 -xu [email protected] -xp password -t "$$1" -u "$$2" -f [email protected]>+>^sendemail (.+) (.+)

mouser:
Try this as your regular expression:
^sendmail (\S*) (.*)

basically it just says that the first argument is a string of characters NOT INCLUDING ANY SPACES, so it ends at the first space.  then second argument gets the rest.

the problem with your original regular expression is that the first argument was eating up all the text on the line greedily except the last word.

mouser:
by the way, remember that you can actually test the regular exression from the alias creation dialog, which is really helpful to see how the arguments are being parsed.

herojoker:
As you know, the way texts are matched with the help of regular expressions is not necessarily unique!
Perhaps the regexp parsing engine is not greedy enough or too greedy.
@mouser: IMHO it should be set to greedy and it should be possible to set certain parts ungreedy with a "?", for example: "(.+?) (.+)" would try to make the first part of the match as short as possible (until the first space).

kartal:
Mouser thanks for suggestion ^sendmail (\S*) (.*)  this seem to work.

I have one more question. How come "tab" works for certain aliases and not for others? Some of my aliases accept tab to move to next argument some does not. This happens when I need to start creating 2nd argument. Tab does not work I need to use space. Maybe first one feels like it accepts tab becasue it is also part of autocompleting of the alias?

Navigation

[0] Message Index

[#] Next page

Go to full version