The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 Origin Forum for Programming
 LabTalk Forum
 scripts folder and workspaces
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

Flavs

Spain
Posts

Posted - 10/11/2006 :  08:04:35 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Version (Select Help-->About Origin): 7.5
Operating System: xp

I have a group of scripts I want to use to work with different samples. The problem is that I have to slightly modify the scripts each time. So What I want to do is to save the scripts in the folder of the corresponding sample. The problem is when I move the scripts to another folder different that the folder \originlab\originpro75\user, my scripts doesn´t work anymore. How do I tell orgin, where to look for the scripts?, same thing happend with templates, as my scripts include importing to templates.

I think that workspaces are supposed to help with this problem, but I don´t know how to use this. If I add a script to a workspace\project, and then I save the workspace. When I close the project and I open it again all the added files don´t exist anymore.

any help?

Mike Buess

USA
3037 Posts

Posted - 10/11/2006 :  08:38:36 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Script or template files that are not on your user path must be addressed by full path...

run.section(filePath\scriptName,Main);
win -t P filePath\templateName;

Files in workspace\project are saved with the project, not the workspace. Files in workspace\user are saved with the workspace. However, I don't think that saving a LabTalk file either place will help with this problem. You'll still need to use the full file path.

Mike Buess
Origin WebRing Member
Go to Top of Page

Flavs

Spain
Posts

Posted - 10/11/2006 :  11:05:04 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
OK, now I am trying to execute the script with the following

run.file("C:\Archivos de programa\OriginLab\OriginPro75\Flavio\fybimportyb\")

and it didn´t work. Nevertheless the following

run.file(fybimportyb)

worked well.

of course I double checked the path and everything looks fine.

what am I doing wrong?
Go to Top of Page

Mike Buess

USA
3037 Posts

Posted - 10/11/2006 :  5:43:59 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
run.file("C:\Archivos de programa\OriginLab\OriginPro75\Flavio\fybimportyb\") fails because of the '\' after the file name. run.file(fybimportyb) works because fybimportyb exists on your user path or the program path. To find your user path enter %Y= in the script window. To find the program path enter system.path.program$=.

Mike Buess
Origin WebRing Member
Go to Top of Page
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000