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 

AHK Toolbar for an Editor (e.g. PSPad) (version 1 alpha)
Goto page Previous  1, 2, 3  Next
 
Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions
View previous topic :: View next topic  
Author Message
nduncan



Joined: 06 Dec 2005
Posts: 32
Location: Madrid, Spain

PostPosted: Tue Oct 31, 2006 1:03 pm    Post subject: Reply with quote

Well,it dd install as you said. Now to the nitty gritty of getting it to work! usefully and make my comments, which I hope will be useful,

Thanks
_________________
oldie
Back to top
View user's profile Send private message Send e-mail
nduncan



Joined: 06 Dec 2005
Posts: 32
Location: Madrid, Spain

PostPosted: Tue Oct 31, 2006 7:26 pm    Post subject: Reply with quote

Sorry to be such a pain but, after the first successful installation, I have been unable to repeat it.

Just to be sure I deleted all occurrences of the toolbar and all the other files contained in the zip and reextracted them to a new folder (C:\Program Files\PSPad editor\Pspad_ahk_Toolbar\). Not very interested in the name at the moment, except that it seems a bit long.

All the other files opened correctly, but with the toolbar, the most I got was (sometimes) "cannot open#include Func_IniSettingsEditor_v6.ahk". I'm not even sure if that is exact as I can't even reproduce that message.
_________________
oldie
Back to top
View user's profile Send private message Send e-mail
toralf



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

PostPosted: Wed Nov 01, 2006 4:55 pm    Post subject: Reply with quote

If you can't reproduce it, it should be fixed. :)

Sorry, but that information doesn't give me a hint on how I could help you.

You might go through the script and see if the file on the #INCLUDE command exist. Make sure you start the script in the same directory where it is placed. Not from within PSPad. I do not know if I have set the WorkingDir in that version.
Good luck
_________________
Ciao
toralf
Back to top
View user's profile Send private message Send e-mail Visit poster's website
nduncan



Joined: 06 Dec 2005
Posts: 32
Location: Madrid, Spain

PostPosted: Wed Nov 01, 2006 10:01 pm    Post subject: Reply with quote

Thank you for your reply. I realise that I have to give you something to work on

The #include statement in the script is "Func_IniSettingsEditor_v6.ahk"
The file extracted from the zip file is "IniFileCreator_v6.ahk"

Could this be the problem?

I assume that "Func_" is an abbreviation of "Function", but in the help file only "Func" is given.

--------------------------------------------------------------------------------

My first idea was to attempt to reduce the size of the GUI, after its brief appearance. I have since had an idea to reduce the size of the interface that I shall not pursue without your express permission.

PsPad has a number of toolbars (most of them but not all obvious and common) contained in very small icons with tooltips and in groups that can be hidden or shown at will (or certainly with a macro). They include:

PROJECT - Open New Projcct - Open Existing Project - Save open project Settings - Show/Hide Log window
MAIN - Create New File - Sava changes of all open files - Code Explorer window - Text search - Replace Text - Search and replace in files - Find matching bracket - Bookmark List - Print preview - Print
EDIT - Undo - Redo - Cut - Copy - Paste - Delete selected text
LOOK - Line wrapping - Spaces, Tabs, etc - Show/Hide syntax - Change document highlight syntax - Line numbers - Set doc read-only - Spell check
CONTROL - Open Active file in external program - Run external compiler - Command line
HTML - Reformat Html code - Compress Html code - Color selector - Color Translator - Remove HTML Tags - Change HTML Tags to upper case - Change HTML Tags to lower case - Internal browser - Edit CSS file - Google - Open or save file in ext program - Run external Compiler - Command line
MACRO - Start/stop macro recording - Play Recorded macro -

What drew my attention were the following two items from the PSPAD FORUM under PSPAD EXTENSIONS STORAGE:

Posted by: pspad | Date: 05/24/2006 22:15 | IP: IP Logged

Place for your extensions is ready. You find it on the PSPad pages under PSPad download item.

Anybody can add / modify / delete own extensions. But you need:
1. register yourself into PSPad forum
2. send me e-mail with a request and I will add access for you

I am waiting for reactions.
We can move some unecessary things from the PSPad distribution into this storage

Edited 4 time(s). Last edit at 05/25/2006 20:59 by pspad.

Posted by: pspad | Date: 06/01/2006 09:57 | IP: IP Logged

