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
 Code Builder: hotkeys for Execute commands
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

AKazak

Russia
1205 Posts

Posted - 05/01/2020 :  04:18:52 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
OriginPro 2019b (64-bit) 9.6.5.169

Greetings!

I enjoy working with Code Builder to edit LabTalk scripts.
However, every time I need to execute a section of a LabTalk script or its part (selected lines) I need to call Debug|Execute Current Section and Debug|Execute Selected Lines commands.

Is there a way to assign keyboard shortcuts for these useful commands.
https://www.originlab.com/doc/Origin-Help/HotKey-in-Origin doesn't' list any...

Thank you.

cpyang

USA
1406 Posts

Posted - 05/01/2020 :  3:38:28 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
I typically use the "Custom Routine" button on the standard toolbar.



You just Ctrl+SHIFT to click that button to open it in Code Builder.

When I am done, and need new code, I rename Main to Main1 so I keep all the old code there for future reference.

CP
Go to Top of Page

AKazak

Russia
1205 Posts

Posted - 05/01/2020 :  4:20:47 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
quote:
Originally posted by cpyang

I typically use the "Custom Routine" button on the standard toolbar.



You just Ctrl+SHIFT to click that button to open it in Code Builder.

When I am done, and need new code, I rename Main to Main1 so I keep all the old code there for future reference.

CP




Thank you, but I didn't get the point...
Is this a shortcut to Debug|Execute Current Section or Debug|Execute Selected Lines commands?
Go to Top of Page

cpyang

USA
1406 Posts

Posted - 05/01/2020 :  6:02:05 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
You click this button by holding down Ctrl+Shift key, which will then open up Code Builder to the Custom.ogs file located on your user file folder, at the [Main] section, which you can then write your code.

When you want to run the code, go back to click that same button on the standard toolbar.

Basically this button was added to Origin many years ago to let people run some LatTalk easily.

CP
Go to Top of Page

AKazak

Russia
1205 Posts

Posted - 05/02/2020 :  05:22:00 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
quote:
Originally posted by cpyang

You click this button by holding down Ctrl+Shift key, which will then open up Code Builder to the Custom.ogs file located on your user file folder, at the [Main] section, which you can then write your code.

When you want to run the code, go back to click that same button on the standard toolbar.

Basically this button was added to Origin many years ago to let people run some LatTalk easily.

CP




OK, now I see that this button is a shortcut to run the code.

As for Code Bulder itself: is there a hidden keyboard shortcut to call Debug|Execute Current Section and Debug|Execute Selected Lines commands?
Go to Top of Page

AKazak

Russia
1205 Posts

Posted - 05/05/2020 :  08:58:19 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
It would be great to have keyboard shortcuts to call Debug|Execute Current Section and Debug|Execute Selected Lines commands in Code Builder.

Hope that the development team decides to implement this.
Go to Top of Page

AKazak

Russia
1205 Posts

Posted - 05/05/2020 :  10:57:04 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Is there a way to assign a keyboard shortcut to Custom Routine button?
Go to Top of Page

AKazak

Russia
1205 Posts

Posted - 05/23/2020 :  5:38:18 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
quote:
Originally posted by AKazak

Is there a way to assign a keyboard shortcut to Custom Routine button?



That would be also great to have a keyboard shortcut for Custom Routine button.
Thank you.


---
AK
Go to Top of Page

cpyang

USA
1406 Posts

Posted - 05/26/2020 :  06:28:24 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
We have been busy working on Python, so if you have a py file, F5 will execute it in 2021,

so what is your user story for custom routine in LT?

CP
Go to Top of Page

AKazak

Russia
1205 Posts

Posted - 06/04/2020 :  05:27:33 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
quote:
Originally posted by cpyang

We have been busy working on Python, so if you have a py file, F5 will execute it in 2021,

so what is your user story for custom routine in LT?

CP




I prepared an LT script to fill all layer axes to show all currently visible (activated) plots only.
Then I put the script to a separate section of Custom.ogs.
Now I want to have a shortcut for quick running the script on demand, instead of hovering the mouse cursor to Custom Routine button every time I need an update.


---
AK

Edited by - AKazak on 06/04/2020 05:27:58 AM
Go to Top of Page

cpyang

USA
1406 Posts

Posted - 06/04/2020 :  07:43:44 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
F5 is for refresh, Ctrl+F5 is for running Recalculate, so how about Alt+F5?

