Jump to content

Treeview with GuiCtrlCreateList


Bert
 Share

Recommended Posts

Not much

Not much except a lexer written specifically to perform syntax highlighting on AutoIt code specifically (Far better than the generic lexer Crimson uses) and an integrated scripting language (LUA) in SciTE which is invoked every time you type a character into SciTE (Assuming you use JdeB's package) and provides features you probably don't even pay attention to but would sorely miss if they were gone.
Link to comment
Share on other sites

Not much except a lexer written specifically to perform syntax highlighting on AutoIt code specifically (Far better than the generic lexer Crimson uses) and an integrated scripting language (LUA) in SciTE which is invoked every time you type a character into SciTE (Assuming you use JdeB's package) and provides features you probably don't even pay attention to but would sorely miss if they were gone.

Just a tad biast. Thanks for adding more information though. ;) I use SciTE and have never used Crimson. I don't know much about either.
Link to comment
Share on other sites

When I first started working on TreePaste, it was meant to be used with ini files. I'm in the process of building a complex ini database with over 11,000 entries that get updated often. I wanted to have it so if an end-user wanted to make a change to the data, they wouldn't call me. Thats why I posted version 3 with the notes about the ini.

Also, I wrote it so even a beginner, such as me, would understand the code. The way I learn what something does is looking at the code, and taking it apart, while keeping the help file open to reference. I could read the whole help file first, but I get lost in it rather quickly. A fair amount of people code using this method. I'm not claiming it is the best way to do it, however it is what works for me.

The program looks fantastic! You have done a great job in making it clean.

(And no, you don't have a "tone". You are trying to teach, and that is a good thing!) :-)

The INI thing I had was this for hardware:

$ini = FileReadLine("treepaste/hardware/hardware.ini")

GUICtrlSetData($desktoplist, $desktop)

GUICtrlSetData($desktoplist, $ini)

I know an experienced coder know this. However, for a beginner, having this little piece of information goes along way in promoting understanding for they don't have to go looking around on seeing how to do this. It took me a good bit to figure out how to make that work right when I first wanted to use an ini. Also, I posted the notes explaining how the program works in the comments at the beginning, and I rather not cause confusion. I know my notes are redundant, but when I teach, I try to target beginners too.

Coding isnt my day job, as you can tell. I do enjoy it though.

Again, the work you have done is fantastic! THANK YOU SO MUCH! :-)

Link to comment
Share on other sites

When I first started working on TreePaste, it was meant to be used with ini files. I'm in the process of building a complex ini database with over 11,000 entries that get updated often. I wanted to have it so if an end-user wanted to make a change to the data, they wouldn't call me. Thats why I posted version 3 with the notes about the ini.

Also, I wrote it so even a beginner, such as me, would understand the code. The way I learn what something does is looking at the code, and taking it apart, while keeping the help file open to reference. I could read the whole help file first, but I get lost in it rather quickly. A fair amount of people code using this method. I'm not claiming it is the best way to do it, however it is what works for me.

The program looks fantastic! You have done a great job in making it clean.

(And no, you don't have a "tone". You are trying to teach, and that is a good thing!) :-)

The INI thing I had was this for hardware:

$ini = FileReadLine("treepaste/hardware/hardware.ini")

GUICtrlSetData($desktoplist, $desktop)

GUICtrlSetData($desktoplist, $ini)

I know an experienced coder know this. However, for a beginner, having this little piece of information goes along way in promoting understanding for they don't have to go looking around on seeing how to do this. It took me a good bit to figure out how to make that work right when I first wanted to use an ini. Also, I posted the notes explaining how the program works in the comments at the beginning, and I rather not cause confusion. I know my notes are redundant, but when I teach, I try to target beginners too.

Coding isnt my day job, as you can tell. I do enjoy it though.

Again, the work you have done is fantastic! THANK YOU SO MUCH! :-)

Well feel free to add it back in there. From what I could tell by looking at it, it didn't support .inis really. That example script will just read the first line of hardware.ini and it's really ment for text functions. When working with .ini files you'll want to use IniRead and then you'll be using the actual .ini structure of section, key, and value to read from rather then just a flat file where you read the different lines.

Also you have GUICtrlSetData($desktoplist, $desktop) in there about five different times. $desktop is never set to anything and thus setting the data of $desktoplist to $desktop also does nothing. I'll post a revision seven soon. Based on your code it looks like you really don't understand a lot of stuff that your doing. I'm teaching a sort of online class based around AutoIt and object oreinted programming. If you have some spare time and the desire to learn a bit more about AutoIt then feel free to get in touch with me. I say sort of as it's the first time I've done something like this on my own time so I think it will be fun. ;)

You have this in the comments section

; HotKeySet ("^{F10}", "$funct1")

; Func $funct1()

; Send("^a")

; sleep(100)

; Send("^x")

; sleep(100)

; Runwait ("treepaste.exe", "")

; sleep(100)

; Send("^v")

; EndFunc

That's a really bad way to keep a process alive because you're constantly sleeping and running the program which is not needed. A better method would be to use a while loop and check if the process treepaste.exe exists and if not then run it. This code would need to be in its own program as having a script see if itself is running wouldn't do much good!.

While 1 ;infinite loop

If Not ProcessExists("treepaste.exe") Then ;If the process doesn't exist.

Run("C:\treepaste\treepaste.exe")

EndIf

WEnd

Revision 6.2 is attached. I just removed the useless calls and the unused global $desktop

Tree_Paste_1.0R6.2.au3

Revision 6.2

ChangeLog

;v6.2
;Removed the useless GUICtrlSetData($desktoplist, $desktop) calls and removed the unused global var $desktop
Edited by ligenza
Link to comment
Share on other sites

The online class sounds like fun! Your right, I'm still learning this stuff, and I have LOTS of questions. Usually I only put together a program when I need to do something, and 95% of the time it is just for my personal use.

I have to look to see how IniRead works. Thanks again

Link to comment
Share on other sites

The online class sounds like fun! Your right, I'm still learning this stuff, and I have LOTS of questions. Usually I only put together a program when I need to do something, and 95% of the time it is just for my personal use.

I have to look to see how IniRead works. Thanks again

Most of what I do with AutoIt is for personal use as well, I find it fun to program in. I'll be using AIM apparently to communicate although any instant messenger would work well even IRC. I'll pm you a link to the (free) textbook we'll be using so you can see if it will be something you want to do. It'll take some effort but you'll learn a lot. ;) Edited by ligenza
Link to comment
Share on other sites

my AIM is Vollyman, though I can't use it during the day. My work blocks access. time zone: (Eastern Standard Time, US)

I just PMed you the information. I'm at work as well so it'll be later tonight. Hopefully we'll be able to hook up then and get started. ;)
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...