DaRamirez:
I would like to build couple of extensions for PSP.
Build couple of script using in python for PSPad but I'd have to say that the GUI support that I get true the Python interface for pspad is rather limited an bad documentend.

Are there any changes to improve this in the future ?

If you want from me to extend PSPad scripting, write me, what you need

I realise that any approach has its pros and cons and you may well not want to be dependent on outsiders, however willing. Quite apart from the fact that people use different text editors. But the idea might be useful, especially if combined with selectable hotkeys.
_________________
oldie
Back to top
View user's profile Send private message Send e-mail
toralf



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

PostPosted: Thu Nov 02, 2006 8:38 am    Post subject: Reply with quote

Regarding your first comment. This is a list of files in the zip file that you can download from the first page:

Archiv: PSPad_AHK_Toolbar_v1a.zip
AHK_Window_Info_v1.3.ahk
Auto-Syntax-Tidy_v13.ahk
Func_IniSettingsEditor_v6.ahk
Icon_Viewer_Lite_v1.ahk
IniFileCreator_v6.ahk
PSPad_AHK_Toolbar.ahk
PSPad_AHK_Toolbar.ini
Scriptlet_Library_v2.ahk

as you can see there is also a file named "Func_IniSettingsEditor_v6.ahk" and as you have seen a file named "IniFileCreator_v6.ahk". Both should be there. The "Func_" is used in the toolbar script to show the options dialog. The other can be called from the toolbar to create or modify an ini file that in turn could be used with the "Func_" Script in any other script to open a custom options dialog.


Regarding your second idea: Of cause someone could create a PSPad special toolbar. And you are most welcome to do it. I have no interest in coding it, although I might use it when someone else did. Reasons:
1) The PSPad toolbar would require a script language that I do not know
2) The toolbar is limited to PSPad, while an AHK script is independent.

Thanks.
_________________
Ciao
toralf
Back to top
View user's profile Send private message Send e-mail Visit poster's website
nduncan



Joined: 06 Dec 2005
Posts: 32
Location: Madrid, Spain

PostPosted: Thu Nov 02, 2006 6:44 pm    Post subject: Reply with quote

Hi,

At least we are are a little further along. The following AHK files are running hidden and the alt+F9 doesn't bring the toolbar up,

As I can't use the clipboard IŽll send you a screenshot[img]C:\Documents and Settings\Administrator\Documents\Pictures\Windows Task Manager.jpg[/img] - at least I hope I'm doing it thr right way.

Although I have had experience with Winbatch and now AHK, they have all been fairly simple scripts. That is my reason to want to to try the toolbar, but not being much of a coder at all, it is likely to take me some time before I can claim to be one of your frternity
_________________
oldie
Back to top
View user's profile Send private message Send e-mail
Terrapin



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

PostPosted: Sat Nov 04, 2006 4:56 pm    Post subject: Reply with quote

Toralf, I tried this package. I am always slow to try things, for some reason. I think it is great. I had no problems really, to report. I checked and as you know, the toolbar does get lost if you minimize, you probably have that corrected by now. It might be nice, if the onhover tooltips stayed just a little longer. Just a personal preference.

I mostly played with Window Info. Wow! I have not looked at the code yet, but it is very impressive. My only (personal) suggestion, might be a right-click context menu, or item, to toggle between 'autosize columns' and possibly "shrink (some) columns". I have something like this in a listview. Works nice.

Thanks so much for all the effort. I will use these, for sure. And to everyone who contributed.

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



Joined: 06 Dec 2005
Posts: 32
Location: Madrid, Spain

PostPosted: Sun Nov 05, 2006 6:37 pm    Post subject: Reply with quote

I don't want to take up too much of your time. However I have found a simpler version of your toolbar. I have renamed them for my own purposes to avoid confusion as:

PSPad_AHK_Toolbar_v1.ahk AND
PSPad_AHK_Toolbar_v1a.ahk

I am also using the same thread as I can't find one for v1 - it may have died

I can get much further with v1 because it is simpler. I have solved the probleM of starting the toolbar script, although there may be a more elegant way of scripting it.

Adding the template defeats me however. Can you help?

EXCERPTS FROM MODIFIED V1 SCRIPT

;This includes second script (backend) ; ORIGINAL SCRIPT
#Include data/Install_BackEnd.ahk

; This includes a required toolbar script ; ADDED AND WORKS
#Include C:\Program Files\AutoHotkey\Extras\Scripts\AHK Toolbar\AHK Toolbar.ahk ; This works and installs the toolbar

