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

Need help using Socket

New Here ,
Jan 18, 2017 Jan 18, 2017

Copy link to clipboard

Copied

I need to connect to a webpage that contains a list of documents. Need to grab the next document ID available by reading the top most document.

Can somebody point in the right direction?

I tried the script that comes in the manual but something is not working right.

Thanks.

TOPICS
Scripting

Views

400

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

Mentor , Jan 19, 2017 Jan 19, 2017

Hi funsekon,

I have a sample script that opens a socket connection and retrieves data from an internet site. I don't know exactly what "grab the next document ID" means, but this sample will at least show how to use the Socket object. Look at script 10.02.

FrameMaker ExtendScript Samples - West Street Consulting

Russ

Votes

Translate

Translate
Advocate ,
Jan 18, 2017 Jan 18, 2017

Copy link to clipboard

Copied

Which script in the manual are you referring to?

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
New Here ,
Jan 19, 2017 Jan 19, 2017

Copy link to clipboard

Copied

reply = "";

conn = new Socket();

// access Adobe’s home page

if (conn.open ("www.adobe.com:80")) {

// send a HTTP GET request

conn.write ("GET /index.html HTTP/1.0\n\n");

// and read the server’s reply

reply = conn.read(99); //999999

conn.close();

}

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
Mentor ,
Jan 19, 2017 Jan 19, 2017

Copy link to clipboard

Copied

Hi funsekon,

I have a sample script that opens a socket connection and retrieves data from an internet site. I don't know exactly what "grab the next document ID" means, but this sample will at least show how to use the Socket object. Look at script 10.02.

FrameMaker ExtendScript Samples - West Street Consulting

Russ

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
New Here ,
Jan 19, 2017 Jan 19, 2017

Copy link to clipboard

Copied

LATEST

Thanks Russ,

Your script is very helpful to understand the process. Seems like my issue may be the firewall blocking access.

Regards,

funsekon

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