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

[MAC: InDesign CS4] Router IP address

Guest
Jul 27, 2010 Jul 27, 2010

Dear All,

How can I find the IP address of my local computer via Javascript. I really appreciate any help of clue on this.

Thanks,

Anil Yadav

TOPICS
Scripting
2.9K
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

Engaged , Jul 27, 2010 Jul 27, 2010

Run this code it will give you IP address.

var systemIP = "set theIP to do shell script \"ifconfig | grep 'broadcast' | awk '{print $2}'\"";
var getIP = app.doScript(systemIP, 1095978087);
alert (getIP)

Shonky

Translate
Engaged ,
Jul 27, 2010 Jul 27, 2010

Run this code it will give you IP address.

var systemIP = "set theIP to do shell script \"ifconfig | grep 'broadcast' | awk '{print $2}'\"";
var getIP = app.doScript(systemIP, 1095978087);
alert (getIP)

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
Guest
Jul 28, 2010 Jul 28, 2010

Thanks a lot Shonky and appreciate for quick and correct reply.

Can you please also suggest how to deal the same on PC?

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 ,
Jul 28, 2010 Jul 28, 2010

Sorry Anil, I have not idea for PC.

But i am sure its possible through vb script on PC.

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
Advisor ,
Jul 30, 2010 Jul 30, 2010

Hey!

If you are interested to do same on PC, take look here: http://bit.ly/9LGi4L

tomaxxi

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
Guest
Aug 02, 2010 Aug 02, 2010

Hi Tomaxxi,

First of all thanks for you help. I tried your script on Windows XP-SP3 with InDesign CS4 but it is not working. Neither it shows error nor any message while running from script window.

And when I run the the vbs file seprately it shows the below message

Message.PNG

hope it will help to update the script.

Thanks,

Anil Yadav

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
Advisor ,
Aug 02, 2010 Aug 02, 2010

Hey!

Thanks for trying script!

I just tried script on XP SP3 / InDesign CS4, and it works. Have you tried to add this in Javascript file:

alert(myIP);

alert(myGateway);

And error you got is probably because of app call for returning scriptArgs. You can't run vbs file with theese lines active. If you still have trouble, just post here, and I'll try to help you.

tomaxxi

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
Guest
Aug 02, 2010 Aug 02, 2010
LATEST

oops!

I was assuming that it was written in javascript file.

Its working fine...

Thanks again,

Anil Yadav

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