CP
Go to Top of Page

AKazak

Russia
1205 Posts

Posted - 06/29/2020 :  06:50:44 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
quote:
Originally posted by cpyang

F5 is for refresh, Ctrl+F5 is for running Recalculate, so how about Alt+F5?

CP




Seems to be a good idea.


---
AK
Go to Top of Page

AKazak

Russia
1205 Posts

Posted - 10/29/2020 :  08:08:41 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
OriginPro 2021 (64-bit) 9.8.0.200
Windows 7 Pro x64 SP1

Alt+F5 doesn't work for calling the Custom Routine button.
I also noticed that Comment/Uncomment keyboard shortcuts (Ctrl+K, Ctrl+C, and Ctrl+U) also don't work Code Builder.
What could cause such problem?

---
Andrey
Go to Top of Page

snowli

USA
1427 Posts

Posted - 10/29/2020 :  12:47:58 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Andrey,
I don't think we implemented Alt+F5 yet in 2021. I added it for 2021b implementation ORG-22752

I tried Ctrl+K, Ctrl+C, and Ctrl+K,Ctrl+U. They work.

E.g. on any line
Keep Ctrl key down, press K and then C. It will add //
Keep Ctrl key down, press K and then U. It will remove //


Thanks, Snow
Go to Top of Page

AKazak

Russia
1205 Posts

Posted - 10/30/2020 :  03:30:00 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
quote:
Originally posted by snowli

Hi Andrey,
I don't think we implemented Alt+F5 yet in 2021. I added it for 2021b implementation ORG-22752

I tried Ctrl+K, Ctrl+C, and Ctrl+K,Ctrl+U. They work.

E.g. on any line
Keep Ctrl key down, press K and then C. It will add //
Keep Ctrl key down, press K and then U. It will remove //


Thanks, Snow



Thank you.
However the menu items are misleading:


I read two items below as Ctrl+K or Ctrl+C, instead of Ctrl+K+C. The same is with Ctrl+K+U.
Please replace the label in the menu.

---
Andrey
Go to Top of Page

AKazak

Russia
1205 Posts

Posted - 10/30/2020 :  03:34:04 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
By the way, we already have very clear Comment/Uncomment keyboard shortcuts: Ctrl+/ and Ctrl+Shift+/.
I think the latter is enough.

I will be waiting for getting a keyboard shortcut for Custom Routine button on the standard toolbar.

---
Andrey
Go to Top of Page

nick_n

Finland
125 Posts

Posted - 10/30/2020 :  4:35:48 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
>>keyboard shortcuts: Ctrl+/ and Ctrl+Shift+/.
>>I think the latter is enough.

Hi,That combination doesn't work on my Fin keyboard, even if I change language, EVEN on numpad (I mean "/"). Thus, Ctrl+K and Ctrl+C is better, however it occupies both hands :(
If "/" would work from numpad, it will be much more better than Ctrl+K&C.
Regards,


Nikolay
Go to Top of Page

cpyang

USA
1406 Posts

Posted - 10/30/2020 :  4:59:30 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Ctrl+K was added so that going forward, we can add a lot more shortcuts.

CP
Go to Top of Page

nick_n

Finland
125 Posts

Posted - 10/30/2020 :  6:32:09 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
quote:
Originally posted by cpyang

Ctrl+K was added so that going forward, we can add a lot more shortcuts.


Sorry for confusing. No need to replicate, seems Ctrl+K and Ctrl+/ are widely accepted. I just wonder does Ctrl+'/' on numpad work on all keyboards or only I so happy.

Nikolay
Go to Top of Page

snowli

USA
1427 Posts

Posted - 12/21/2020 :  1:38:17 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Andrey,

FYI.

Alt+F5 is added to execute Custom Routine in Origin 2021b beta1 which we just announced.

Could you try?

Best,
Snow
Go to Top of Page

AKazak

Russia
1205 Posts

Posted - 12/23/2020 :  07:55:03 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
quote:
Originally posted by snowli

Hi Andrey,

FYI.

Alt+F5 is added to execute Custom Routine in Origin 2021b beta1 which we just announced.

Could you try?

Best,
Snow




Dear Snow,

The function works as like a charm in:

OriginPro 2021b (64-bit) Beta1 9.8.5.53
Windows 7 Pro x64 SP1

Thank you for adding this quickly.

---
Andrey
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