|
-
Oct 28th, 2009, 03:08 PM
#1
Thread Starter
Member
[RESOLVED] Parenthesis in String?
Hi, I'm trying to make a string use parenthesis ( "(" and ")" ), but for each one it returns: null (for the parenthesis)
How can I get this to work?
These are examples of codes I've tried so far:
Code:
public lpr as string = chr(40).toString()
public rpr as string = chr(41).toString()
...
public string1 as string = lpr & " " & rpr
(Didn't work, returned a space.)
Code:
public string1 as string = "( )"
(Didn't work, returned a space.)
Code:
public lpr as string = "("
public rpr as string = ")"
...
public string1 as string = lpr & " " & rpr
(Didn't work, returned a space.)
And then I tried reading from text files that had those characters. Each one only returned a space.
How can I get this to work?
Thanks,
-Arightwizard
The following statements are true. The following statement is false. The first statement is true.
-
Oct 28th, 2009, 03:14 PM
#2
Re: Parenthesis in String?
What do you mean it returned a space? those last two examples do work.... what are you doing to check the string afterwards that's causing a space to be returned? you should end up with a string 3 characters long.
-tg
-
Oct 28th, 2009, 03:16 PM
#3
Re: Parenthesis in String?
That is most unusual. There's nothing special about parentheses so it should be no different from doing
public string1 as string = "a a"
-
Oct 28th, 2009, 03:17 PM
#4
Thread Starter
Member
Re: Parenthesis in String?
@techgnome:
Sorry, forgot that part
Later I'm using string1 in a "sendkeys.send".
So it would be
Code:
public string1 as string = "( )"
sendkeys.send(string1)
(No, I am not making any sort of 'bot'.)
The following statements are true. The following statement is false. The first statement is true.
-
Oct 28th, 2009, 03:18 PM
#5
Re: Parenthesis in String?
Try this
Public string1 as string = chr(40) & " " & chr(41)
A good exercise for the Heart is to bend down and help another up...
Please Mark your Thread " Resolved", if the query is solved
MyGear:
★ CPU ★ Ryzen 5 5800X
★ GPU ★ NVIDIA GeForce RTX 3080 TI Founder Edition
★ RAM ★ G. Skill Trident Z RGB 32GB 3600MHz
★ MB ★ ASUS TUF GAMING X570 (WI-FI) ATX Gaming
★ Storage ★ SSD SB-ROCKET-1TB + SEAGATE 2TB Barracuda IHD
★ Cooling ★ NOCTUA NH-D15 CHROMAX BLACK 140mm + 10 of Noctua NF-F12 PWM
★ PSU ★ ANTEC HCG-1000-EXTREME 1000 Watt 80 Plus Gold Fully Modular PSU
★ Case ★ LIAN LI PC-O11 DYNAMIC XL ROG (BLACK) (G99.O11DXL-X)
★ Monitor ★ LG Ultragear 27" 240Hz Gaming Monitor
★ Keyboard ★ TVS Electronics Gold Keyboard
★ Mouse ★ Logitech G502 Hero
-
Oct 28th, 2009, 03:19 PM
#6
Thread Starter
Member
Re: Parenthesis in String?
 Originally Posted by koolsid
Try this
Public string1 as string = chr(40) & " " & chr(41)
Still returned a space.
The following statements are true. The following statement is false. The first statement is true.
-
Oct 28th, 2009, 03:21 PM
#7
Re: Parenthesis in String?
I'm using string1 in a "sendkeys.send".
That does make rather a large difference.
If you are using sendkeys you need to enclose the characters in braces... ie "{(} {)}"
-
Oct 28th, 2009, 03:23 PM
#8
Re: Parenthesis in String?
public string1 as string = "( )"
sendkeys.send(string1)
sendkeys.send("( )") '<~~ What is this supposed to do?
A good exercise for the Heart is to bend down and help another up...
Please Mark your Thread " Resolved", if the query is solved
MyGear:
★ CPU ★ Ryzen 5 5800X
★ GPU ★ NVIDIA GeForce RTX 3080 TI Founder Edition
★ RAM ★ G. Skill Trident Z RGB 32GB 3600MHz
★ MB ★ ASUS TUF GAMING X570 (WI-FI) ATX Gaming
★ Storage ★ SSD SB-ROCKET-1TB + SEAGATE 2TB Barracuda IHD
★ Cooling ★ NOCTUA NH-D15 CHROMAX BLACK 140mm + 10 of Noctua NF-F12 PWM
★ PSU ★ ANTEC HCG-1000-EXTREME 1000 Watt 80 Plus Gold Fully Modular PSU
★ Case ★ LIAN LI PC-O11 DYNAMIC XL ROG (BLACK) (G99.O11DXL-X)
★ Monitor ★ LG Ultragear 27" 240Hz Gaming Monitor
★ Keyboard ★ TVS Electronics Gold Keyboard
★ Mouse ★ Logitech G502 Hero
-
Oct 28th, 2009, 03:23 PM
#9
Thread Starter
Member
Re: Parenthesis in String?
 Originally Posted by keystone_paul
That does make rather a large difference.
If you are using sendkeys you need to enclose the characters in braces... ie "{(} {)}"
Ohhhhhhhhhhhhhhhhhhhhhhhhh. Thanks, it worked.
-Arightwizard
*marking as resolved*
The following statements are true. The following statement is false. The first statement is true.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|