제 4회 DGMIT R&D 컨퍼런스 : Making a JavaScript based Application in Mac OS X

Preview:

DESCRIPTION

1.Introduction 2.JavaScript for Automation 3.Demo 4.Conclusion

Citation preview

Making a JavaScript based Application in Mac OS X

2014. 10. 27

Version : 1.0.0

made by 김정수 선임 R&D 2팀

2

CONTENTS.

1. Introduction ……………… 3

2. JavaScript for Automation ……………… 10

3. Demo ……………… 19

4. Conclusion ……………… 20

3

1. Introduction We are familiar with JavaScript!

4

1. Introduction We are familiar with JavaScript!

All we have made until NOW

PTer

5

1. Introduction JavaScript is a one of web components?

6

1. Introduction JavaScript is a one of web components?

7

1. Introduction JavaScript as a programming language.

JavaScript is a one of great languages in market places.

8

1. Introduction JavaScript with specific platforms

9

1. Introduction Mac OS X took JavaScript as a language for Automation

with JavaScript for Automation

10

2. JavaScript for Automation Automation

Automation

11

2. JavaScript for Automation Automation

Automation

UI Components

System Libraries

Application

12

2. JavaScript for Automation Automation

Automation

UI Components

System Libraries

Application

Mac OS X Application

13

2. JavaScript for Automation Automation

AppleScript

14

2. JavaScript for Automation Automation

AppleScript Visual Basic

15

2. JavaScript for Automation Automation

AppleScript JavaScript

16

2. JavaScript for Automation Automation

Extensibility Portability Adaptability Easy to learn

Best Programming Language for Automation!

17

2. JavaScript for Automation Access an API of Mac OS X

ObjC.import( 'Cocoa' ); $.NSLog( 'Hi everyone!' ); ... var textField = $.NSTextField.alloc.initWithFrame( $.NSMakeRect( 25, ( windowHeight - 60 ), 205, 24 ) ); textField.editable = false; var btn = $.NSButton.alloc.initWithFrame( $.NSMakeRect( 230, ( windowHeight - 62 ), 150, 25 ) ); btn.title = 'Choose an Image...'; btn.bezelStyle = $.NSRoundedBezelStyle; btn.buttonType = $.NSMomentaryLightButton; btn.target = appDelegate; btn.action = 'btnClickHandler'; window.contentView.addSubview( textFieldLabel ); window.contentView.addSubview( textField ); window.contentView.addSubview( btn );

Objective-c Style Syntax

Importing Frameworks

Example of NSWindow

18

2. JavaScript for Automation Access an application of Mac OS X

var tempMail = Application( 'Mail' ); var content = 'This is Automation Demo.\n\nHow are you today?'; var message = tempMail.OutgoingMessage({ subject : 'Automation Demo', content : content, visible : true }); tempMail.outgoingMessages.push( message ); tempMail.activate();

Getting a Mail Application

Setting a content of mail

Putting the mail into queue

Running the mail application

Setting a JSON type object for Mail

Example of using mail application

19

3. Demo

Demo

JavaScript for Automation demo

20

4. Conclusion The extension of Automation with JavaScript in Mac OS X

Automation is an excellent way to make Mac OS X application.

JavaScript is the best programming language for Automation.

If you try to make Mac OS X application your own and you don't even know how could you make something in Mac OS X,

it'll be the most acceptable and reasonable way to do with you,

JavaScript for Automation

21

4. Conclusion The extension of Automation with JavaScript in Mac OS X

Any Questions?

22

Recommended