; This includes another required item ; ADDED BUT INCORRECT
# Include C:\Program Files\AutoHotkey\Extras\Scripts\AHK Toolbar\data\AutoHotkey_def.template; THIS CLEARLY DOES NOT WORK AS TEMPLATE IS NOT A SCRIPT. WHAT IS THE CORRECT SYNTAX TO LOAD THE TEMPLATE?
_________________
oldie
Back to top
View user's profile Send private message Send e-mail
toralf



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

PostPosted: Mon Nov 06, 2006 5:20 pm    Post subject: Reply with quote

Sorry, I do not understand what you are doing. The "AutoHotkey_def.template" file is belonging to the script to install syntax highlight for AHK in PSPad. It is a "context" file of PSPad. What do you want to do with it? I fear you mix up to many scripts.
_________________
Ciao
toralf
Back to top
View user's profile Send private message Send e-mail Visit poster's website
nduncan



Joined: 06 Dec 2005
Posts: 32
Location: Madrid, Spain

PostPosted: Mon Nov 06, 2006 8:17 pm    Post subject: Reply with quote

Thanks to both toralf and Phil.ho for their swift replies.

Since the img tag does not appear to work for my screenshot, here is the full text of the error window:

----------------------------------------------------------------------------
Files of script are missing

Some files for the script are missing
data\AutoHotkey_def.template

Script will exit

OK
_________________
oldie
Back to top
View user's profile Send private message Send e-mail
toralf



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

PostPosted: Tue Nov 07, 2006 6:52 am    Post subject: Reply with quote

1) The img tag works, but you have to upload the image to a server. You can't upload it to this forum. E.g. you can use Autohotkey.net to upload images and scripts.

2) What script are you talking about? This must be the script to instal syntax highlighting in PSPad. What do you want to do with this script when it comes to the toolbar?
I suggest you download both scripts from the original posts again, extract them in individuell and empty folders and start all over again. You must have mixed something up.
_________________
Ciao
toralf
Back to top
View user's profile Send private message Send e-mail Visit poster's website
majkinetor



Joined: 24 May 2006
Posts: 4511
Location: Belgrade

PostPosted: Tue Nov 07, 2006 8:13 am    Post subject: Reply with quote

I tried this script for the first time with the EditPlus and it works nice.
I have some comments/wishes:

- can you make it to be resident, so when I close and reopen editor it is there again (this can be done now by changing the shortcut of the editor but this solution is not so flexibile)

- can you make it have variable number of buttons (and if so, button separators)

- can you make it extension aware (i.e. if I open js file I wont js tools in ahk I wont AHK tools...)
_________________
Back to top
View user's profile Send private message
toralf



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

PostPosted: Tue Nov 07, 2006 10:23 am    Post subject: Reply with quote

Hi majkinetor,
thanks.

majkinetor wrote:
- can you make it to be resident, so when I close and reopen editor it is there again (this can be done now by changing the shortcut of the editor but this solution is not so flexibile)
No, I wont, because this would require to have the toolbar running all the time and watch for the editor. If you want to have it started automatically, you would need to code a script that starts your editro and starts the toolbar shortly afterwards. I use a shotcut in PSPad to start the toolbar.

majkinetor wrote:
- can you make it have variable number of buttons (and if so, button separators)
My current version has 20 buttons. I do not know any more why it is not dynaically. There must be a reason that I forgot. Would need to take a look at the code again.

majkinetor wrote:
- can you make it extension aware (i.e. if I open js file I wont js tools in ahk I wont AHK tools...)
That is a nice idea. But since it is currently of no interest to me I leave it to someone else to add this functionality.

I'm currently working on two other scripts. When I will find time, I will finsih this script and post the new version. It has changed a lot since the code posted in this thread.
_________________
Ciao
toralf
Back to top
View user's profile Send private message Send e-mail Visit poster's website
majkinetor



Joined: 24 May 2006
Posts: 4511
Location: Belgrade

PostPosted: Tue Nov 07, 2006 11:05 am    Post subject: Reply with quote

Quote:
No, I wont, because this would require to have the toolbar running all the time and watch for the editor. If you want to have it started automatically, you would need to code a script that starts your editro and starts the toolbar shortly afterwards. I use a shotcut in PSPad to start the toolbar.
That is very different thing and I don't like it at all. It means that eatch time I start the editor it will execute the script, and that will slow down startup time, the very reason I am using EditPlus. Alternatively I could make small app that will run things in parallel, but again....

