topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Friday December 13, 2024, 10:57 am
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: How do you pass multiple arguments?  (Read 5688 times)

kartal

  • Supporting Member
  • Joined in 2008
  • **
  • Posts: 1,529
    • View Profile
    • Donate to Member
How do you pass multiple arguments?
« on: April 20, 2008, 12:24 PM »
I looked at the email alias and it looked quite complicated as far as expresions go.

What I need it passing $$1 and $$2 to and exe file in the way below

abc.exe argument -$$1 argument -$$2



d4ni

  • Supporting Member
  • Joined in 2008
  • **
  • Posts: 129
    • View Profile
    • Donate to Member
Re: How do you pass multiple arguments?
« Reply #1 on: April 20, 2008, 03:50 PM »
Not sure what you want, cause you are basically giving the answer yourself already ;) Do you have difficulty with capturing arguments using regexp or applying them, cause applying is done the way you described, basically. Anyway, here's an example using the ping.exe file:

Regexp: ^ping (.+) (.+)
Command: C:\Windows\System32\ping.exe -n $$1 $$2

This pings a host n times, with host = $$2 and n = $$1

kartal

  • Supporting Member
  • Joined in 2008
  • **
  • Posts: 1,529
    • View Profile
    • Donate to Member
Re: How do you pass multiple arguments?
« Reply #2 on: April 20, 2008, 05:35 PM »
d4ni, my suggestion does not work. It looks like when you pass multiple arguments default reg ex stuff does not work that is why I was asking about it.

Probably regex stuff is very powerful but it makes simple operations complicated  if you do not know much about it. I use launchy as well and I do not need extra expression stuff to pass simple arguments. I wish there was an option for simplified operations like the one I am trying to achieve.
« Last Edit: April 20, 2008, 05:36 PM by kartal »

kartal

  • Supporting Member
  • Joined in 2008
  • **
  • Posts: 1,529
    • View Profile
    • Donate to Member
Re: How do you pass multiple arguments?
« Reply #3 on: April 20, 2008, 05:45 PM »
Your suggestion does not work either. I am trying to write a commandline for sending email. What happens is that I cannot get to second argument in Farr command line after tab. If I try space after first argument in the Farr line it opens my sendmail.exe and closes. So basically it looks like no argument is passed to sendmail.exe.


here is the code

1000>>>email>->email $$1 $$2 | path to \sendEmail.exe -s mail.mymail.com:2025 -xu [email protected] -xp password -t $$1 -u $$2 -f email@mymail>+>^email (.+) (.+)
« Last Edit: April 20, 2008, 05:48 PM by kartal »

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,914
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: How do you pass multiple arguments?
« Reply #4 on: April 21, 2008, 04:34 AM »
Probably regex stuff is very powerful but it makes simple operations complicated  if you do not know much about it. I use launchy as well and I do not need extra expression stuff to pass simple arguments. I wish there was an option for simplified operations like the one I am trying to achieve.

you have a good point there.. perhaps i should include some sample regex that one can select if one just wants to have it trigger on standard space separated arguments, etc.

kartal

  • Supporting Member
  • Joined in 2008
  • **
  • Posts: 1,529
    • View Profile
    • Donate to Member
Re: How do you pass multiple arguments?
« Reply #5 on: April 21, 2008, 02:58 PM »
That would be a good start Mouser. Thanks