 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
toralf
Joined: 31 Jan 2005 Posts: 3842 Location: Bremen, Germany
|
Posted: Mon Jul 25, 2005 2:48 pm Post subject: |
|
|
I edited my script on the previous page:
Edit 05-07-25:
- changed some var names
- added sort after add, new item gets selected
- right mouse click rolls the window up
- it now has 131 lines :( _________________ Ciao
toralf  |
|
| Back to top |
|
 |
Thalon
Joined: 12 Jul 2005 Posts: 640
|
Posted: Mon Jul 25, 2005 4:10 pm Post subject: |
|
|
It doesn't work on my PC!
If I press into the ListView 'Scriptlet Name' I get the following message:
| Quote: | ---------------------------
ScriptLibrary.ahk
---------------------------
Error: This variable or function name contains an illegal character. The current thread will exit.
Specifically: ScriptInternal ID
Line#
050: }
051: GuiRolledUp := not GuiRolledUp
052: }
053: Else
054: Send,{Rbutton}
055: Return
058: LV_GetText(ID, LV_GetNext(), 2)
---> 059: GuiControl,1:,EditData,Script%ID%
060: Return
063: Gui,+OwnDialogs
064: Gui,1:Submit,NoHide
065: InputBox,Name,Enter Scriptlet Name:,,,200,90
066: if ErrorLevel <> 0
066: Return
067: if Name =
---------------------------
OK
--------------------------- |
I didn't have a look at it and yes, I have 1.0.37. installed...
Thalon |
|
| Back to top |
|
 |
toralf
Joined: 31 Jan 2005 Posts: 3842 Location: Bremen, Germany
|
Posted: Mon Jul 25, 2005 4:12 pm Post subject: |
|
|
I'll fix it in a minute.
It's fixed, plus some extra hotkeys and shortcuts. _________________ Ciao
toralf  |
|
| Back to top |
|
 |