Much better solution is to start toolbar and leave it there for future editors. I thought you are making general usage script not only for yourself. You can fit both but making it optional. On the other hand, if you are making script for yourself and just share it here then you should put it in the first post so we don't loose time posting suggestions.

Quote:
That is a nice idea. But since it is currently of no interest to me I leave it to someone else to add this functionality.

Nobody can do it faster then you. If I have to do it, its better for me to create entire new script with this option in mind.

Quote:
My current version has 20 buttons.

Maybe I missed something...

Thx.
_________________
Back to top
View user's profile Send private message
nduncan



Joined: 06 Dec 2005
Posts: 32
Location: Madrid, Spain

PostPosted: Tue Nov 07, 2006 8:29 pm    Post subject: Reply with quote

I have tried to be as systematic as possible and reflect the results in this post. I still need help!!

THE FOLLOWING ARE THE RESULTS TODAY (TUE, NOV 07) FOR V1

Archiv: Install_AHK_for_PSPad_v1.zip

-------------------------------------------------------------------------
FILES COPIED FROM MY FILE MANAGER AND EXTRACTED TODAY TUE NOV 07
C:\Program Files\PSPad editor\Install_AHK_for PSPad_v1\data
C:\Program Files\PSPad editor\Install_AHK_for PSPad_v1\Install_AHK_for_PSPad.ahk
DATA SUBFOLDER
C:\Program Files\PSPad editor\Install_AHK_for PSPad_v1\data\AutoHotkey_def.template
C:\Program Files\PSPad editor\Install_AHK_for PSPad_v1\data\Install_BackEnd.ahk
C:\Program Files\PSPad editor\Install_AHK_for PSPad_v1\data\Toralfs_Gui_clips.template
C:\Program Files\PSPad editor\Install_AHK_for PSPad_v1\data\Toralfs_Gui_macros.template

The script runs correctly when Install_AHK_for_PSPad.ahk is run, but doesn't open with Alt+F9 in an *.ahk file in PSPad as I think it should. Nor is there any template script, but perhaps I'm missing something.

===========================================================================
THE FOLLOWING ARE THE "RESULTS" TODAY (TUE, NOV 07) FOR V1A

Archiv: PSPad_AHK_Toolbar_v1a.zip

--------------------------------------------------------------------------
FROM YOUR POST OF THU NOV 02, 2006 8:38 AM GIVING THE EXTRACTED FILES
AHK_Window_Info_v1.3.ahk
Auto-Syntax-Tidy_v13.ahk
Func_IniSettingsEditor_v6.ahk
Icon_Viewer_Lite_v1.ahk
IniFileCreator_v6.ahk
PSPad_AHK_Toolbar.ahk
PSPad_AHK_Toolbar.ini
Scriptlet_Library_v2.ahk

--------------------------------------------------------------------------
FILES COPIED FROM MY FILE MANAGER AND EXTRACTED TODAY TUE NOV 07
C:\Program Files\PSPad editor\PSPad_AHK_Toolbar_v1a\AHK_Window_Info_v1.3.ahk
C:\Program Files\PSPad editor\PSPad_AHK_Toolbar_v1a\Auto-Syntax-Tidy_v13.ahk
C:\Program Files\PSPad editor\PSPad_AHK_Toolbar_v1a\Func_IniSettingsEditor_v6.ahk
C:\Program Files\PSPad editor\PSPad_AHK_Toolbar_v1a\Icon_Viewer_Lite_v1.ahk
C:\Program Files\PSPad editor\PSPad_AHK_Toolbar_v1a\IniFileCreator_v6.ahk
C:\Program Files\PSPad editor\PSPad_AHK_Toolbar_v1a\PSPad_AHK_Toolbar.ahk
C:\Program Files\PSPad editor\PSPad_AHK_Toolbar_v1a\PSPad_AHK_Toolbar.ini
C:\Program Files\PSPad editor\PSPad_AHK_Toolbar_v1a\Scriptlet_Library_v2.ahk

There seems to be no discrepancy

--------------------------------------------------------------------------
At 20:05 local time I started pspad_ahk_toolbar.ahk from my file manager (Explorer2 Pro), but the Windows Task Manager showed that it was not running

I then tried rebooting and starting the toolbar again with the same results.
_________________
oldie
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions All times are GMT
Goto page Previous  1, 2, 3  Next
Page 2 of 3

 
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