Welcome to the VanDyke Software Forums

Join the discussion today!


Go Back   VanDyke Software Forums > Scripting

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 05-28-2013, 11:33 PM
powerfongfong powerfongfong is offline
Registered User
 
Join Date: May 2013
Posts: 1
Unhappy Securecrt on MAC OS runs vbs script

Hi all,

I just found that I can't run vbs script on securecrt of MAC OS.
Basically when I clicked script and run, I could choose type *py or *all, and if I were to choose vbs script with *all, I will have got an error that "unable to determine script engine from file extension and no '$language' script header found."

PS: the same vbs script just works perfectly on my securecrt of PC.

Thanks a lot.
JF
Reply With Quote
  #2  
Old 05-29-2013, 08:47 AM
bgagnon bgagnon is offline
VanDyke Technical Support
 
Join Date: Oct 2008
Posts: 3,937
Hello JF,

That is correct. VBScript is a Microsoft product.

The suggested scripting language for the Mac OS is Python.

What script are you trying to use?

Is it some example script you found in these forums or got from Vandyke?
__________________
Thanks,
--Brenda

VanDyke Software
Technical Support
support@vandyke.com
(505) 332-5730
Reply With Quote
  #3  
Old 05-30-2013, 06:15 AM
Sage2k Sage2k is offline
Registered User
 
Join Date: May 2013
Posts: 1
I recently made several scripts in VB, but of course they wouldnt work on my coworkers Mac laptop. It really only took me about 20 minutes to change the syntax from VB to python. I am no programmer either. For example, just google search "python if then" to see how they do their syntax.
Reply With Quote
  #4  
Old 12-12-2014, 07:41 PM
Tonatiuh Tonatiuh is offline
Registered User
 
Join Date: Jul 2006
Posts: 68
What about Java Script? Is it possible to reproduce every single vbscript into a JavaScript script?

I need to alternate my computers between Windows and Mac, and obviously I do not want to create twice my scripts. What I would like is to change my VBScripts to JavaScrits to run the same script in both plataforms.

Can anyone advise me about that?
Reply With Quote
  #5  
Old 12-13-2014, 09:43 AM
rtb rtb is offline
VanDyke Technical Support
 
Join Date: Aug 2008
Posts: 4,306
Hi Tonatiuh,

Currently, if you want to use the same script on both Mac OS X and Windows, you must use Python for the script language.

I am not sure if JavaScript has an ActiveX engine on Windows, and SecureCRT on Mac OS X doesn't support JavaScript.

If you are referencing JScript, this is a Microsoft language specific to Windows.

Does this help to clarify?
__________________
--Todd

VanDyke Software
Technical Support
support@vandyke.com
505-332-5730
Reply With Quote
  #6  
Old 12-13-2014, 12:12 PM
Tonatiuh Tonatiuh is offline
Registered User
 
Join Date: Jul 2006
Posts: 68
Thumbs down

Yes you are clear. But this is a VERY bad news for me. I am really disappointing about that.
Reply With Quote
  #7  
Old 12-13-2014, 10:44 PM
Tonatiuh Tonatiuh is offline
Registered User
 
Join Date: Jul 2006
Posts: 68
Can you please explain the requirements for SecureCRT to run Python scripts?

Should I install the Python installer in my Windows and Mac computers?

How compatible Python is with SecureCRT?

How to start on Python?
Reply With Quote
  #8  
Old 12-15-2014, 09:12 AM
rtb rtb is offline
VanDyke Technical Support
 
Join Date: Aug 2008
Posts: 4,306
Hi Tonatiuh,
Quote:
Can you please explain the requirements for SecureCRT to run Python scripts?
SecureCRT 7.3 on Windows includes Python capability, and the syntax will be Python 2.6.

On Mac OS X, SecureCRT 7.3 uses Python 2.7 which is already installed on Yosemite and Mavericks. You can use the same Python 2.6 syntax in scripts that will run on both Windows and Mac OS X.
Quote:
Should I install the Python installer in my Windows and Mac computers?
You can install Python on Windows, but it can cause more problems than it is worth. SecureCRT 7.3 includes Python 2.6. If you are using an older version of SecureCRT, 6.6 and newer supports Python 2.6 on Windows.
Quote:
How compatible Python is with SecureCRT?
You should be able to do most of the same things in Python that you are able to do in VBScript. If you encounter specific problems using Python, we would need specific details.
Quote:
How to start on Python?
A good place to start would be the Python documentation. You can find it at the following location:
https://docs.python.org/2.6/
We also have some examples written in Python at the following location:
https://forums.vandyke.com/showthread.php?t=10365
Additionally, we will post to this thread if we add JavaScript as an alternative to Python for cross platform scripting.

If you would like to be notified directly, please complete and submit the form at the following location:
Submit Feature Request
__________________
--Todd

VanDyke Software
Technical Support
support@vandyke.com
505-332-5730

Last edited by rtb; 12-15-2014 at 09:30 AM.
Reply With Quote
  #9  
Old 12-15-2014, 09:47 AM
Tonatiuh Tonatiuh is offline
Registered User
 
Join Date: Jul 2006
Posts: 68
Thank you for the detailed responses. They are very valuable.

The last one, you have a lot of vbscript for SecureCRT examples in your wab pages. This has been the fastest and easy way to learn how to exploit this SecureCRT capability.

Do you have some docs regarding to the same aboyt python?
Reply With Quote
  #10  
Old 12-15-2014, 10:42 AM
rtb rtb is offline
VanDyke Technical Support
 
Join Date: Aug 2008
Posts: 4,306
Hi Tonatiuh,

We don't have a scripting manual for Python, but the concepts outlined in the scripting manual that we have are applicable to Python.

We have several examples in the scripting forum sticky that I suggested in my previous post.

My guess is that most of the questions will be Python related rather than SecureCRT API related, so the Python documentation will likely be very valuable. That is where I go anytime I am working on a Python script.

We will post here if we ever create a Python related scripting manual.
__________________
--Todd

VanDyke Software
Technical Support
support@vandyke.com
505-332-5730
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -6. The time now is 08:07 AM.