Graphics

 View Only
  • 1.  a string to a number

    Posted 08-11-2016 08:24
    I'm quite new to Visual Logic so I am wondering how do you convert a letter in a string to a number e.g. A would output as 1, a=1, b=2, z=26


  • 2.  RE: a string to a number

    Posted 08-11-2016 10:34
    With visual logic, you can't... You have to create a script to do that with asc() method...
    #XPression


  • 3.  RE: a string to a number

    Posted 08-11-2016 15:33
    Well. I've made an script in visual logic what does the trick. but it is huge :D.

    about your solution... How does your script look like?
    #XPression


  • 4.  RE: a string to a number

    Posted 08-11-2016 15:42
    Really ? A capture ?!

    Considering your text object has 1 char only, into OnSetText :
    text = asc(text)-96
    #XPression


  • 5.  RE: a string to a number

    Posted 08-12-2016 09:51

    From text (A, B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,) to integer (1, 2, 3, 4, etc).

    And from integer (1, 2, 3, 4, etc). to material selector.


    #XPression