프록시를 통해 인터넷에 액세스누구든지 JMP를 사용하는 프록시를 통해 인터넷에서 스크립트를 사용하여 파일을 성공적으로 다운로드 했습니까? 그렇다면 어떻게하셨습니까?
예를 들어, 어떻게 다운로드 할 수 있습니까? SAS 로고 프록시를 사용하면서 내 컴퓨터의 파일에?
다시 : 프록시를 통해 인터넷에 액세스Brilliant, 나는 SAS 대신에 다운로드하는 JMP의 로고를 받아 들일 것입니다. 이것은 또한 작업 스케줄러에서 호출 된 스크립트에서 작동하는 것 같습니다. 내 간단한 요구 사항은 여기에 착륙했습니다 :
FileDownload = Function( { sourceurl, destpath },
{ download, temppath, result},
result = 0; //Set to 1 if successfull
Try(
// Download file as a zip (saves the file to a temporary
// location and waits for commands)
download = Open( sourceurl , zip );
// grab the temporary filename
temppath = Parse( Regex( Char( download ), "\!"[^\!"]+\!"" ) );
// Move the file to its new location
If( Move File( temppath, destpath ) == 1, result = 1 );
);
return(result);
);
FileDownload( "https://www.sas.com/profile/ui/images/logos/jmp.png", "$temp/jmplogo.png" );
Open( "$temp" );감사 @Craige_Hales 과 @Justin_Chilton
다시 : 프록시를 통해 인터넷에 액세스이 시도; JMP 12 이전에는 작동하지 않지만 12와 13 모두에서 작동하는 것으로 보입니다. 부작용을 사용합니다. @Justin_Chilton 최근에 나에게 지적했다. 둘 이상의 장소에서 호출해야하는 경우이 기능을 사용해야합니다.
// work-around. Load Text File("https:...", blob) should be able to
// do this, but currently the blob support only works for disk files.
//
// pretend the file is a zip file. it will be downloaded to await
// zip archive commands, but we won't actually use them.
download = Open( "https://www.sas.com/profile/ui/images/logos/jmp.png", zip );
// grab the temporary filename
file = Parse( Regex( Char( download ), "\!"[^\!"]+\!"" ) );
// *now* use Load Text File to access the binary data
binary = Load Text File( file, blob );
// the open function can use a binary blob if it is told the type
image = Open( binary, "png" );
// finally, show the image
New Window( "image", image );다시 : 프록시를 통해 인터넷에 액세스안녕 피터,
나는 파일을 열지 않고 파일을 다운로드 할 수있는 스크립팅 솔루션을 찾고 있다고 명시해야한다.이를 반영하기 위해 질문을 업데이트했다. Internet Open은 Internet Explorer에서 프록시 정보를 얻는 것처럼 보이지만이 경우 파일을 열기 전에 조작해야합니다.
다시 : 프록시를 통해 인터넷에 액세스이것이 당신이 무엇인지 확신 할 수 없지만 인터넷이나 원격 컴퓨터에서 파일을 다운로드하기위한 일반적인 JMP 시스템 문서는 JMP 온라인 시스템 설명서에 있습니다.
http://www.jmp.com/support/help/13-2/Import_Data_from_the_Internet_or_a_Remote_Comput.shtml