 |

07-18-2002, 05:26 PM
|
|
|
Removing arguments
|
I am currenly making a launcher for Operation Flashpoint and I need to know how to remove up to 5 different arguments from a text box.
Thanks in advance 
|
|

07-18-2002, 05:29 PM
|
 |
Junior Contributor
|
|
Join Date: Jan 2002
Location: Alaska
Posts: 299
|
|
|
well, two ways to go...
make 5 different textboxes (easiest)
or use some sort of delimeter, have them put a | between each argument and then parse the string by the |
|
__________________
A+ Certified
CCNA
http://fpow.netchaos.cc
FPOW!
|

07-18-2002, 05:35 PM
|
|
|
What do you mean by this
Quote:
|
| between each argument and then parse the string by the |
|
?
|
|

07-18-2002, 05:38 PM
|
 |
Junior Contributor
|
|
Join Date: Jan 2002
Location: Alaska
Posts: 299
|
|
|
if you want them to input all 5 arguments into one textbox, have them input it like this
text1.text=argument1 | argument2 | ...| argument5
then, store to your array or whatever you use
loc=instr(1,text1.text,"|")
arg(0)=left(text1.text,loc-2)
loc=instr(loc,text1.text,"|")
arg(1)=left(text1.text,loc-2)
|
__________________
A+ Certified
CCNA
http://fpow.netchaos.cc
FPOW!
|

07-18-2002, 05:42 PM
|
 |
Code Meister
Retired Moderator * Guru *
|
|
Join Date: Aug 2000
Location: Vancouver, BC, Canada
Posts: 10,441
|
|
|
....or just use the SPLIT function....
|
__________________
"I have a plan so cunning you could put a tail on it and call it a weasel!" - Edmund Blackadder
|

07-18-2002, 05:43 PM
|
|
|
|
It says the '|' character is not valid. I'm using VB .NET by the way.
|
|

07-18-2002, 05:45 PM
|
 |
Junior Contributor
|
|
Join Date: Jan 2002
Location: Alaska
Posts: 299
|
|
|
well, I dont know what affect that has, I've never used vb.net so...yah...lol, use something else then, like the @ symbol..unless you're expecting them to use that...the '|' wasn't the significant character, so long as you use something that wont be used elsewher in the box (i.E. done use A to seperate arguments hehe)
|
__________________
A+ Certified
CCNA
http://fpow.netchaos.cc
FPOW!
|

07-18-2002, 05:47 PM
|
 |
Political Coder
Retired Moderator * Guru *
|
|
Join Date: Mar 2001
Location: London, England
Posts: 8,037
|
|
|
Did you use the pipe | in double quotes? Like "|"
|
|

07-18-2002, 05:57 PM
|
|
|
I'm new to programming and I don't understand this  . I have 5 check boxes. I want them to pass a variable to a text box when checked and remove it if you uncheck it.
|
|

07-18-2002, 05:59 PM
|
 |
Political Coder
Retired Moderator * Guru *
|
|
Join Date: Mar 2001
Location: London, England
Posts: 8,037
|
|
|
A textbox on your own form, or another application?
|
|

07-18-2002, 06:05 PM
|
|
|
|

07-18-2002, 06:12 PM
|
 |
Junior Contributor
|
|
Join Date: Jan 2002
Location: Alaska
Posts: 299
|
|
if your 5 checkboxes and 5 textboxes are in an array (easiest way to do it) throw this code in there
Code:
Private Sub Check1_Click(Index As Integer)
If Check1(Index).Value = 1 Then
text1(Index).Text = "Checkbox " & Index & " is clicked!"
Else
text1(Index).Text = "Checkbox " & Index & " isn't clicked!"
End If
End Sub
P.S.
this means that the 5 textboxes correspond specifically with a checkbox...so if you need all 5 arguments, just put them all together
Code:
dim fulltext as string
fulltext=""
for x = 1 to 5
fulltext=fulltext & text1(x)
next
|
__________________
A+ Certified
CCNA
http://fpow.netchaos.cc
FPOW!
|

07-18-2002, 06:12 PM
|
 |
Political Coder
Retired Moderator * Guru *
|
|
Join Date: Mar 2001
Location: London, England
Posts: 8,037
|
|
|
Okay, I think I understand. You're building a commandline for the application. Do the variables in the textbox have to be in a specific order when they are inserted?
They can be removed with the Replace$() function.
|
|

07-18-2002, 06:32 PM
|
|
|
|
How do I use the Replace$() function?
|
|

07-18-2002, 06:54 PM
|
|
|
Thanks alot!!!!!!!!!!!!!!!!!!!!!!
The replace function works! 
|
|
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
|
|
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|
|