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
Shell.Run help
Started by ebernerd, Jun 21 2015 06:23 AM
5 replies to this topic
#1
Posted 21 June 2015 - 06:23 AM
#2
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\"")
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
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.
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
Posted 21 June 2015 - 07:03 AM
Nevermind, I got it working.
#5
Posted 21 June 2015 - 08:02 AM
Glad you did! Where did the problem lie?
2 user(s) are reading this topic
0 members, 2 guests, 0 anonymous users












