Jump to content




Shell.Run help


  • You cannot reply to this topic
5 replies to this topic

#1 ebernerd

  • Members
  • 262 posts
  • LocationBoston, MA

Posted 21 June 2015 - 06:23 AM

Hai.

My question is how to autodetect "arguments" in a string. So, if my string was edit "this is a test" how would I get the shell.run function to get the arguments between the two? I dunno if that makes any sense at all

Thanks for any and all help

#2 Creator

    Mad Dash Victor

  • Members
  • 2,168 posts
  • LocationYou will never find me, muhahahahahaha

Posted 21 June 2015 - 06:44 AM

sherll.run can work in several ways:

1. shell.run("edit","this","is","a","test")

2. shell.run("edit this is a test")

If you want "this is a test to be one argument, then do this:

shell.run("edit \"this is a test\"")

#3 ebernerd

  • Members
  • 262 posts
  • LocationBoston, MA

Posted 21 June 2015 - 06:46 AM

The thing is it's user input in a string. So the string could be something with a billion spaces, but the program just doesn't run it for some reason.

If the string is edit "this is a test" it works just fine.
If the string is "this is a test" or this is a test it doesnt.

#4 ebernerd

  • Members
  • 262 posts
  • LocationBoston, MA

Posted 21 June 2015 - 07:03 AM

Nevermind, I got it working.

#5 Creator

    Mad Dash Victor

  • Members
  • 2,168 posts
  • LocationYou will never find me, muhahahahahaha

Posted 21 June 2015 - 08:02 AM

Glad you did! Where did the problem lie?

#6 ebernerd

  • Members
  • 262 posts
  • LocationBoston, MA

Posted 21 June 2015 - 09:51 AM

View PostCreator, on 21 June 2015 - 08:02 AM, said:

Glad you did! Where did the problem lie?

I seriously have no idea. I just futzed with it over and over again and then it worked. xD





2 user(s) are reading this topic

0 members, 2 guests, 0 anonymous users