Thalon
Joined: 12 Jul 2005 Posts: 640
|
Posted: Mon Jul 25, 2005 5:20 pm Post subject: |
|
|
Is it normal that new added snippets have the text from previous selected as default?
Thalon
P.S.
I got one time the message again on saving contents (not reproduceable after restart)
---------------------------
ScriptLibrary.ahk
---------------------------
Error: This variable or function name contains an illegal character. The current thread will exit.
Specifically: ScriptInternal ID
Line#
085: LV_GetText(ID, RowNumber, 2)
086: Script%ID% =
087: LV_Delete(RowNumber)
088: }
089: Return
093: Gui,1:Submit,NoHide
094: LV_GetText(ID, LV_GetNext(), 2)
---> 095: Script%ID% = %EditData%
096: Return
099: Gui,1:Submit,NoHide
100: Clipboard = %EditData%
101: Return
105: if GuiRolledUp
106: {
107: GuiControl,1:Move,LsbNames,h%LsbNamesH%
---------------------------
OK
--------------------------- |
|
| Back to top |
|
 |
toralf
Joined: 31 Jan 2005 Posts: 3842 Location: Bremen, Germany
|
Posted: Mon Jul 25, 2005 5:28 pm Post subject: |
|
|
that might happen, if you have nothing selected in the listview. But I think this is not possible any more.
BTW: I have removed the hotkeys. They caused too much side effects, the Alt+shortcuts are sufficient. _________________ Ciao
toralf  |
|
| Back to top |
|
 |
Thalon
Joined: 12 Jul 2005 Posts: 640
|
Posted: Mon Jul 25, 2005 6:13 pm Post subject: |
|
|
With your tip I got it again ^^
If there is nothing selected on the left side and you press Save changes the message occurs.
There is also still a problem when trying to delete Sciptlet Name (do not select anything on the left side)
Does also occure with your last version!
I am working as software-tester in reallife ^^
Thalon |
|
| Back to top |
|
 |
toralf
Joined: 31 Jan 2005 Posts: 3842 Location: Bremen, Germany
|
Posted: Mon Jul 25, 2005 6:43 pm Post subject: |
|
|
I knew it.
And I fixed it, but now the code is 139 lines. :(
If you want to make a code fail save it adds so much lines.
My guess is that 30% of code does the job, 40% should be comments and empty lines and 30% are just for fail save. _________________ Ciao
toralf  |
|
| Back to top |
|
 |
Thalon
Joined: 12 Jul 2005 Posts: 640
|
Posted: Tue Jul 26, 2005 7:55 am Post subject: |
|
|
I know this problem also from programming large machines ^^
There have to be so much lines and savety checks that the main-code is just a sidepart!
Especially if the programming language doesn't fit the requirements (one case: langugage has only 16 Timers which can't be used more than one time in code! So I had to do in one line 4 different actions with up to 5 savety-checks each. That has blown up the programm...)
Works fine now!
Thx,
Thalon |
|
| Back to top |
|
 |
toralf
Joined: 31 Jan 2005 Posts: 3842 Location: Bremen, Germany
|
Posted: Sun Aug 27, 2006 12:41 am Post subject: |
|
|
After one year I decided to rewrite the code. The basic idea is the same and you can even use your old ini file and do not have to re-enter your old scriptlets. Maybe rename the ini, that's it.
Download Script Version 3
| Quote: | - complete rewritten
- added tray menu and icon
- tray icon allows to exit script
- treeview to show groups of scriptlets
- easy naming/saving handling, similar to IniFileCreator
- scriplets can change groups easily
- command line parameter "/dock hwnd" to dock GUI to upper left corner of hwnd
- remembers the gui size between starts |
 _________________ Ciao
toralf 
Last edited by toralf on Wed Aug 30, 2006 10:34 pm; edited 3 times in total |
|
| Back to top |
|
 |
Rajat
Joined: 28 Mar 2004 Posts: 1718
|
Posted: Sun Aug 27, 2006 8:05 am Post subject: |
|
|
that's much improved toralf! thanks.
just one suggestion, please make it remember its last size just like it remembers its position. _________________
 |
|
| Back to top |
|
 |
toralf
Joined: 31 Jan 2005 Posts: 3842 Location: Bremen, Germany
|
Posted: Sun Aug 27, 2006 10:49 am Post subject: |
|
|
It now remembers the last size, same link above. _________________ Ciao
toralf  |
|
| Back to top |
|
 |
MsgBox Guest
|
Posted: Sun Aug 27, 2006 3:06 pm Post subject: |
|
|
Hello toralf
Wow.
This is great! Thank you for posting it.
I have been using Scriptlet Library2 but found it very hard to maintain and organise, but now things are going to be much easier.
Again I thank you.
I have two suggestions if you don't mind (both of which you are free to ignore!).
1:- Is it possable to limit the amount of stretching the listview does when resizing the window? When I name my snips I tend to use short descripive names for them, so not much space is needed. On resizing there is a lot of white space in the listview that I would prefer to be in the edit field. I tried, unsuccessfully in version 2 and ended up having to have a fixed width window.
2:- Do you think that it would be a good idea for people to post their snips ini here? (maybe starting with you? mine isn't very impressive ) I think that it would be very beneficial to the community as a whole, and users asking for code in the Help section to do this that and the other could be pointed in this direction. A master ini could be maintained, how useful would that be? Plus Scriptlit Library would get even more exposure.
Again, thanks Toralf. |
|
| Back to top |
|
 |
toralf
Joined: 31 Jan 2005 Posts: 3842 Location: Bremen, Germany
|
Posted: Sun Aug 27, 2006 3:39 pm Post subject: |
|
|
Thanks MsgBox,
| MsgBox wrote: | | 1:- Is it possable to limit the amount of stretching the listview does when resizing the window? | Yes, it is possible (BTW, it's a treeview). Replace the 9 Anchor() calls with these 2: | Code: | Anchor("TrvScriptlets" , "h")
Anchor("EdtScriptletData" , "wh") | The next release will have an option to users can choose.
| MsgBox wrote: | | 2:- Do you think that it would be a good idea for people to post their snips ini here? | Yes, that might help people. But my list isn't very well maintained either. I guess most people wouldn't benefit from it. But if you are willing, you could start to collect a snips that might be useful to all users and organize them. One problem is, that they should have names that will be understoof by most users, thus allowing them to find the snip. The other is to document the snip nicely, so that the origin can be found and credit is given. But the biggest problem is that users have different preferences how to write and format their code or name their variables. But maybe you find a way that fits most users. _________________ Ciao
toralf  |
|
| Back to top |
|
 |
MsgBox Guest
|
Posted: Sun Aug 27, 2006 4:27 pm Post subject: |
|
|
Toralf,
| Quote: | MsgBox wrote:
1:- Is it possable to limit the amount of stretching the listview does when resizing the window?
Yes, it is possible (BTW, it's a treeview). Replace the 9 Anchor() calls with these 2:
Code:
Anchor("TrvScriptlets" , "h")
Anchor("EdtScriptletData" , "wh")
The next release will have an option to users can choose.
|
Thanks very much, that's perfect!
| Quote: | | (BTW, it's a treeview) |
Yes, you are right! While I was writing and describing, in my head I was thinling of Scriptlit Library2!
| MsgBox wrote: | | 2:- Do you think that it would be a good idea for people to post their snips ini here? |
| toralf wrote: | | Yes, that might help people. But my list isn't very well maintained either. I guess most people wouldn't benefit from it. But if you are willing, you could start to collect a snips that might be useful to all users and organize them. One problem is, that they should have names that will be understoof by most users, thus allowing them to find the snip. The other is to document the snip nicely, so that the origin can be found and credit is given. But the biggest problem is that users have different preferences how to write and format their code or name their variables. But maybe you find a way that fits most users. |
So it's a no then.  |
|
| Back to top |
|
 |
Rajat
Joined: 28 Mar 2004 Posts: 1718
|
Posted: Sun Aug 27, 2006 8:03 pm Post subject: |
|
|
toralf, i updated the main post to direct to your much-improved version. i hope its fine. _________________
 |
|
| Back to top |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|