Jump to content
Macro Express Forums
James534

Inserting blank line in code

Recommended Posts

I am trying to find a way to separate code in to a way I can organize it better.  

 

Is there a way to insert a blank line to visual separate the code?

 

Thanks 

 

James

Share this post


Link to post
Share on other sites

No.

I like to separate too, so this was also a problem for me. I use a remark/comment. Technically not a blank line, but it works well. 

Share this post


Link to post
Share on other sites

I use blank comments to separate areas of my Macro Express code. I also use a yellow as a background colour to mark the first line of a new section.

 

 

Macro Express screen.jpg

Share this post


Link to post
Share on other sites

A comment without text is a blank line.

// ----------------------------------------------------------
//   Initialization
// ----------------------------------------------------------
Variable Set From Misc:  "Name of Current Macro" into %MacroName%
Variable Set String %T[1]% to ""
Variable Set String %T[2]% to "You indicated that you are running Windows "
Get OS Version String: %T[5]%
 
// --------------------------------------------------------
//   Display Introduction and Instructions
// --------------------------------------------------------
Variable Set Integer %Left% to 0 // Unused

 

Share this post


Link to post
Share on other sites

Thanks for the explanation

 

I would like to do some thing like the above explantation.

// --------------------------------------------------------
//   Display Introduction and Instructions
// --------------------------------------------------------

 

I was able to use the comment section on the right but it puts the comment after the command, I was unable to insert a comment in a line with out code attached. 

 

Thanks

 

James

Share this post


Link to post
Share on other sites

On the right edge of the Script Editor, near the top, there are four small buttons. The top two are

 

"Move command up" and

"Move command down."

 

To change the order of commands in the script, select a line (or more) and then click the button to perform the action you want.

In addition, the are keyboard shortcuts to move lines up and down:

 

Ctrl + Arrow Up

Ctrl + Arrow Down

 

I have a hazy recollection that on a computer I once used, I had to include the Shift key as part of these shortcuts:

 

Shift + Ctrl + Arrow Up

Shift + Ctrl + Arrow Down

Share this post


Link to post
Share on other sites

To enter a comment on a separate line: while in the Script Editor press Alt+Down Arrow to move to the Search box. Type "Comment" and then press the ENTER key. The Comment dialog comes up.

Share this post


Link to post
Share on other sites
5 hours ago, Samrae said:

To enter a comment on a separate line: while in the Script Editor press Alt+Down Arrow to move to the Search box.

 

I didn't know that shortcut. Thank you Samrae!

Share this post


Link to post
Share on other sites

Many people don't realize you can comment in a command or add a line as a comment. It's in the list with the rest of the commands on the left. Macro Control > Comment.

Share this post


Link to post
Share on other sites

I use a macro 'Comment (empty) below current line' with two alternative activations:
Ctrl + F12
Mouse right-click on the Comment tool icon

 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...