Sign in to follow this  
Followers 0
Thopaga

Editor settings and Good practice

6 posts in this topic

Hello.

I am wondering if someone could advice me.

Editor problem.

When I am inside the editor and change a module, the editor ask me when ending if I want to save my changes or not.

But many times it does not ask but only saves.

This makes it difficult for me to escape without saving.

Also if I have not closed the module, the same module pops up when I enter the editor again.

Can I change these behaviors in some way?

What is good practice.

If you build many functions inside your program, would you put all the includes on top of your program or let the includes be kept inside each function? Keeping them inside each function will also mean duplicates.

Thanks.

Share this post


Link to post
Share on other sites



For your second question look into #include-once


All by me:

"Sometimes you have to go back to where you started, to get to where you want to go." 

"Everybody catches up with everyone, eventually" 

"As you teach others, you are really teaching yourself."

From my dad

"Do not worry about yesterday, as the only thing that you can control is tomorrow."

 

WindowsError.gif

WIKI | Tabs; | Arrays; | Strings | Wiki Arrays | How to ask a Question | Forum Search | FAQ | Tutorials | Original FAQ | ONLINE HELP | UDF's Wiki | AutoIt PDF

AutoIt Snippets | Multple Guis | Interrupting a running function | Another Send

StringRegExp | StringRegExp Help | RegEXTester | REG TUTOR | Reg TUTOT 2

AutoItSetOption | Macros | AutoIt Snippets | Wrapper | Autoit  Docs

SCITE | SciteJump | BB | MyTopics | Programming | UDFs | AutoIt 123 | UDFs Form | UDF

Learning to script | Tutorials | Documentation | IE.AU3 | Games? | FreeSoftware | Path_Online | Core Language

Programming Tips

Excel Changes

ControlHover.UDF

GDI_Plus

Draw_On_Screen

GDI Basics

GDI_More_Basics

GDI Rotate

GDI Graph

GDI  CheckExistingItems

GDI Trajectory

Replace $ghGDIPDll with $__g_hGDIPDll

DLL 101?

Array via Object

GDI Swimlane

GDI Plus French 101 Site

GDI Examples UEZ

GDI Basic Clock

GDI Detection

Ternary operator

Share this post


Link to post
Share on other sites

Editor problem.

And what editor might that be ...

"Straight_and_Crooked_Thinking" : A "classic guide to ferreting out untruths, half-truths, and other distortions of facts in political and social discussions."
"The Secrets of Quantum Physics" : New and excellent 2 part documentary on Quantum Physics by Jim Al-Khalili. (Dec 2014)

"Believing what you know ain't so" ...

Knock Knock ...
 

Share this post


Link to post
Share on other sites

Thopaga,

Asuming you are using SciTE then the properies causing this behaviour are:

the editor ask me when ending if I want to save my changes or not

are.you.sure

From SciTE Help: "The classic GUI question. Normally, when SciTE is about to close a file which has unsaved edits it asks this annoying question. To turn off the question, set are.you.sure to 0 and files will be automatically saved without bothering the user. To abandon edits to a file use the New command. New always asks "Are you sure?" giving an opportunity to not save the file."

the same module pops up when I enter the editor again

save.recent

Ibid: "Setting save.recent causes the most recently used files list to be saved on exit in the session file and read at start up."

These values are set in the SciTE Global Options file which you can access via the <Options> menu. In my default setting I have:

are.you.sure=1

save.recent=1

You obviously want save.recent=0 and need to check are.you.sure. :P

If you do change them, I would strongly advise not changing the Global Option file - you will lose any changes there at the next update. Just add the lines altered as you wish to your User Option file (also accessible via the <Options> menu) - but pay attention to these lines:

# END => DO NOT CHANGE ANYTHING BEFORE THIS LINE  #-#-#-#-#-#

Put them here ! <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
# START: DO NOT CHANGE ANYTHING AFTER THIS LINE     #-#-#-#-#
# Created by SciTEConfig
#------------------------------------------------------------

All clear? :x

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______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

Also, includes should go at the top of the script. They are included wether in a function or not.

If you are using SciTe, be aware it saves any changes made when you run the script even just to test it.


010101000110100001101001011100110010000001101001011100110010000

001101101011110010010000001110011011010010110011100100001

My Android cat and mouse game
https://play.google.com/store/apps/details?id=com.KaosVisions.WhiskersNSqueek

We're gonna need another Timmy!

Share this post


Link to post
Share on other sites

Thanks nitekram, very good, so it is all a matter of taste then.

Thanks Melba23, fantastic, you really helped me there, I was totally unaware of the options and the way it should be done.

Just to get what I am used to I changed 3 of them to see how it goes:

are.you.sure = 1 Not changed.

save.session = 0

save.recent = 0

save.position = 0

Thanks kaotbliss, that is what I have not understood and which have caused me a lot of problems - saving automatically when I run it.

Your recommendation about includes is much appreciated.

Thanks for your kind help everyone.

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
Sign in to follow this  
Followers 0