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

Mount the server using javascript

Community Beginner ,
Mar 14, 2022 Mar 14, 2022

Copy link to clipboard

Copied

Hi Guys,
I just wanna alternate javascript code for the below applescript  :

tell application "Finder"

mount volume "smb://server/Automation"

mount volume "smb://server/Library"

end tell

In applescript we can able to mount a server using the above mentioned code, but i need the code in javascript to mount the server.

Can anyone help on this request...

Thanks in Advance,
Muthu


Views

151

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 ,
Mar 14, 2022 Mar 14, 2022

Copy link to clipboard

Copied

Which JavaScript (eg Photoshop, Acrobat, web browser, Automator)?

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
Community Beginner ,
Mar 14, 2022 Mar 14, 2022

Copy link to clipboard

Copied

Indesign Javascript

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
Community Expert ,
Mar 14, 2022 Mar 14, 2022

Copy link to clipboard

Copied

I don't think JS has such native capabilities. In my opinion you might have to keep using this applescript and write a similiar VBScript for WIN, if making this work on both platforms is the end game you desire.

-Manan

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
Community Expert ,
Mar 14, 2022 Mar 14, 2022

Copy link to clipboard

Copied

LATEST

Hi Muthu,

just to add to Manan's reply:
You could execute AppleScript code with ExtendScript.

Sampel code with method doScript() :

var s =
'''
tell application "Finder"
mount volume "smb://server/Automation"
mount volume "smb://server/Library"
end tell
''';

app.doScript( s , ScriptLanguage.APPLESCRIPT_LANGUAGE );

 

Regards,
Uwe Laubender

( ACP )

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