Posted By
|
Message
|
The_Antisony At least I'm not Circy
Registered 01/07/2002
Points 1341
|
4th November, 2013 at 04/11/2013 18:10:10 -
I'm trying to pull an external IP address by using the GET object and string parser 2.
This is what I got so far:
On START OF FRAME:
Get Object -> Get URL: "http://www.whatsmyip.us/showipsimple.php";
String Parser 2 -> Add delimiter: IndexToChar( "ASCII Character Object", 34); <-adds quote as delimiter.
On GET COMPLETE:
Edit Box -> Set Alterable String A to Received$( "Get object" );
String Parser 2 -> Set source string to Alterable String A( "Edit Box" );
Edit Box -> Set text to listGetAt$( "String Parser", 2);
The app works and it will correctly pull an external IP address; just wondering if there's any way to get rid of that pesky ASCII character object as I probably won't be using it anywhere else in my app. Isn't there some kind of trick to using quotes in strings without confusing the hell out of MMF2?
ChrisD> Employer: Say, wanna see a magic trick?
ChrisD> Employee: Uhh… sure, boss.
ChrisD> Employer: Your job! It just disappeared! Pack your things and leave! Pretty good trick, huh?
|
Akai_R
Registered 16/04/2008
Points 436
|
4th November, 2013 at 04/11/2013 18:28:53 -
I think you can store the quotes somewhere else, like in a global string, and draw it from there when you need it.
______
http://akai-r.com/
|
Sketchy Cornwall UK
Registered 06/11/2004
Points 1971
|
4th November, 2013 at 04/11/2013 18:41:02 -
In MMF2, you can escape quotes by putting two of them together - so """" is a string containing a single double-quotation mark, which looks to be what you want
eg.
"My name is ""Bob"", and I'm a builder" => My name is "Bob", and I'm a builder.
Edited by Sketchy
n/a
|
The_Antisony At least I'm not Circy
Registered 01/07/2002
Points 1341
|
12th November, 2013 at 12/11/2013 14:26:50 -
That did the trick, Sketchy. Thanks again, mate. I was able to stop using the ASCII Character object all-together.
ChrisD> Employer: Say, wanna see a magic trick?
ChrisD> Employee: Uhh… sure, boss.
ChrisD> Employer: Your job! It just disappeared! Pack your things and leave! Pretty good trick, huh?
|
|
|