Sign in to follow this  
Followers 0
goldenix

[Solved]_magic option for Editor?

12 posts in this topic

#1 ·  Posted (edited)

I use consolewrite too often & im really sick of typing it manually. Can I modify a file or somehthing so next time I type cons it will output ConsoleWrite( & @CRLF) instead of just ConsoleWrite ?

How do you call this btw? Fast string output?

EDIT: see post #10 for solution

Edited by goldenix

My Projects:[list][*]Guide - ytube step by step tut for reading memory with autoitscript + samples[*]WinHide - tool to show hide windows, Skinned With GDI+[*]Virtualdub batch job list maker - Batch Process all files with same settings[*]Exp calc - Exp calculator for online games[*]Automated Microsoft SQL Server 2000 installer[*]Image sorter helper for IrfanView - 1 click opens img & move ur mouse to close opened img[/list]

Share this post


Link to post
Share on other sites



#3 ·  Posted (edited)

That already exist, type "cw" and press space :)

And nothing happens.

BTW: i tried to do it noob way but guess what, it does not work so im lost now:

Where did autoit script code go?

HotKeySet("!m", "_msbox")

Func _msbox()
    if WinActive(' * SciTE4AutoIt3') Then ControlSend("Untitled", "", "Edit1", "This is a line of text in the notepad window")
EndFunc

;;;; Body of program would go here ;;;;
While 1
    Sleep(100)
WEnd
;;;;;;;;
Edited by goldenix

My Projects:[list][*]Guide - ytube step by step tut for reading memory with autoitscript + samples[*]WinHide - tool to show hide windows, Skinned With GDI+[*]Virtualdub batch job list maker - Batch Process all files with same settings[*]Exp calc - Exp calculator for online games[*]Automated Microsoft SQL Server 2000 installer[*]Image sorter helper for IrfanView - 1 click opens img & move ur mouse to close opened img[/list]

Share this post


Link to post
Share on other sites

It does for the rest of us so the error is on your side. Are you using the latest "full version" of SciTE?

If you open au3.ketwords.abbreviations.properties do you not see "cw" in the list?

Where did autoit script code go?

It's where it has always been? :)

Share this post


Link to post
Share on other sites

It does for the rest of us so the error is on your side. Are you using the latest "full version" of SciTE?

If you open au3.ketwords.abbreviations.properties do you not see "cw" in the list?

It's where it has always been? :)

I think I was using half assed version of 1.77 After installing the latest version cw + space works

But can I create my custom cw commands? for example, I also need a msbox command


My Projects:[list][*]Guide - ytube step by step tut for reading memory with autoitscript + samples[*]WinHide - tool to show hide windows, Skinned With GDI+[*]Virtualdub batch job list maker - Batch Process all files with same settings[*]Exp calc - Exp calculator for online games[*]Automated Microsoft SQL Server 2000 installer[*]Image sorter helper for IrfanView - 1 click opens img & move ur mouse to close opened img[/list]

Share this post


Link to post
Share on other sites

But can I create my custom cw commands? for example, I also need a msbox command

Add to your "\Program Files\AutoIt3\SciTE\Properties\abbrev.properties" file.

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

Add to your "\Program Files\AutoIt3\SciTE\Properties\abbrev.properties" file.

I modified the au3.keywords.abbreviations.properties file & added ms to this line:

cw ms cwe \

Inside abbrev.properties and au3abbrev.properties I added another line

cw=ConsoleWrite(| & @LF)
ms=MsgBox(| 0, '', )

But It wont work for some reason. Did I do something wrong?

Edited by goldenix

My Projects:[list][*]Guide - ytube step by step tut for reading memory with autoitscript + samples[*]WinHide - tool to show hide windows, Skinned With GDI+[*]Virtualdub batch job list maker - Batch Process all files with same settings[*]Exp calc - Exp calculator for online games[*]Automated Microsoft SQL Server 2000 installer[*]Image sorter helper for IrfanView - 1 click opens img & move ur mouse to close opened img[/list]

Share this post


Link to post
Share on other sites

I think I was using half assed version of 1.77 After installing the latest version cw + space works

But can I create my custom cw commands? for example, I also need a msbox command

It also already exist :) (mb and mb2).

You can easely see what all these abbrevs to by opening abbrev.properties and search for a func, for example MsgBox. Most native funcs have abbrevs already.

Share this post


Link to post
Share on other sites

#9 ·  Posted (edited)

It also already exist :) (mb and mb2).

You can easely see what all these abbrevs to by opening abbrev.properties and search for a func, for example MsgBox. Most native funcs have abbrevs already.

I dont like mb2 so I tried to replace mb=MsgBox(|) with mb=MsgBox(0, '', |) but when I open the editor & type in mb it still outputs mb=MsgBox(|)

I used my search text inside files script & found out that only 3 files contain mb2=

Does this mean that I cant modify existing or add my custom ms= ? I changed all 3 files & still nothing.

=====================================================================
C:\Program Files\AutoIt3\SciTE\Defs\beta\au3abbrev.properties
=====================================================================
line: | 76 | mb2=MsgBox(0, '', |)

=====================================================================
C:\Program Files\AutoIt3\SciTE\Defs\Production\au3abbrev.properties
=====================================================================
line: | 76 | mb2=MsgBox(0, '', |)

=====================================================================
C:\Program Files\AutoIt3\SciTE\Properties\au3abbrev.properties
=====================================================================
line: | 77 | mb2=MsgBox(0, '', |)
Edited by goldenix

My Projects:[list][*]Guide - ytube step by step tut for reading memory with autoitscript + samples[*]WinHide - tool to show hide windows, Skinned With GDI+[*]Virtualdub batch job list maker - Batch Process all files with same settings[*]Exp calc - Exp calculator for online games[*]Automated Microsoft SQL Server 2000 installer[*]Image sorter helper for IrfanView - 1 click opens img & move ur mouse to close opened img[/list]

Share this post


Link to post
Share on other sites

I dont like mb2 so I tried to replace mb=MsgBox(|) with mb=MsgBox(0, '', |) but when I open the editor & type in mb it still outputs mb=MsgBox(|)

I used my search text inside files script & found out that only 3 files contain mb2=

Does this mean that I cant modify existing or add my custom ms= ? I changed all 3 files & still nothing.

=====================================================================
  C:\Program Files\AutoIt3\SciTE\Defs\beta\au3abbrev.properties
  =====================================================================
  line: | 76 | mb2=MsgBox(0, '', |)
  
  =====================================================================
  C:\Program Files\AutoIt3\SciTE\Defs\Production\au3abbrev.properties
  =====================================================================
  line: | 76 | mb2=MsgBox(0, '', |)
  
  =====================================================================
  C:\Program Files\AutoIt3\SciTE\Properties\au3abbrev.properties
  =====================================================================
  line: | 77 | mb2=MsgBox(0, '', |)

On my system the correct file is in my user profile, not under Program Files.

Use "Open Abbreviations File" on the Options menu to get the right one.


[font="Tahoma"]"Tougher than the toughies and smarter than the smarties"[/font]

Share this post


Link to post
Share on other sites

On my system the correct file is in my user profile, not under Program Files.

Use "Open Abbreviations File" on the Options menu to get the right one.

I wonder why do programmers like to hide those config files.?

But thanx found it. & also added ms= & it work fine now. many thanx


My Projects:[list][*]Guide - ytube step by step tut for reading memory with autoitscript + samples[*]WinHide - tool to show hide windows, Skinned With GDI+[*]Virtualdub batch job list maker - Batch Process all files with same settings[*]Exp calc - Exp calculator for online games[*]Automated Microsoft SQL Server 2000 installer[*]Image sorter helper for IrfanView - 1 click opens img & move ur mouse to close opened img[/list]

Share this post


Link to post
Share on other sites

Godenix,

It is the OS that does that. Vista, for example, will not let apps write to their own folder within 'Program Files', but does complicated trickery within Explorer to make it look as though they have. It is all part of the 'security' package.

I always check whether my app is in 'Program Files' and if it is, I write .inis etc directly to a dediciated folder within the users profile.

Anyway, with SciTE just use the 'Options - Open....' menu to open the relevant file and you will automatically get the right place!

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

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