adnan shahid logo
  • Home
  • Services
  • Reviews
  • Lets Talk!
  • Cart
Get in touch
Illustration of a bird flying.
  • JavaScript: convert String to Hex code

    JavaScript: convert String to Hex code

    Below function takes parameter as string and provide result in the form of Hex code. function hexEncoderFun(str) { var result = ”; for (var i=0; i<str.length; i++) { result += str.charCodeAt(i).toString(16); } return result; }

    April 16, 2019
  • Part- 3 Illustrator Scripting Looping the shape within layer

    Part- 3 Illustrator Scripting Looping the shape within layer

    Below is couple of functions that takes parameter of active layer and process individual element to change color. function iterateOverGroup(groupCoreItem,colorIs){ for (var ai = 0; ai < groupCoreItem.pathItems.length; ai++) { colorShape(groupCoreItem.pathItems[ai],colorIs); } for (var gi = 0; gi <groupCoreItem.groupItems.length; gi++) { iterateOverGroup(groupCoreItem.groupItems[gi],colorIs); } for (var ci = 0; ci <groupCoreItem.compoundPathItems.length; ci++) { var compoundPath = […]

    April 16, 2019
  • Part- 2 Illustrator Scripting Creating folder using Javascript

    Part- 2 Illustrator Scripting Creating folder using Javascript

    Below is the code that will create a folder using javascript in illustrator script. Suppose there is dir variable selected by user. (as shown here) For MAC OS path= dir.fsName;new Folder(path+”/White”).create(); For WINDOWS OS path= dir.fsName;new Folder(path+”\\White”).create(); For different operating system in full path above is the code to create folder correctly. see the difference […]

    April 14, 2019
  • Part- 1 Illustrator Scripting opening files in path selected

    Part- 1 Illustrator Scripting opening files in path selected

    Below is the script to loop through opened files as user select the folder var dir = Folder.selectDialog(“Select location of files?”); var files = dir.getFiles(“*.ai”); // .eps IS THE EXTENSION OF FILES TO READ dir=dir.fsName; Below is the script a that can be used to loop through files from the selected folder above for(var f […]

    April 14, 2019
  • Area Calculation Javascript

    Area Calculation Javascript

    function areaOfCircle(radius) { return Math.PI * Math.pow(radius, 2); } function areaOfRectangle(width, height) { return width * height; } function areaOfSphere(radius) { return 4 * Math.PI * (Math.pow(radius, 2)); } function areaOfTriangle(baseWidth, height) { return baseWidth * height / 2; }

    May 9, 2018
  • Retina Display Media queries

    Retina Display Media queries

    @media only screen and (min-width: 320px) { } /* Retina enabled devices with smaller screen */ @media only screen and (-webkit-min-device-pixel-ratio: 2) and (min-width: 320px), only screen and ( -o-min-device-pixel-ratio: 2/1) and (min-width: 320px), only screen and ( min-device-pixel-ratio: 2) and (min-width: 320px), only screen and ( min-resolution: 192dpi) and (min-width: 320px), only screen and […]

    May 9, 2018
1 2 3 … 9
Next Page→
  • Logo & Identity
  • Mobile interface
  • web Design
  • Wire framing
  • Newsletters
  • Application
  • Print & Mix
  • Video
  • Product shoot
  • Facebook
  • Pinterest
  • Vimeo
  • Behance
  • LinkedIn
  • Twitter
  • Email

Special Prices of my services updated!! Dismiss