• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Get system unique id

Engaged ,
Feb 07, 2010 Feb 07, 2010

Copy link to clipboard

Copied

Hi All,

Is it possible to get system unique id (mac or pc any) with indesign javascript.

Any information would be greatly appreciated.

Shonky

TOPICS
Performance , Scripting

Views

2.7K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

LEGEND , Feb 08, 2010 Feb 08, 2010

The serial number is the InDesign one (although it's the shortened 20 digit one -- not the full 24 digit one, and in CS4 it's jumbled up).

The (APID unique) system id only works in APID version1.0.47 and later.

Harbs

Votes

Translate

Translate
Contributor ,
Feb 07, 2010 Feb 07, 2010

Copy link to clipboard

Copied

Hi Shonky,


I thnink there is no id for the Application.


Instead yu can declare Label to application.


Eg: For 10 systems you can declare Sys1, Sys2,...Sys10.


Code: app.label = "Sys1";


Regards,

Ramkumar .P



Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Feb 07, 2010 Feb 07, 2010

Copy link to clipboard

Copied

Hi Ramkumar,

Actually i want my computer id or you can say computer serial number not application id.

Shonky

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Feb 07, 2010 Feb 07, 2010

Copy link to clipboard

Copied

http://www.rorohiko.com/wordpress/indesign-downloads/active-page-item-developer/

Harbs

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Feb 08, 2010 Feb 08, 2010

Copy link to clipboard

Copied

Thank you Harbs,

I don't want use any plugin. I am trying to find in javascript. I have a script that can find user name so i thought that computer id or serial no. is possible too.

Shonky

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Feb 08, 2010 Feb 08, 2010

Copy link to clipboard

Copied

If APID is loaded, you can get the serial number or unique system id

with scripting. Otherwise, you're on your own...

Harbs

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Feb 08, 2010 Feb 08, 2010

Copy link to clipboard

Copied

Harbs can you give me javascript code. Is this code work with demo APID.

Thanks,

Shonky

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Feb 08, 2010 Feb 08, 2010

Copy link to clipboard

Copied

var theSystemID = app.callExtension(0x90B6C,10022);

var theSerial = app.callExtension(0x90B6C,10011);

Harbs

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Feb 08, 2010 Feb 08, 2010

Copy link to clipboard

Copied

Thank you very much Harbs,

But theSystemID showing undefined and serial no is not matching with my machine serial no.

Any suggestion?

Shonky

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Feb 08, 2010 Feb 08, 2010

Copy link to clipboard

Copied

The serial number is the InDesign one (although it's the shortened 20 digit one -- not the full 24 digit one, and in CS4 it's jumbled up).

The (APID unique) system id only works in APID version1.0.47 and later.

Harbs

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Feb 08, 2010 Feb 08, 2010

Copy link to clipboard

Copied

Thanks again Harbs for your valuable response.

One last question. How i know all the code of APID like system id, serial no. etc.

Shonky

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Feb 08, 2010 Feb 08, 2010

Copy link to clipboard

Copied

Donwload the Toolkit. There's reference manuals in the download.

Harbs

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guru ,
Feb 08, 2010 Feb 08, 2010

Copy link to clipboard

Copied

do shell script ("system_profiler SPHardwareDataType | grep \"Serial Number\" | awk '{print $3}'")

works on my tiger box… so you may be able to do this with app.doScript()

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Feb 08, 2010 Feb 08, 2010

Copy link to clipboard

Copied

Thanks Mark and Harbs,

Thanks but your code not working on leopard. I have found below code which is working.

do shell script ("system_profiler SPHardwareDataType | grep \"Serial Number\"")

How can I store this in a variable. I have not idea for applescript.

Shonky

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guru ,
Feb 08, 2010 Feb 08, 2010

Copy link to clipboard

Copied

You could just have Applescript get the last word of the whole output of system profiler?

This works again only tested on tiger…

if (File.fs == 'Macintosh') {

var systemProfile = ''

+ 'set SerialNumber to last word of (do shell script "system_profiler SPHardwareDataType")' + '\n'

+ 'return SerialNumber'

var scriptResult = app.doScript(systemProfile, 1095978087);

$.writeln(scriptResult);

}

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Feb 08, 2010 Feb 08, 2010

Copy link to clipboard

Copied

LATEST

The serial number you're getting is not reliable. If the Mac has been repaired or the disk drive replaced, you may not get any value returned.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines