Jump to content
Marco105

For line go up and down

Recommended Posts

Marco105

Hello,

I want add a shortcut for move the current line UP and DOWN with : Ctrl+Shift+ arrow UP or DOWN.

How to do that ?

Share this post


Link to post
Share on other sites
Melba23

Marco105,

Welcome to the AutoIt forums.

What sort of line do you want to move? Is it in an edit control, a ListView, a web browser?

M23


Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______Open Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites
Marco105

Thank you, I want to move the line of code where the caret is in ScieTE Editor. I found a patch for that but I don't know if and how to install it.

Share this post


Link to post
Share on other sites
Jos
Posted (edited)

It would really help when you try to give complete information when asking a question! ;)
What patch are you talking about? Is it a LUA function?

Jos

Edited by Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
Marco105

I found a patch on Source Forge for implement that function named 'Move Selection.patch' but I don't know  if I have to recompil completly the apps for that ?

Share this post


Link to post
Share on other sites
Marco105

I think I have ask sth disturbing. Maybe a complement is necessary... I try to use Autoit GUI framework for W7 64 to make an interface, but the Editor don't have 'move line' up or dwn which is very usefull for writing code. I just try to know if it's possible to have it. Autoit rely to SciTE editor and I look in the original apps to find what I need, Notepad implement it, so why not in Autoit ?

Share this post


Link to post
Share on other sites
Melba23

Marco105,

Please provide a link to this "Move Selection.patch" code - then we can take a look and see exactly what you are talking about. If you do not give us all the information, how on earth do you expect us to be able to help you?

M23


Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______Open Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites
Jos
Posted (edited)

Ok, now we know what you are talking about, so no: You did not ask anything disturbing but simply expected us to answer a question without providing any information about the details. ;)

Looking at the thread it seems this functionality was turned down by Neil and he basically told the requester to use the MoveLines.lua function provided by the SciTE-ru project. I believe this SciTE-ru project has since stopped the activities so have no idea whether this anywhere available and still working with the current version of SciTE.

I simply use Ctrl+Del and Shift+Ins to move lines so am not sure how this is a value?

To answer you initial question: Yes it would require a recompile when the posted modification was to be applied.
There is no need to recompile when the MoveLines.lua was to be implemented. 

Jos  

Edited by Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
Jos
Posted (edited)

I do see they did implement this function and that is available in the current SciTE version:

https://sourceforge.net/p/scintilla/feature-requests/813/

  • #SCI_MOVESELECTEDLINESUP
  • #SCI_MOVESELECTEDLINESDOWN

Maybe that is something to check out how that works.

Jos

Edited by Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
Marco105

Ok, I can use simply the lua to implement it !

It's really nice if I could find info to make that.

I find Options 'Open User/Global/Local properties' matbe I use this at the end of process to make a shortcut ?

Or lua is enought for doing everything ?

Share this post


Link to post
Share on other sites
Jos
Posted (edited)

There is no need for LUA! It actually already seems to be working fine. (Learn something new every day! :))
Just add these first 2 lines to your sciteuser.properties:

# User defined key commands
user.shortcuts=\
Alt+Up|SCI_MOVESELECTEDLINESUP|\
Alt+Down|SCI_MOVESELECTEDLINESDOWN|\
Ctrl+Shift+V|IDM_PASTEANDDOWN|\
Ctrl+PageUp|IDM_PREVFILE|\
Ctrl+PageDown|IDM_NEXTFILE|\
KeypadPlus|IDM_EXPAND|\
KeypadMinus|IDM_BLOCK_COMMENT|\
Ctrl+F1|IDM_HELP_SCITE|

Now select the lines and hit SHift+UpArrow or DownArrow to shift the lines.
EDIT: SciTE needs a restart first for this to work !

Jos

Edited by Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
Marco105

I try it, I wasn't know the exact term for MOVESELECTEDLINE so now I have it !

But unfortunaly that don't works !

Where are installed User properties? I'm on W7 and look in appdata, there is just an empty  folder for AutoIT...

Share this post


Link to post
Share on other sites
Jos

In SciTE's Menu bar Select: Options / Open User Options FIle.

This will open the SciTEUSer.properties file in which you cut&paste the shown lines or update them in case you already have a line with:

user.shortcuts=

Then restart SciTE and you should be in business.

Jos


SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
Marco105

Yes, I mean where it's save where close the apps ?

I don't why I copy that line and save it, close the app, restart it, but no result !

Share this post


Link to post
Share on other sites
Marco105

I have install the separate SciTE4AutoIt3 and know have a lot more  Options enable, but the 'shortcut' didn't run as expected !

Share this post


Link to post
Share on other sites
Marco105

That become maybe from a bad install or W7 rules, I dont know, I will look for that later !

Thanks, anyway.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×