| T O P I C R E V I E W |
| white.string |
Posted - 07/07/2005 : 07:40:53 AM Origin Version (Select Help-->About Origin): 7.5 SR3 Operating System: WinXP
Hi,
I've got problems saving a project with fdlog.saveAs(). Using the code below I can save my project with the name stored in %P, but when I change the default name in the dialog box the name of the project remains the one given in %P. So in this way I'm unable to save the project into a different file. This is only the last part of the code, if one needs more information just let me know. Thanks! Rolf
%J="\\path\to\project\"; %P="projectfile"; fdlog.numtypes=2; fdlog.type1$=[*.opj-Dateien]*.OPJ; fdlog.type2$=[Alle Dateien]*.*; fdlog.defType=1; fdlog.ShowComment=1; fdlog.path$="%J"; fdlog.default$="%P"; if(fdlog.SaveAs(N)==0) { // %J=%J%P; save -di %P; type -b "saved at %J ."; } else { type -b ("Error while saving!"); };
Edited by - white.string on 07/07/2005 07:42:09 AM |
| 4 L A T E S T R E P L I E S (Newest First) |
| Mike Buess |
Posted - 07/08/2005 : 06:40:21 AM In both cases the argument determines which string variable will hold the file path.
if( fdlog.save(P)==0 ) save %P;
if( fdlog.open(Z)==0 ) open -w %Z;
Mike Buess Origin WebRing Member |
| white.string |
Posted - 07/08/2005 : 01:54:22 AM Dear Hideo,
I'm wondering what is the role of the letter in fdlog.saveAs(A) or fdlog.open(A). Looking into different code the letter varies. So far I didn't care about but now it seems that is more than a dummy ;-) Thanks for any comment.
Bye, Rolf |
| Hideo Fujii |
Posted - 07/07/2005 : 10:33:29 AM Dear Rolf,
Thank you very much for the tip. We will reflect your tip in the next release of LabTalk document.
OriginLab Hideo Fujii
|
| white.string |
Posted - 07/07/2005 : 07:51:11 AM Okay, I've found the reason by myself, maybe it could be helpful for someone else...
if(fdlog.SaveAs(A)==0) { save %A;
works as desired. Cheers, Rolf |