AutoHotkey Community

It is currently May 26th, 2012, 9:19 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 77 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6  Next
Author Message
 Post subject:
PostPosted: July 25th, 2005, 2:48 pm 
Offline

Joined: January 31st, 2005, 9:50 am
Posts: 3910
Location: Bremen, Germany
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
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 25th, 2005, 4:10 pm 
Offline

Joined: July 12th, 2005, 1:21 pm
Posts: 633
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


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 25th, 2005, 4:12 pm 
Offline

Joined: January 31st, 2005, 9:50 am
Posts: 3910
Location: Bremen, Germany
I'll fix it in a minute.

It's fixed, plus some extra hotkeys and shortcuts.

_________________
Ciao
toralf
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 25th, 2005, 5:20 pm 
Offline

Joined: July 12th, 2005, 1:21 pm
Posts: 633
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
---------------------------


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 25th, 2005, 5:28 pm 
Offline

Joined: January 31st, 2005, 9:50 am
Posts: 3910
Location: Bremen, Germany
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
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 25th, 2005, 6:13 pm 
Offline

Joined: July 12th, 2005, 1:21 pm
Posts: 633
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


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 25th, 2005, 6:43 pm 
Offline

Joined: January 31st, 2005, 9:50 am
Posts: 3910
Location: Bremen, Germany
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
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 26th, 2005, 7:55 am 
Offline

Joined: July 12th, 2005, 1:21 pm
Posts: 633
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


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 27th, 2006, 12:41 am 
Offline

Joined: January 31st, 2005, 9:50 am
Posts: 3910
Location: Bremen, Germany
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


Image

_________________
Ciao
toralf
Image


Last edited by toralf on August 30th, 2006, 10:34 pm, edited 3 times in total.

Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 27th, 2006, 8:05 am 
Offline

Joined: March 28th, 2004, 3:53 pm
Posts: 1870
that's much improved toralf! thanks.
just one suggestion, please make it remember its last size just like it remembers its position.

_________________
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 27th, 2006, 10:49 am 
Offline

Joined: January 31st, 2005, 9:50 am
Posts: 3910
Location: Bremen, Germany
It now remembers the last size, same link above.

_________________
Ciao
toralf
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 27th, 2006, 3:06 pm 
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.


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: August 27th, 2006, 3:39 pm 
Offline

Joined: January 31st, 2005, 9:50 am
Posts: 3910
Location: Bremen, Germany
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
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 27th, 2006, 4:27 pm 
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! Image

Quote:
(BTW, it's a treeview)

:oops: 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. :)


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: August 27th, 2006, 8:03 pm 
Offline

Joined: March 28th, 2004, 3:53 pm
Posts: 1870
toralf, i updated the main post to direct to your much-improved version. i hope its fine.

_________________
Image


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 77 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6  Next

All times are UTC [ DST ]


Who is online

Users browsing this forum: Google Feedfetcher and 14 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group