User Tag List

Page 1 of 2 1 2 LastLast
Results 1 to 10 of 11

Thread: Char-code Finding

  1. #1
    No Products Registered

    Join Date
    Oct 2009
    Posts
    480
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Char-code Finding

    Is there a way to find the char-code of some text by it's index (example: " " = 32)?

    -Thanks, Variant

  2. #2
    Clicker Multimedia Fusion 2 DeveloperSWF Export Module
    Saml's Avatar
    Join Date
    Jan 2009
    Posts
    34
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Char-code Finding

    I'd also like to know how to do this, if possible.

  3. #3
    Clicker Multimedia Fusion 2SWF Export Module
    Jacob's Avatar
    Join Date
    Jul 2007
    Location
    Second pixel to the right
    Posts
    3,208
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Char-code Finding

    Control X?

  4. #4
    Clicker Multimedia Fusion 2

    Join Date
    Jan 2007
    Posts
    167
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Char-code Finding

    String Parser 2!

  5. #5
    No Products Registered

    Join Date
    Oct 2009
    Posts
    480
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Char-code Finding

    That doesn't do it by index, it picks the first character in the string.

    -Thanks, Variant

  6. #6
    Clicker Fusion 2.5 DeveloperSWF Export ModuleUnicode Add-on
    Looki's Avatar
    Join Date
    Aug 2006
    Location
    Karlsruhe, Germany
    Posts
    3,739
    Mentioned
    5 Post(s)
    Tagged
    1 Thread(s)

    Re: Char-code Finding

    You can use String Parser 2 to convert a character to its ASCII value and vice versa.

  7. #7
    No Products Registered

    Join Date
    Oct 2009
    Posts
    480
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Char-code Finding

    But how can you pick the character by index?

    -Thanks, Variant

  8. #8
    Clicker Fusion 2.5 DeveloperSWF Export ModuleUnicode Add-on
    Looki's Avatar
    Join Date
    Aug 2006
    Location
    Karlsruhe, Germany
    Posts
    3,739
    Mentioned
    5 Post(s)
    Tagged
    1 Thread(s)

    Re: Char-code Finding

    You never asked for that.
    Mid$("Text",2,1) would return "x". Is that what you want?

  9. #9
    No Products Registered

    Join Date
    Oct 2009
    Posts
    480
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Char-code Finding

    Quote Originally Posted by Looki
    You never asked for that.
    Mid$("Text",2,1) would return "x". Is that what you want?
    Kind of, imagine I have a string: "Hello World!" I would need all that string's char-codes in order, like "123-32-64-154" something like that. And I need a way to determine the char-code of a piece of string by index, like "GetCharValAt('myString', 4)", returning the char-val of "t". I am pretty sure there is a way to do that I am just not sure how.

    -Thanks, Variant

  10. #10
    Clicker Multimedia Fusion 2

    Join Date
    Jan 2007
    Posts
    167
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Char-code Finding

    Well this is kinda obvious. Use Mid$() and String Parser 2 together. In the case of your example: you would use asc( "String Parser", Mid$("myString", 3, 1)) to get the ascii value of 't'
    Mid$("myString", 3, 1) returns 't'
    asc("String Parser", ) returns the ascii value

    If you want to do it for all letters, run a loop through your string.

Page 1 of 2 1 2 LastLast

Similar Threads

  1. [BUG 256.34] newline$ char in String object
    By Olivier in forum Multimedia Fusion 2 - Technical Support
    Replies: 8
    Last Post: 18th February 2013, 06:27 AM
  2. Finding specific strings or actions in the code - is there an easy way?
    By Yos in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 15th October 2012, 10:37 AM
  3. Creating a provisioning profile and * char
    By AndyH in forum iOS Export Module Version 2.0
    Replies: 7
    Last Post: 22nd February 2011, 07:25 AM
  4. Create your own char help
    By Oreo in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 28th July 2008, 11:33 PM
  5. Convertir long p1 en char temp[]
    By Tyrael in forum Extension Developers Lobby
    Replies: 3
    Last Post: 29th October 2006, 06:38 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •