AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Install AHK syntax highlighting and clips for PSPad v2
Goto page 1, 2, 3, 4, 5, 6  Next
 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions
View previous topic :: View next topic  
Author Message
toralf



Joined: 31 Jan 2005
Posts: 3842
Location: Bremen, Germany

PostPosted: Sun Apr 16, 2006 7:13 pm    Post subject: Install AHK syntax highlighting and clips for PSPad v2 Reply with quote

Script to install
+ AHK syntax highlighting
+ code clips and auto-completion
for PSPad editor

This is Version 2.0
and will hopefully come with the AHK installer someday

Screenshot of version v2 of the main and options Window


Download AHK Sourcecode and templates Version 2

Changelog wrote:
Changes since version 1:
- updated definition files to AHK 1.0.46.00
- removed AOT state of all msgbox windows, but set them as owndialog
- PSPad.INI isn't required to find PSPad path, since PSPad might not have run before.
- removed the option to remove the FuturUse parameter from the clips, since Chris removed them from the syntax files
- by default the compiler password is a 7-digit random number instead of a static "123#321". It is not stored to the ini file. To have a constant password, you'll have to set it each time you install the highlightning again.
- script starts with a very simple gui (defaults will be used, if options are not changed).
- a second gui with options can be opened. This option gui has tabs to structure the data
- up to 4 additinal external programs can be specified with hotkeys
- additional PSPad hotkeys can be individually activated
- added OutputDebug shortcut to def file: Alt+O


Hotkeys wrote:
;# Useful shortcuts inside PSPad:
;#
;# (installed by this script for AHK:)
;# Crtl+< = add "%" around selected variable (see "PSPad hotkeys" in DEF file)
;# Crtl+Shift+< = add """ around selected variable (see "PSPad hotkeys" in DEF file)
;# Crtl+Shift+h = create hotstring from selected word (see "PSPad hotkeys" in DEF file)
;# Crtl+Shift+d = create hotkey from selected word (see "PSPad hotkeys" in DEF file)
;# Crtl+Shift+x = create subroutine from selected word (see "PSPad hotkeys" in DEF file)
;# Crtl+Shift+f = create function from selected word (see "PSPad hotkeys" in DEF file)
;# F9 = run script
;# Ctrl+F9 = compile script
;# Alt+F9 = start AHK ToolBar
;# Alt+F = search and replace in all files
;# Alt+G = search selected word with goggle
;# Alt+Y = swap with line above
;# Alt+X = swap with line below
;# Alt+V = copy line (create duplicate)
;# Ctrl+B = Split window vertically
;#
;# (common inside PSPad:)
;# Ctrl+Shift = insert clip
;# Ctrl+j = auto-complete word
;# Tab = indent selected lines
;# Shift+Tab = un-indent selected lines
;# Ctrl+Shift+a = comment/un-comment selected lines
;# Alt+(Left/Right/Up/Down) = work with bookmarks (set/remove/previous/next)
;# Ctrl+Shift+B = show a list of all bookmarks
;# Ctrl+Shift+(Up/Down) = select word and find previous/next word
;# Ctrl+Alt+(Left/Right) = left/right justify selected lines
;# Alt+LButton-Selection = column selection (it helps to activate "Scroll past EOL"/"Cursor nach Zeilenende erlauben")
;# RButton-Click on AHK command => choose "Help for Language"/"Sprachspezifische Hilfe" or ...
;# Alt+F1 = jump to command in AHK help file
;# F12 = save as...
;# Ctrl+Shift+S = save all open files
;# Ctrl+M = jump to corresponding bracket
;# Ctrl+Shift+M = select text between corresponding bracket


General Information wrote:
;# This script contains
;# - GUI with all its functionalities
;# - retrieving and saving of data from/to its own Ini file
;# - makes sure PSPad isn't running
;# - checks all needed files exist
;# - asks which highlighter to replace, if too many exist
;# A second script (in data subfolder) is included and contains all subroutines to
;# - read AHK syntax files
;# - checks if commands, functions and directives are in DEF template
;# - create the DEF and INI file for PSPad
;# - backup current DEF and INI files
;# - install DEF and INI files
;# - backup current PSPad.INI and KeyMap.INI
;# - change settings in PSPad.INI
;# - change shortcuts in KeyMap.INI
;# - installs AHK toolbar with a shortcut for PSPad
;#
;# The syntax highlight colours in PSPad are quite easy to change
;# - Settings => Highlighter settings => AutoHotkey (at the bottom of the list)
;# In the same window on the other tabs the settings for the external programs
;# and the compiler can be edited.
;#
;# OS: Windows XP
;# AHK version: 1.0.44.10 (http://www.autohotkey.com/download/)
;# PSPad version: 4.5.2 b2234 (http://www.pspad.com/en/download.php)
;# Language: English
;# Date: 2006-09-02


This script started in this old post
_________________
Ciao
toralf


Last edited by toralf on Tue Dec 12, 2006 1:46 pm; edited 8 times in total
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Zoomb
Guest





PostPosted: Mon Apr 17, 2006 8:47 am    Post subject: Reply with quote

Good job toralf!
I really like your script, it's great addon to PSPad.

Is there a way in PSPad to hide lines? (ie: 7-17 hidden)
Back to top
hps



Joined: 19 Aug 2005
Posts: 14
Location: Germany

PostPosted: Wed May 03, 2006 9:15 pm    Post subject: you urged me to change from Notepad++ to PSPad Reply with quote

Hi Toralf,

another really nice script.

It urged me to change from Notepad++ to PSPad.

The only thing I do not like in PSPad, is the completly different behavior of the"Find" function. But I wil get used to.

Keep on hotkeying

Hans Peter
Back to top
View user's profile Send private message
Oli00



Joined: 22 May 2006
Posts: 25

PostPosted: Fri Jul 07, 2006 3:24 pm    Post subject: Error while installing Reply with quote

Hi toralf,

do you have a clue why this error occurs everytime I want to install your add-on...

(%Ltrim
Error: This Line doesn't contain a recognized action

Regards

Oli
Back to top
View user's profile Send private message
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10467

PostPosted: Fri Jul 07, 2006 4:20 pm    Post subject: Reply with quote

Your version of AutoHotkey is probably too old. You can upgrade at http://www.autohotkey.com/download/
Back to top
View user's profile Send private message Send e-mail
Oli00



Joined: 22 May 2006
Posts: 25

PostPosted: Mon Jul 10, 2006 9:37 am    Post subject: Reply with quote

Thanks, that was exactly my problem!

Regards

Oli
Back to top
View user's profile Send private message
Terrapin



Joined: 15 Aug 2005
Posts: 107
Location: North Carolina

PostPosted: Thu Jul 13, 2006 3:45 am    Post subject: Reply with quote

Toralf, I appreciate your work on this a great deal. I use PSPad lately, and now I just have to learn the new features you implemented. Smile

I have a question: I accidentally hit ctrl-<?> (don't know what key) trying to ctrl-f, in PSPad. It turned off syntax highlighting. I can open a file and turn it on with the toolbar icon, but cannot figure out how to make it on by default. Would you know?

Also, I admire your coding style a lot. Mine is very unkempt. I wish I could train myself better. Embarassed Sad

I was checking out how you made the status bar help. I am always interested in making programs user-friendly. I tried to figure out wm_mouseHover, however, your method works much easier. But I have a suggestion.

The statusbar text flickers on my computer, due to being written repeatedly whether it is new information or not. I tried this, just inside the notification function:

Code:
static LastHoveredControl
.
.
.
If (A_GuiControl = LastHoveredControl)
   return
Else
   LastHoveredControl := A_GuiControl
.
.
      ..... the rest of your function for wm_mousemove


I apologize, I do not have it in front of me to refer to. But it was line 350 or so, I believe.

Also, I cannot see that the timer routine for checking if the mouse is in the gui or not, does anything? I understand that this is probably not your final release.

Thank You,

Bob
Back to top
View user's profile Send private message
toralf



Joined: 31 Jan 2005
Posts: 3842
Location: Bremen, Germany

PostPosted: Thu Jul 13, 2006 6:51 pm    Post subject: Reply with quote

Dear Terrapin,

Thanks for your post.

Terrapin wrote:
I have a question: I accidentally hit ctrl-<?> (don't know what key) trying to ctrl-f, in PSPad. It turned off syntax highlighting. I can open a file and turn it on with the toolbar icon, but cannot figure out how to make it on by default. Would you know?
Sorry, I don't

Terrapin wrote:
The statusbar text flickers on my computer, due to being written repeatedly whether it is new information or not.
Thanks for the suggestion. I will implement it, even though it may take some time before released.

Terrapin wrote:
Also, I cannot see that the timer routine for checking if the mouse is in the gui or not, does anything?
It does set back the statusbar back to nothing. That's it.
_________________
Ciao
toralf
Back to top
View user's profile Send private message Send e-mail Visit poster's website
toralf



Joined: 31 Jan 2005
Posts: 3842
Location: Bremen, Germany

PostPosted: Wed Aug 16, 2006 11:57 am    Post subject: Reply with quote

Version 0.9 is updated to the syntax of AHK version 1.0.44.09

and
Terrapin wrote:
The statusbar text flickers on my computer, due to being written repeatedly whether it is new information or not.
should be fixed now.
_________________
Ciao
toralf
Back to top
View user's profile Send private message Send e-mail Visit poster's website
AiKscroll



Joined: 06 Jun 2005
Posts: 179
Location: Northern Virginia

PostPosted: Wed Aug 16, 2006 2:37 pm    Post subject: Reply with quote

Nice script toralf. I'm switching from textpad to pspad simply because of the work you've done.

Also, consider changing the default Run script hotkey to F5 since its a MS standard, at least in the visual studios.
_________________
_AiK
Back to top
View user's profile Send private message AIM Address
toralf



Joined: 31 Jan 2005
Posts: 3842
Location: Bremen, Germany

PostPosted: Wed Aug 16, 2006 2:54 pm    Post subject: Reply with quote

AiKscroll wrote:
consider changing the default Run script hotkey to F5 since its a MS standard, at least in the visual studios.
That is up to you, that's why there is a hotkey control in the gui so you can set it up yourself easily.

I set it to F9 by default, since that is the default in PSPad.
_________________
Ciao
toralf
Back to top
View user's profile Send private message Send e-mail Visit poster's website
AiKscroll



Joined: 06 Jun 2005
Posts: 179
Location: Northern Virginia

PostPosted: Wed Aug 16, 2006 3:08 pm    Post subject: Reply with quote

@Terrapin

View > Syntax
_________________
_AiK
Back to top
View user's profile Send private message AIM Address
Rajat



Joined: 28 Mar 2004
Posts: 1717

PostPosted: Wed Aug 16, 2006 3:39 pm    Post subject: Reply with quote

Chris,
Please consider including this in ahk installation instead of the current PSPad installation file.

toralf,
why is the Tidy installation disabled?
_________________
Back to top
View user's profile Send private message
toralf



Joined: 31 Jan 2005
Posts: 3842
Location: Bremen, Germany

PostPosted: Wed Aug 16, 2006 4:51 pm    Post subject: Reply with quote

Rajat wrote:
why is the Tidy installation disabled?
Because that feature never made it. :|
There was an idea to stip the code. But because it is no real use it was skiped. The button is just there. Maybe other functions could be included, e.g. the subroutine browser by evl or other features, e.g. AHK AutoSyntaxTidy. It is all open.
_________________
Ciao
toralf
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10467

PostPosted: Mon Aug 21, 2006 4:23 pm    Post subject: Reply with quote

Rajat wrote:
Please consider including this in ahk installation instead of the current PSPad installation file.
I'll include it when Toralf says it's ready. Maybe that will be the 1.0 release.

By the way, it would be great to have one or two recommended editors for AutoHotkey. PSPad is an obvious choice, and perhaps the other can be PhiLho's work with SciTE. What would be ideal is to have some kind of direct download link on the site that contains a simple installer that sets everything up for AutoHotkey (similar to the installer at the top of this topic but also includes PSPad, if licensing permits it). Alternatively (or in addition), a special version of the AHK installer could be made available that includes PSPad and/or a SciTE editor.

Any help in these areas would be appreciated.
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions All times are GMT
Goto page 1, 2, 3, 4, 5, 6  Next
Page 1 of 6

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group