Welcome to the VanDyke Software Forums

Join the discussion today!


Go Back   VanDyke Software Forums > Scripting

Notices

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 10-08-2015, 09:23 PM
djdumlao djdumlao is offline
Registered User
 
Join Date: Oct 2015
Posts: 2
Post Discussion of the ImportArbitraryDataToSecureCRTSessions example script

miked will the python script work on windows 7? How do we change the folder location. Thanks

Last edited by jdev; 12-04-2017 at 09:48 AM.
Reply With Quote
  #2  
Old 10-09-2015, 08:07 AM
rtb rtb is offline
VanDyke Technical Support
 
Join Date: Aug 2008
Posts: 4,306
Hi djdumlao,

The Python version of this example script should work on Windows 7. It is intended to be run from within SecureCRT.

What folder location are you trying to change?
__________________
--Todd

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

Last edited by jdev; 12-04-2017 at 09:48 AM.
Reply With Quote
  #3  
Old 10-14-2016, 08:04 AM
redleg1sg redleg1sg is offline
Registered User
 
Join Date: Jul 2016
Posts: 7
Problem with ImportArbitraryDataFromFileToSecureCRTSessions.vbs

Using the latest ImportArbitraryDataFromFileToSecureCRTSessions.vbs script from the support site.

Getting the error shown in pdf attachment the consistently.

It appears that the first directory is created then nested again with the actual session file on line 410, then cannot be located in the original directory on line 414 as it does not exist there.

Perhaps the line 410 objConfig.Save strSessionPath command is double pre-pending the folder name internally somehow. Don't know but I've tried to track it down and that's the best I can come up with.

Please help. I have > 200 sessions to import and more on the way.
Attached Files
File Type: pdf ScriptIssue.pdf (123.4 KB, 984 views)
File Type: txt MySessions.txt (190 Bytes, 1026 views)

Last edited by jdev; 12-04-2017 at 09:49 AM.
Reply With Quote
  #4  
Old 10-14-2016, 01:45 PM
bgagnon bgagnon is offline
VanDyke Technical Support
 
Join Date: Oct 2008
Posts: 4,636
Hi redleg1sg,

Are you using a SecureCRT v8.1 build?

If so, we think the script behavior has been changed by a change made to v8.1. Please contact support@vandyke.com and reference "Attn Brenda - Forum Thread #10605" in the subject line so we can determine a v8.0.x build you can use.
__________________
Thanks,
--Brenda

VanDyke Software
Technical Support
support@vandyke.com
(505) 332-5730
Reply With Quote
  #5  
Old 10-19-2016, 10:52 AM
bgagnon bgagnon is offline
VanDyke Technical Support
 
Join Date: Oct 2008
Posts: 4,636
Hi redleg1sg,

Please contact us per the details in my prior post. We have a new v8.1.x build that should resolve this issue.
__________________
Thanks,
--Brenda

VanDyke Software
Technical Support
support@vandyke.com
(505) 332-5730
Reply With Quote
  #6  
Old 11-30-2017, 03:57 PM
VanDyke82nev VanDyke82nev is offline
Registered User
 
Join Date: Jul 2017
Posts: 17
Is the script at the top of this thread the lastest version that will work on v8.1.3 ?

Last edited by jdev; 12-04-2017 at 09:50 AM. Reason: maybe verstion at top is the latest one and we don't have to email her
Reply With Quote
  #7  
Old 11-30-2017, 04:07 PM
ekoranyi ekoranyi is offline
VanDyke Technical Support
 
Join Date: Jan 2017
Posts: 654
Hi VanDyke82nev,

This issue is over a year old, updated versions of the script have been uploaded to the forums twice since then, on both 20 Feb, 2017 and 09 Aug, 2017.

The updated script can be found in the Example Scripts sticky, specifically the Example: Import Arbitrary Data From File to SecureCRT Sessions posting.

What trouble are you having when you try to run the script?
__________________
Thanks,
--Eric

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

Last edited by jdev; 12-04-2017 at 09:51 AM.
Reply With Quote
  #8  
