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

Get system unique id

Engaged ,
Feb 07, 2010 Feb 07, 2010

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
3.5K
Translate
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

Translate
Contributor ,
Feb 07, 2010 Feb 07, 2010

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



Translate
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

Hi Ramkumar,

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

Shonky

Translate
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

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

Harbs

Translate
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

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

Translate
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

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

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

Harbs

Translate
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

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

Thanks,

Shonky

Translate
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

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

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

Harbs

Translate
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

Thank you very much Harbs,

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

Any suggestion?

Shonky

Translate
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

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

Translate
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

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

Translate
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

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

Harbs

Translate
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

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()

Translate
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

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

Translate
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

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);

}

Translate
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
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.

Translate
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