T O P I C R E V I E W |
lunchpack |
Posted - 01/26/2015 : 10:50:27 PM Origin Ver.9.0Pro and Service Release (Select Help-->About Origin): 9.0 Pro SR2 Operating System: Win8 x64
Hi all, i found a weird bug when using UIM control buttons. Try this: Have a new graph window or a new layout window and create a UIM button which executes "win -d;" (duplicate) on button up. The window gets duplicated, but in the duplicated window the button does not work anymore (not even the button down animation). This does NOT happen when you do the same thing in a new worksheet.
What's the difference? And how can I duplicate a graph using a script linked to a button in that graph?
Thanks a lot! Cheers, lunchpack |
7 L A T E S T R E P L I E S (Newest First) |
AnnaSharpe |
Posted - 02/11/2015 : 12:30:23 AM Thanks for the information.
|
lunchpack |
Posted - 01/30/2015 : 03:29:17 AM Amazing! Works like a charm, thank you so much! I never quite understood when exactly Origin needs to relax for a moment (e.g. it needs to take a break after plotting using plotxy and applying a theme using applytheme2g - without a break the second x-function just gets skipped...). But for the button, it actually does make sense...
Great, problem solved! Have a great weekend! |
minimax |
Posted - 01/30/2015 : 01:55:38 AM Hi lunchpack,
You may try following script to make it work on Graph window:
;{win -d;} where ; is used to delay its execution, see more reference on http://www.originlab.com/doc/LabTalk/guide/Using-Semicolons-in-LT
|
lunchpack |
Posted - 01/28/2015 : 05:47:51 AM Hi Max,
thanks for the information.
I'm well aware of the toolbar duplicate button. But I'm trying to develop a simple GUI for data analysis which I'd like to share with other scientists. I also had a look into the ODK, but VC++ and the ODK seem like an absolute overkill for what this script actually needs to do. The plan was to put the GUI into an empty graph window, save it as *.ogg and then anyone can add it to an existing project.
In these projects, this graph window containing the GUI needs to be copied to each subfolder where data is imported. And that's what the button is supposed to do. Choosing files (dlgfile), Importing files (using impexcel), organize the imported data into subfolders and then put a copy of the GUI graph window in each of these folders. Of course this can be done by hand, but I don't want to bother other users doing something manually.
I could ofcourse just run the script that includes that duplication command from a custom toolbar rather than from an UIM button (in fact, that's what I am used to call scripts from). But when it comes to sharing scripts with Labtalk/Origin C inexperienced users it is much more trouble setting up a custom menu rather than opening a *.ogg file and clicking a button.
I hope I could shed some light on my problem ;-)
Thanks for the effort anyways!
Cheers, Christian |
minimax |
Posted - 01/28/2015 : 03:24:41 AM Hi lunchpack,
We can see the problem with your project.
However, we still wonder why you would like to adding such a script on a window.
On Origin's toolbar, there is a duplicate toolbar, which can do a same operation as yours.
Is there any typical reason on using the UIM button instead?
Max OriginLab |
lunchpack |
Posted - 01/27/2015 : 07:57:24 AM Hi Jacqueline,
thanks for your reply. I've submitted a project file for illustration and a bug description by email.
Cheers, Christian |
JacquelineHe |
Posted - 01/27/2015 : 05:34:01 AM Hi,
Thanks for reporting this problem to us.
Currently we can't fix the problem immediately, but we will submit a task and sent to our developer.
If you don't mind, could you please send your project file to us? Tech Support department: tech@originlab.com Please mention this forum post in the Email.
Additional, our developer hopes to know why you need this kind of script. That is easy to lead infinite loop.
Thanks Jacqueline OriginLab |