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
 All Forums
 Origin Forum for Programming
 LabTalk Forum
 opk files

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Anti-Spam Code:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkUpload FileInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
alex_eagle Posted - 11/13/2002 : 08:06:55 AM
I share opk-files with my colleagues. Now I updated my script and want to send the opk-file again.
How can I overwrite the original INI-file so that the installation
will work without deleting done by the user ??

Thank you
Alex


3   L A T E S T    R E P L I E S    (Newest First)
Mike Buess Posted - 11/14/2002 : 12:25:53 AM
Hi Alex,

The error message occurs because you're trying to create a button category (GDOES) that already exists and I suspect that the files are being overwritten anyway. In any case you can avoid the error message by testing for the existance of the GDOES toolbar before trying to create the category. Note: system.toolbar.exists() returns the wrong value in Origin 6.1 (the wording of your error message suggests that's what you are using) and the ternary expression in the new if() statement compensates for that.
if (run.section(GDOES.ogs, OnBeforeSetup) == 1) 
{
opack.undo();
return;
}
else
{
if (system.toolbar.exists(GDOES) == (int(@V)==7)?0:1)
{
if (system.toolbar.createcategory("GDOES.INI") == 0)
{
system.toolbar.create(GDOES);
%A=$General.UserDefinedGroupAdded;
%B=$General.UserDefinedGroup;
type.msgBox(GDOES %A, %B);
}
}
}
run.section(GDOES.ogs, OnAfterSetup);
This assumes that you've only changed the scripts and not the toolbar. It's a little more complicated to make toolbar changes by script, so please post back if you need to do that.

Mike Buess
Origin WebRing Member
alex_eagle Posted - 11/13/2002 : 11:46:47 AM
Hi Mike,

thanx for your quick answer.
However, it seems the opk-file doesnt overwrite the original files.
I get the error message: "This ini-file cannot be created, because it is used by another group"
I send you the OPKsetup.ogs as I found it in my Origin-directory.

if (run.section(GDOES.ogs, OnBeforeSetup) == 1) 
{
opack.undo();
return;
}
else
{

if (system.toolbar.createcategory("GDOES.INI") == 0)
{
system.toolbar.create(GDOES);
%A=$General.UserDefinedGroupAdded;
%B=$General.UserDefinedGroup;
type.msgBox(GDOES %A, %B);
}
}
run.section(GDOES.ogs, OnAfterSetup);


Mike Buess Posted - 11/13/2002 : 08:30:56 AM
Hi Alex,

In Origin 6.1 the contents of the OPK will overwrite older files automatically. In Origin 7 the user is asked first. Advise your colleagues to choose "Yes for all". Of course you should try it out yourself first.

...You can force the files to be overwritten without prompting in Origin 7 by adding this command to the [OnBeforeSetup] section of OPKSetup.ogs:

opack.autoreplace=1;

Mike Buess
Origin WebRing Member

Edited by - Mike Buess on 11/13/2002 08:39:01 AM

The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000