22
Making a JavaScript based Application in Mac OS X 2014. 10. 27 Version : 1.0.0 made by 김정수 선임 R&D 2

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

Embed Size (px)

DESCRIPTION

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

Citation preview

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

Making a JavaScript based Application in Mac OS X

2014. 10. 27

Version : 1.0.0

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

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

2

CONTENTS.

1. Introduction ……………… 3

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

3. Demo ……………… 19

4. Conclusion ……………… 20

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

3

1. Introduction We are familiar with JavaScript!

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

4

1. Introduction We are familiar with JavaScript!

All we have made until NOW

PTer

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

5

1. Introduction JavaScript is a one of web components?

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

6

1. Introduction JavaScript is a one of web components?

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

7

1. Introduction JavaScript as a programming language.

JavaScript is a one of great languages in market places.

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

8

1. Introduction JavaScript with specific platforms

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

9

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

with JavaScript for Automation

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

10

2. JavaScript for Automation Automation

Automation

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

11

2. JavaScript for Automation Automation

Automation

UI Components

System Libraries

Application

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

12

2. JavaScript for Automation Automation

Automation

UI Components

System Libraries

Application

Mac OS X Application

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

13

2. JavaScript for Automation Automation

AppleScript

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

14

2. JavaScript for Automation Automation

AppleScript Visual Basic

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

15

2. JavaScript for Automation Automation

AppleScript JavaScript

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

16

2. JavaScript for Automation Automation

Extensibility Portability Adaptability Easy to learn

Best Programming Language for Automation!

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

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

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

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

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

19

3. Demo

Demo

JavaScript for Automation demo

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

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

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

21

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

Any Questions?

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

22