Old 12-01-2017, 10:12 AM
VanDyke82nev VanDyke82nev is offline
Registered User
 
Join Date: Jul 2017
Posts: 17
Well, the previous post says:

Quote:
Please contact us per the details in my prior post. We have a new v8.1.x build that should resolve this issue.
So it seemed like you wanted us to email you for the latest one. I downloaded the script and see the recent updates. Thanks Eric.
Reply With Quote
  #9  
Old 12-01-2017, 10:37 AM
ekoranyi ekoranyi is offline
VanDyke Technical Support
 
Join Date: Jan 2017
Posts: 654
Hi VanDyke82nev,

I apologize for any confusion we may have caused. The issue that was present for this thread was for a very specific version of SecureCRT 8.1.x, we were offing to provide the customer with a pre-release version of SecureCRT to address the issue. This fix has since been implemented into official releases of SecureCRT.

I hope this help clarify and I'm glad to hear that you were able to successfully get the needed scripts.
__________________
Thanks,
--Eric

VanDyke Software
Technical Support
support@vandyke.com
(505) 332-5730
Reply With Quote
  #10  
Old 12-01-2017, 09:15 PM
VanDyke82nev VanDyke82nev is offline
Registered User
 
Join Date: Jul 2017
Posts: 17
Quote:
Originally Posted by ekoranyi View Post
Hi VanDyke82nev,

I apologize for any confusion we may have caused. The issue that was present for this thread was for a very specific version of SecureCRT 8.1.x, we were offing to provide the customer with a pre-release version of SecureCRT to address the issue. This fix has since been implemented into official releases of SecureCRT.

I hope this help clarify and I'm glad to hear that you were able to successfully get the needed scripts.
Yes it has, and you are the greatest!
Reply With Quote
  #11  
Old 12-15-2017, 04:38 AM
mnorris mnorris is offline
Registered User
 
Join Date: Nov 2017
Posts: 2
Haven't used the script in a while but today:

Went to use the script today (.py version latest November 2017) and consistently get the following error:

ScriptError

Error: The session option was not found: X Position

File: /home/mike/Dropbox/VanDyke/ImportArbitraryDataFromFileToSecureCRTSessions.py
Line: 609

objConfig.SetOption("X Position", 100)

Any help would be useful as I don't really want to have to manually import 200+servers.
Reply With Quote
  #12  
Old 12-15-2017, 08:26 AM
ekoranyi ekoranyi is offline
VanDyke Technical Support
 
Join Date: Jan 2017
Posts: 654
Hi mnorris,

I'm sorry you're having trouble. Are you using the script found here?

I downloaded and tested this script and had no trouble with its use. In fact I don't see that 609 contains "objConfig.SetOption("X Position", 100)" or that the script contains that line of code at all.

Does downloading and using the script from the link provided allow you to use the script as expected?
__________________
Thanks,
--Eric

VanDyke Software
Technical Support
support@vandyke.com
(505) 332-5730
Reply With Quote
  #13  
Old 12-15-2017, 08:52 AM
mnorris mnorris is offline
Registered User
 
Join Date: Nov 2017
Posts: 2
Thanks, it was my problem

Thanks for that Eric,
Had not noticed that the download had a .txt extension, I though it was overwriting my previous version but it was just downloading the version with .txt.
Now I've manually copied it to the correct extension all is working as expected.

Doh!

Mike.
Reply With Quote
  #14  
Old 12-15-2017, 09:08 AM
ekoranyi ekoranyi is offline
VanDyke Technical Support
 
Join Date: Jan 2017
Posts: 654
Hi mnorris,

I'm glad to hear you're up and running. Please don't hesitate to reach out if you have any other questions.

Just as an aside, the top two lines in the code,

Code:
# $language = "Python"
# $interface = "1.0"
allow SecureCRT to correctly determine the script type when the file is a .txt. This means that you should be able to point to the .txt file and have it run as is.
__________________
Thanks,
--Eric

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

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 04:32 PM.