Search found 3 matches

by didakov88
Sun Jan 15, 2017 5:56 pm
Forum: Help Me
Topic: Interface Maker
Replies: 0
Views: 3831

Interface Maker

Hi guys, I definitely need help on this one because I`m out of ideas how to accomplish the task. This script is supposed to generate/read the code for user interface. The load button doesn`t works for now but that wouldn`t be that hard to figure out. What bugs me more is that different UI elements h...
by didakov88
Sat Jan 07, 2017 3:43 pm
Forum: Photoshop Scripting: Code Snippets
Topic: Convert all string-integers into numbers
Replies: 3
Views: 12168

Re: Convert all string-integers into numbers

Hi Kukurykus
It throws error "parseAllInt is not a function".

P.S. From what i know is good idea to avoid eval (don't remember the exact reason).
by didakov88
Sat Jan 07, 2017 11:22 am
Forum: Photoshop Scripting: Code Snippets
Topic: Convert all string-integers into numbers
Replies: 3
Views: 12168

Convert all string-integers into numbers

Hi, Here is a way to convert all integers from a string into numbers without using parseInt method. String.prototype.parseAllInt = function (){ //Array to hold the numbers var numArray = []; //Use replace to find all sequences of digits this.replace( /\d+/g, function (a, b, c){ //When multiplying a ...