James534 Posted November 26, 2019 Report Share Posted November 26, 2019 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 Quote Link to comment Share on other sites More sharing options...
Cory Posted November 26, 2019 Report Share Posted November 26, 2019 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. Quote Link to comment Share on other sites More sharing options...
acantor Posted November 26, 2019 Report Share Posted November 26, 2019 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. Quote Link to comment Share on other sites More sharing options...
Samrae Posted November 26, 2019 Report Share Posted November 26, 2019 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 Quote Link to comment Share on other sites More sharing options...
James534 Posted November 27, 2019 Author Report Share Posted November 27, 2019 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 Quote Link to comment Share on other sites More sharing options...
acantor Posted November 27, 2019 Report Share Posted November 27, 2019 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 Quote Link to comment Share on other sites More sharing options...
Samrae Posted November 27, 2019 Report Share Posted November 27, 2019 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. Quote Link to comment Share on other sites More sharing options...
acantor Posted November 27, 2019 Report Share Posted November 27, 2019 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! Quote Link to comment Share on other sites More sharing options...
Samrae Posted November 28, 2019 Report Share Posted November 28, 2019 You're welcome. Also try Alt+Left to move to the list of commands and Alt+Right to move to the script. Quote Link to comment Share on other sites More sharing options...
Cory Posted November 28, 2019 Report Share Posted November 28, 2019 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. Quote Link to comment Share on other sites More sharing options...
terrypin Posted November 28, 2019 Report Share Posted November 28, 2019 I use a macro 'Comment (empty) below current line' with two alternative activations: Ctrl + F12 Mouse right-click on the Comment tool icon Quote Link to comment Share on other sites More sharing options...
James534 Posted November 29, 2019 Author Report Share Posted November 29, 2019 Thank you to everyone who replied, this was real helpful. James Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.