Jump to content

Treeview with GuiCtrlCreateList


Bert
 Share

Recommended Posts

Your origional code:

CODE

;Tree Paste 1.0

;addin tool for UNPlus for Unicenter Service Desk

;Written Sept 2005 by Vollyman (getting cross eyed working on this!)

#include <GUIConstants.au3>

GUICreate("Tree Paste",655,500,-1,-1,BitOr($WS_MINIMIZEBOX,$WS_MAXIMIZEBOX,$WS_GROUP,$WS_CAPTION,$WS_POPUP,$WS_SYSMENU))

;$maintree = GUICtrlCreateTreeView (10,10,680,450)

$maintree = GUICtrlCreateTreeView (10,10,300,450)

$hardwareitem = GUICtrlCreateTreeViewItem ("Hardware",$maintree)

$softwareitem = GUICtrlCreateTreeViewItem ("Software",$maintree)

$fullitem = GUICtrlCreateTreeViewItem ("Full list",$maintree)

$aboutitem = GUICtrlCreateTreeViewItem ("About",$maintree); need to have window on right show about text

;hardware branch

$desktopitem = GUICtrlCreateTreeViewItem ("Desktops",$hardwareitem); have ini link

$laptopitem = GUICtrlCreateTreeViewItem ("Laptops",$hardwareitem); have ini link

$printeritem = GUICtrlCreateTreeViewItem ("Printers",$hardwareitem)

$HPitem = GUICtrlCreateTreeViewItem ("HP",$printeritem)

$LaserJetCitem = GUICtrlCreateTreeViewItem ("LaserJet Color",$HPitem); have ini link

$LaserJetMitem = GUICtrlCreateTreeViewItem ("LaserJet Monochrome",$HPitem); have ini link

$Deskjetitem = GUICtrlCreateTreeViewItem ("Deskjet",$HPitem); have ini link

$AllotherHPitem = GUICtrlCreateTreeViewItem ("All other HP printers",$HPitem); have ini link

$Lexitem = GUICtrlCreateTreeViewItem ("Lexmark",$printeritem); have ini link

$misprinteritem = GUICtrlCreateTreeViewItem ("All Other Printers",$printeritem); have ini link

;software branch

$microsoftitem = GUICtrlCreateTreeViewItem ("Microsoft",$softwareitem); have ini link

$AthruEitem = GUICtrlCreateTreeViewItem ("A - E",$softwareitem)

$Aitem = GUICtrlCreateTreeViewItem ("A",$AthruEitem); have ini link

$Bitem = GUICtrlCreateTreeViewItem ("B",$AthruEitem); have ini link

$Citem = GUICtrlCreateTreeViewItem ("C",$AthruEitem); have ini link

$Ditem = GUICtrlCreateTreeViewItem ("D",$AthruEitem); have ini link

$Eitem = GUICtrlCreateTreeViewItem ("E",$AthruEitem); have ini link

$FthruJitem = GUICtrlCreateTreeViewItem ("F - J",$softwareitem)

$Fitem = GUICtrlCreateTreeViewItem ("F",$FthruJitem); have ini link

$Gitem = GUICtrlCreateTreeViewItem ("G",$FthruJitem); have ini link

$Hitem = GUICtrlCreateTreeViewItem ("H",$FthruJitem); have ini link

$Iitem = GUICtrlCreateTreeViewItem ("I",$FthruJitem); have ini link

$Jitem = GUICtrlCreateTreeViewItem ("J",$FthruJitem); have ini link

$KthruOitem = GUICtrlCreateTreeViewItem ("K - O",$softwareitem)

$Kitem = GUICtrlCreateTreeViewItem ("K",$KthruOitem); have ini link

$Litem = GUICtrlCreateTreeViewItem ("L",$KthruOitem); have ini link

$Mitem = GUICtrlCreateTreeViewItem ("M",$KthruOitem); have ini link

$Nitem = GUICtrlCreateTreeViewItem ("N",$KthruOitem); have ini link

$Oitem = GUICtrlCreateTreeViewItem ("O",$KthruOitem); have ini link

$PthruTitem = GUICtrlCreateTreeViewItem ("P - T",$softwareitem)

$Pitem = GUICtrlCreateTreeViewItem ("P",$PthruTitem); have ini link

$Qitem = GUICtrlCreateTreeViewItem ("Q",$PthruTitem); have ini link

$Ritem = GUICtrlCreateTreeViewItem ("R",$PthruTitem); have ini link

$Sitem = GUICtrlCreateTreeViewItem ("S",$PthruTitem); have ini link

$Titem = GUICtrlCreateTreeViewItem ("T",$PthruTitem); have ini link

$UthruZitem = GUICtrlCreateTreeViewItem ("U - Z",$softwareitem)

$Uitem = GUICtrlCreateTreeViewItem ("U",$UthruZitem); have ini link

$Vitem = GUICtrlCreateTreeViewItem ("V",$UthruZitem); have ini link

$Witem = GUICtrlCreateTreeViewItem ("W",$UthruZitem); have ini link

$Xitem = GUICtrlCreateTreeViewItem ("X",$UthruZitem); have ini link

$Yitem = GUICtrlCreateTreeViewItem ("Y",$UthruZitem); have ini link

$Zitem = GUICtrlCreateTreeViewItem ("Z",$UthruZitem); have ini link

$Miscitem = GUICtrlCreateTreeViewItem ("Misc",$softwareitem); have ini link

;test box for list to pick to paste data

;I think this will need to be put in the control function

;and duplicated for each control

;GUICtrlSetState (-1,$GUI_HIDE)

;GUICtrlSetState (-1,$GUI_HIDE)

$pastebutton = GUICtrlCreateButton ("Paste",465,470,70,20)

GUISetState()

;button controls need to be specified. Use Quickpaste code

While 1

$msg = GUIGetMsg()

Select

Case $msg = $hardwareitem ; Will provide instructions on how to use.

Case $msg = $pastebutton ;$msg = -3 Or $msg = -1 Or

;ExitLoop

$GUI_EVENT_CLOSE

Case $msg = $aboutitem ; About window

Case $msg = $fullitem ; Full list

;have the excel file open on this item. :::WORKING:::

Run(@ComSpec & ' /c "treepaste\ActiveConfigurationItems.xls"','',@SW_SHOW)

Case $msg = $desktopitem ; Desktop,

;need to test this

GUISetState (-1,@SW_HIDE)

;$desktop = FileReadLine ("treepaste/desktop.ini")

$desktoplist = GuiCtrlCreateList("", 350, 10, 300,450)

GuiCtrlSetData(-1, $desktop)

GuiCtrlSetData(-1, "item1|item2|item3")

$data = GUICtrlRead($desktoplist)

ClipPut($data)

Case $msg = $laptopitem ; Laptop

GUISetState (-1,@SW_HIDE)

$laptop = FileReadLine ("treepaste/Laptop.ini")

GuiCtrlCreateList("", 350, 10, 300,450)

;GuiCtrlSetData(-1, $laptop)

Case $msg = $LaserJetCitem ;Color Laserjets

GuiCtrlCreateInput("", 350, 10, 300,450)

Case $msg = $LaserJetMitem ; LaserJet Monochrome

;GUISetState (-1,@SW_HIDE)

;$LJM = FileReadLine ("treepaste/printers/LaserJetM.ini")

GuiCtrlCreateList("", 350, 10, 300,450)

;GuiCtrlSetData(-1, $LJM)

Case $msg = $deskjetitem ; Deskjets

GuiCtrlCreateInput("", 350, 10, 300,450)

Case $msg = $AllotherHPitem ; All other HP printers

GuiCtrlCreateInput("", 350, 10, 300,450)

Case $msg = $Lexitem ; Lexmark printers

GuiCtrlCreateInput("", 350, 10, 300,450)

Case $msg = $misprinteritem ; all other printers

GuiCtrlCreateInput("", 350, 10, 300,450)

Case $msg = $microsoftitem ; All Microsoft Applications, including OS

GuiCtrlCreateInput("", 350, 10, 300,450)

Case $msg = $Aitem ; Software beginning with "A"

GuiCtrlCreateInput("", 350, 10, 300,450)

Case $msg = $Bitem ; Software beginning with "B"

GuiCtrlCreateInput("", 350, 10, 300,450)

Case $msg = $Citem ; Software beginning with "C"

GuiCtrlCreateInput("", 350, 10, 300,450)

Case $msg = $Ditem ; Software beginning with "D"

GuiCtrlCreateInput("", 350, 10, 300,450)

Case $msg = $Eitem ; Software beginning with "E"

GuiCtrlCreateInput("", 350, 10, 300,450)

Case $msg = $Fitem ; Software beginning with "F"

GuiCtrlCreateInput("", 350, 10, 300,450)

Case $msg = $Gitem ; Software beginning with "G"

GuiCtrlCreateInput("", 350, 10, 300,450)

Case $msg = $Hitem ; Software beginning with "H"

GuiCtrlCreateInput("", 350, 10, 300,450)

Case $msg = $Iitem ; Software beginning with "I"

GuiCtrlCreateInput("", 350, 10, 300,450)

Case $msg = $Jitem ; Software beginning with "J"

GuiCtrlCreateInput("", 350, 10, 300,450)

Case $msg = $Kitem ; Software beginning with "K"

GuiCtrlCreateInput("", 350, 10, 300,450)

Case $msg = $Litem ; Software beginning with "L"

GuiCtrlCreateInput("", 350, 10, 300,450)

Case $msg = $Mitem ; Software beginning with "M"

GuiCtrlCreateInput("", 350, 10, 300,450)

Case $msg = $Nitem ; Software beginning with "N"

GuiCtrlCreateInput("", 350, 10, 300,450)

Case $msg = $Oitem ; Software beginning with "O"

GuiCtrlCreateInput("", 350, 10, 300,450)

Case $msg = $Pitem ; Software beginning with "P"

GuiCtrlCreateInput("", 350, 10, 300,450)

Case $msg = $Qitem ; Software beginning with "Q"

GuiCtrlCreateInput("", 350, 10, 300,450)

Case $msg = $Ritem ; Software beginning with "R"

GuiCtrlCreateInput("", 350, 10, 300,450)

Case $msg = $Sitem ; Software beginning with "S"

GuiCtrlCreateInput("", 350, 10, 300,450)

Case $msg = $Titem ; Software beginning with "T"

GuiCtrlCreateInput("", 350, 10, 300,450)

Case $msg = $Uitem ; Software beginning with "U"

GuiCtrlCreateInput("", 350, 10, 300,450)

Case $msg = $Vitem ; Software beginning with "V"

GuiCtrlCreateInput("", 350, 10, 300,450)

Case $msg = $Witem ; Software beginning with "W"

GuiCtrlCreateInput("", 350, 10, 300,450)

Case $msg = $Xitem ; Software beginning with "X"

GuiCtrlCreateInput("", 350, 10, 300,450)

Case $msg = $Yitem ; Software beginning with "Y"

GuiCtrlCreateInput("", 350, 10, 300,450)

Case $msg = $Zitem ; Software beginning with "Z"

GuiCtrlCreateInput("", 350, 10, 300,450)

Case $msg = $Miscitem ; Software beginning with "numbers"

GuiCtrlCreateInput("", 350, 10, 300,450)

EndSelect

WEnd

GUIDelete()

Exit

;-----------------------

;-----------------------

; Code for quickpaste for reference

;#include <GuiConstants.au3>

;fileopen ("bucket.ini", 0)

;$note1 = FileReadLine ("bucket.ini") ; gets info from ini file. line will read in ini like this: item1|item2|item3

;GUICreate("Bucket Name", 300, 75) ; Makes the GUI window

;$Combo_2 = GuiCtrlCreateCombo("", 20, 20, 200, 21) ; Makes the drop down field

;GuiCtrlSetData($combo_2, $note1) ; This sets what is seen in the drop down window

;$button1 = GuiCtrlCreateButton("OK", 230, 20, 60, 20) ; This makes the paste button

; Run the GUI until it is closed

;GuiSetState()

;While 1 ; loop

;$msg = GuiGetMsg()

;Select

;Case $msg = $GUI_EVENT_CLOSE ; This means the X was clicked, and to close the script

;ExitLoop

;When button is pressed, label text is copied to the clipboard

;Case $msg = $button1 ; This ties the $msg to the button being pushed.

;$data = GUICtrlRead($Combo_2) ; This reads the data that is selected in the dropdown

;ClipPut($data) ; This paste the date that was read to the clipboard

;exit

;EndSelect

;WEnd

;Exit

;----------------------------------

;----------------------------------

--------

My revision history:

v1

I've fixed up your code. I belive my effort deserves some mention. Your code is very very bad. You are creating one list over another instead of dynamicly deleting/creating on the fly which is causing them to not function due to overlaping lists.

v2

I fixed up the code even more, notice the new include

#Include <GuiList.au3>

_GUICtrlListClear($h_listbox)

include link

v3

Fixed some odd bugs due to you doing freaky stuff and it's running well. ;)

CODE
;Tree Paste 1.0

;addin tool for UNPlus for Unicenter Service Desk

;Written Sept 2005 by Vollyman (getting cross eyed working on this!)

#include <GUIConstants.au3>

#Include <GuiList.au3>

GUICreate("Tree Paste", 655, 500, -1, -1, BitOR($WS_MINIMIZEBOX, $WS_MAXIMIZEBOX, $WS_GROUP, $WS_CAPTION, $WS_POPUP, $WS_SYSMENU))

;$maintree = GUICtrlCreateTreeView (10,10,680,450)

;$desktoplist = GUICtrlCreateList("", 350, 10, 300, 450)

Global $desktoplist = GUICtrlCreateList("", 350, 10, 300, 450)

Dim $input

$maintree = GUICtrlCreateTreeView(10, 10, 300, 450)

$hardwareitem = GUICtrlCreateTreeViewItem("Hardware", $maintree)

$softwareitem = GUICtrlCreateTreeViewItem("Software", $maintree)

$fullitem = GUICtrlCreateTreeViewItem("Full list", $maintree)

$aboutitem = GUICtrlCreateTreeViewItem("About", $maintree); need to have window on right show about text

;hardware branch

$desktopitem = GUICtrlCreateTreeViewItem("Desktops", $hardwareitem); have ini link

$laptopitem = GUICtrlCreateTreeViewItem("Laptops", $hardwareitem); have ini link

$printeritem = GUICtrlCreateTreeViewItem("Printers", $hardwareitem)

$HPitem = GUICtrlCreateTreeViewItem("HP", $printeritem)

$LaserJetCitem = GUICtrlCreateTreeViewItem("LaserJet Color", $HPitem); have ini link

$LaserJetMitem = GUICtrlCreateTreeViewItem("LaserJet Monochrome", $HPitem); have ini link

$Deskjetitem = GUICtrlCreateTreeViewItem("Deskjet", $HPitem); have ini link

$AllotherHPitem = GUICtrlCreateTreeViewItem("All other HP printers", $HPitem); have ini link

$Lexitem = GUICtrlCreateTreeViewItem("Lexmark", $printeritem); have ini link

$misprinteritem = GUICtrlCreateTreeViewItem("All Other Printers", $printeritem); have ini link

;software branch

$microsoftitem = GUICtrlCreateTreeViewItem("Microsoft", $softwareitem); have ini link

$AthruEitem = GUICtrlCreateTreeViewItem("A - E", $softwareitem)

$Aitem = GUICtrlCreateTreeViewItem("A", $AthruEitem); have ini link

$Bitem = GUICtrlCreateTreeViewItem("B", $AthruEitem); have ini link

$Citem = GUICtrlCreateTreeViewItem("C", $AthruEitem); have ini link

$Ditem = GUICtrlCreateTreeViewItem("D", $AthruEitem); have ini link

$Eitem = GUICtrlCreateTreeViewItem("E", $AthruEitem); have ini link

$FthruJitem = GUICtrlCreateTreeViewItem("F - J", $softwareitem)

$Fitem = GUICtrlCreateTreeViewItem("F", $FthruJitem); have ini link

$Gitem = GUICtrlCreateTreeViewItem("G", $FthruJitem); have ini link

$Hitem = GUICtrlCreateTreeViewItem("H", $FthruJitem); have ini link

$Iitem = GUICtrlCreateTreeViewItem("I", $FthruJitem); have ini link

$Jitem = GUICtrlCreateTreeViewItem("J", $FthruJitem); have ini link

$KthruOitem = GUICtrlCreateTreeViewItem("K - O", $softwareitem)

$Kitem = GUICtrlCreateTreeViewItem("K", $KthruOitem); have ini link

$Litem = GUICtrlCreateTreeViewItem("L", $KthruOitem); have ini link

$Mitem = GUICtrlCreateTreeViewItem("M", $KthruOitem); have ini link

$Nitem = GUICtrlCreateTreeViewItem("N", $KthruOitem); have ini link

$Oitem = GUICtrlCreateTreeViewItem("O", $KthruOitem); have ini link

$PthruTitem = GUICtrlCreateTreeViewItem("P - T", $softwareitem)

$Pitem = GUICtrlCreateTreeViewItem("P", $PthruTitem); have ini link

$Qitem = GUICtrlCreateTreeViewItem("Q", $PthruTitem); have ini link

$Ritem = GUICtrlCreateTreeViewItem("R", $PthruTitem); have ini link

$Sitem = GUICtrlCreateTreeViewItem("S", $PthruTitem); have ini link

$Titem = GUICtrlCreateTreeViewItem("T", $PthruTitem); have ini link

$UthruZitem = GUICtrlCreateTreeViewItem("U - Z", $softwareitem)

$Uitem = GUICtrlCreateTreeViewItem("U", $UthruZitem); have ini link

$Vitem = GUICtrlCreateTreeViewItem("V", $UthruZitem); have ini link

$Witem = GUICtrlCreateTreeViewItem("W", $UthruZitem); have ini link

$Xitem = GUICtrlCreateTreeViewItem("X", $UthruZitem); have ini link

$Yitem = GUICtrlCreateTreeViewItem("Y", $UthruZitem); have ini link

$Zitem = GUICtrlCreateTreeViewItem("Z", $UthruZitem); have ini link

$Miscitem = GUICtrlCreateTreeViewItem("Misc", $softwareitem); have ini link

;test box for list to pick to paste data

;I think this will need to be put in the control function

;and duplicated for each control

;GUICtrlSetState (-1,$GUI_HIDE)

;GUICtrlSetState (-1,$GUI_HIDE)

$pastebutton = GUICtrlCreateButton("Paste", 465, 470, 70, 20)

GUISetState()

;button controls need to be specified. Use Quickpaste code

Dim $desktop

While 1

$msg = GUIGetMsg()

Select

Case $msg = $GUI_EVENT_CLOSE

Exit

Case $msg = $hardwareitem ; Will provide instructions on how to use.

Case $msg = $pastebutton ;$msg = -3 Or $msg = -1 Or

$a = GUICtrlRead($desktoplist)

ClipPut($a)

Case $msg = $aboutitem ; About window

Case $msg = $fullitem ; Full list

;have the excel file open on this item. :::WORKING:::

Run(@ComSpec & ' /c "treepaste\ActiveConfigurationItems.xls"', '', @SW_SHOW)

Case $msg = $desktopitem ; Desktop,

;need to test this

_GUICtrlListClear($desktoplist)

;GUISetState($desktoplist, @SW_HIDE)

;$desktop = FileReadLine ("treepaste/desktop.ini")

;Global $desktoplist = GUICtrlCreateList("", 350, 10, 300, 450)

GUICtrlSetData($desktoplist, $desktop)

GUICtrlSetData($desktoplist, "item1|item2|item3")

$data = GUICtrlRead($desktoplist)

ClipPut($data)

Case $msg = $laptopitem ; Laptop

_GUICtrlListClear($desktoplist)

;GUISetState($desktoplist, @SW_HIDE)

$laptop = FileReadLine("treepaste/Laptop.ini")

;GuiCtrlSetData(-1, $laptop)

Case $msg = $LaserJetCitem ;Color Laserjets

;GUICtrlCreateInput("", 350, 10, 300, 450) YOU DONT WANT TO CREATE A NEW INPUT EACH TIME THIS IS CALLED

Case $msg = $LaserJetMitem ; LaserJet Monochrome

_GUICtrlListClear($desktoplist)

;GUISetState (-1,@SW_HIDE)

;$LJM = FileReadLine ("treepaste/printers/LaserJetM.ini")

;GuiCtrlSetData(-1, $LJM) ;-1 refers to the last created controle.

Case $msg = $Deskjetitem ; Deskjets

makeInput()

Case $msg = $AllotherHPitem ; All other HP printers

makeInput()

Case $msg = $Lexitem ; Lexmark printers

makeInput()

Case $msg = $misprinteritem ; all other printers

makeInput()

Case $msg = $microsoftitem ; All Microsoft Applications, including OS

makeInput()

Case $msg = $Aitem ; Software beginning with "A"

makeInput()

Case $msg = $Bitem ; Software beginning with "B"

makeInput()

Case $msg = $Citem ; Software beginning with "C"

makeInput()

Case $msg = $Ditem ; Software beginning with "D"

makeInput()

Case $msg = $Eitem ; Software beginning with "E"

makeInput()

Case $msg = $Fitem ; Software beginning with "F"

makeInput()

Case $msg = $Gitem ; Software beginning with "G"

makeInput()

Case $msg = $Hitem ; Software beginning with "H"

makeInput()

Case $msg = $Iitem ; Software beginning with "I"

makeInput()

Case $msg = $Jitem ; Software beginning with "J"

makeInput()

Case $msg = $Kitem ; Software beginning with "K"

makeInput()

Case $msg = $Litem ; Software beginning with "L"

makeInput()

Case $msg = $Mitem ; Software beginning with "M"

makeInput()

Case $msg = $Nitem ; Software beginning with "N"

makeInput()

Case $msg = $Oitem ; Software beginning with "O"

makeInput()

Case $msg = $Pitem ; Software beginning with "P"

makeInput()

Case $msg = $Qitem ; Software beginning with "Q"

makeInput()

Case $msg = $Ritem ; Software beginning with "R"

makeInput()

Case $msg = $Sitem ; Software beginning with "S"

makeInput()

Case $msg = $Titem ; Software beginning with "T"

makeInput()

Case $msg = $Uitem ; Software beginning with "U"

makeInput()

Case $msg = $Vitem ; Software beginning with "V"

makeInput()

Case $msg = $Witem ; Software beginning with "W"

makeInput()

Case $msg = $Xitem ; Software beginning with "X"

makeInput()

Case $msg = $Yitem ; Software beginning with "Y"

makeInput()

Case $msg = $Zitem ; Software beginning with "Z"

makeInput()

Case $msg = $Miscitem ; Software beginning with "numbers"

makeInput()

EndSelect

WEnd

GUIDelete()

Exit

Func makeInput()

GUICtrlDelete ( $input )

$input = GUICtrlCreateInput("", 350, 10, 300, 450)

EndFunc

;-----------------------

;-----------------------

; Code for quickpaste for reference

;#include <GuiConstants.au3>

;fileopen ("bucket.ini", 0)

;$note1 = FileReadLine ("bucket.ini") ; gets info from ini file. line will read in ini like this: item1|item2|item3

;GUICreate("Bucket Name", 300, 75) ; Makes the GUI window

;$Combo_2 = GuiCtrlCreateCombo("", 20, 20, 200, 21) ; Makes the drop down field

;GuiCtrlSetData($combo_2, $note1) ; This sets what is seen in the drop down window

;$button1 = GuiCtrlCreateButton("OK", 230, 20, 60, 20) ; This makes the paste button

; Run the GUI until it is closed

;GuiSetState()

;While 1 ; loop

;$msg = GuiGetMsg()

;Select

;Case $msg = $GUI_EVENT_CLOSE ; This means the X was clicked, and to close the script

;ExitLoop

;When button is pressed, label text is copied to the clipboard

;Case $msg = $button1 ; This ties the $msg to the button being pushed.

;$data = GUICtrlRead($Combo_2) ; This reads the data that is selected in the dropdown

;ClipPut($data) ; This paste the date that was read to the clipboard

;exit

;EndSelect

;WEnd

;Exit

Don't forget to give me credit. :P Edited by ligenza
Link to comment
Share on other sites

  • Developers

Thankyou so much! I have only one other thing to ask. I tried to cut and paste the code to notepad, and all the formatting is hosed. Can you put the code in a txt file and attach it? PLEASE????? I will owe you big time!

Or start wordpad and Ctrl+V paste the code into it... then you can Ctrl+C and paste it into you favorite editor ... (I hope that isn't notepad .... ;) )

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

YEEHAA!!! IT WORKS!!! THANKYOU!!!!!THANKYOU!!!!!THANKYOU!!!!!THANKYOU!!!!!THANKYOU!!!!!THANKYOU!!!!!THANKYOU!!!!!THANKYOU!!!!!THANKYOU!!!!!THANKYOU!!!!!THANKYOU!!!!!THANKYOU!!!!!THANKYOU!!!!!THANKYOU!!!!!THANKYOU!!!!!THANKYOU!!!!!THANKYOU!!!!!

did I say thank you?

When I finish with the tweaking, I will post the code.

ligenza - YOU ROCK! ;)

Link to comment
Share on other sites

YEEHAA!!! IT WORKS!!! THANKYOU!!!!!THANKYOU!!!!!THANKYOU!!!!!THANKYOU!!!!!THANKYOU!!!!!THANKYOU!!!!!THANKYOU!!!!!THANKYOU!!!!!THANKYOU!!!!!THANKYOU!!!!!THANKYOU!!!!!THANKYOU!!!!!THANKYOU!!!!!THANKYOU!!!!!THANKYOU!!!!!THANKYOU!!!!!THANKYOU!!!!!

did I say thank you?

When I finish with the tweaking, I will post the code.

ligenza - YOU ROCK! ;)

Posted ImagePosted ImagePosted Image
Link to comment
Share on other sites

Ok, here is the code for the fixed program, with comments added for easy use. THANK YOU for your help on this ligenza, and I made sure you got credit on this! I designed it so others can use it.

;Tree Paste 1.0
;Written by Vollyman with bunches of help from ligenza

;=============================================================
;about TreePaste

;  This program is a sub program for UNPLUS. UNPlus, to describe
; it simply is a program that reprograms the function keys
; on your keyboard (CTRL + F6 thru F11) to perform scripted task to
; save you time. The use of the CTRL key is done to perserve
; functionality of other programs. 
;  When using TreePaste, the user will 
;   1. Click in a field of the application they wish to edit.
;   2. Press CTRL + F10. This will blank out any data in the field.
;   3. In the window that opens, the user will navigate the tree
;      to the desired catagory
;   4. A list will appear in the right window, and the user will
;      select the item desired
;   5. Click "paste"
;
;  This will close TreePaste, and paste the selected data to the 
; field from the clipboard.
;
;  All the data that appears in the right window is populated by INI
; files. This allows for updates to be performed by users or admins
; without the need to recode the program. The only time the program 
; will need recoding is when a catagory is needed to be added.

;--------------
;  The following code is used to reprogram the F10 key for treepaste
; You will need to write a program to have this run in a loop to 
; keep it active. I put the sleep statements in for I found it makes
; it more stable. I found sometimes it will work too fast, and nothing
; will be pasted to the edit field.

;
;  HotKeySet ("^{F10}", "$funct1")
;   Func $funct1()
;   Send("^a")
;   sleep(100)
;   Send("^x")
;   sleep(100)
;   Runwait ("treepaste.exe", "")
;   sleep(100)
;   Send("^v")
;   EndFunc
;========================================================================
;========================================================================

;Begin script.

Opt("trayIconHide", 1); Hides the icon in the system tray
#include <GUIConstants.au3>;you will need to include this file
#Include <GuiList.au3>

GUICreate("Tree Paste", 655, 500, -1, -1, BitOR($WS_MINIMIZEBOX, $WS_MAXIMIZEBOX, $WS_GROUP, $WS_CAPTION, $WS_POPUP, $WS_SYSMENU))

Global $desktoplist = GUICtrlCreateList("", 350, 10, 300, 450)
Dim $input

;---------------
;main trunk of tree list
$maintree = GUICtrlCreateTreeView(10, 10, 300, 450)
$hardwareitem = GUICtrlCreateTreeViewItem("Hardware", $maintree)
$softwareitem = GUICtrlCreateTreeViewItem("Software", $maintree)
$aboutitem = GUICtrlCreateTreeViewItem("About", $maintree)

;hardware branch
$desktopitem = GUICtrlCreateTreeViewItem("Desktops", $hardwareitem)
$laptopitem = GUICtrlCreateTreeViewItem("Laptops", $hardwareitem)

;Software branch
$AthruMitem = GUICtrlCreateTreeViewItem("A - M", $softwareitem)
$NthruZitem = GUICtrlCreateTreeViewItem("N - Z", $softwareitem)

;-----------
;buttons
$pastebutton = GUICtrlCreateButton("Paste", 365, 462, 70, 20)
GUISetState()

$exitbutton = GUICtrlCreateButton("Cancel", 465, 462, 70, 20)
GUISetState()

$helpbutton = GUICtrlCreateButton("Help", 565, 462, 70, 20)
GUISetState()

;-----------

Dim $desktop
  While 1
  $msg = GUIGetMsg()
  Select
    Case $msg = $GUI_EVENT_CLOSE
    Exit
;======================================================
;
; Controls
;
;======================================================

;choices in tree that will have no items listed
        
    Case $msg = $hardwareitem; blanks list
         _GUICtrlListClear($desktoplist) 
         
    Case $msg = $softwareitem; blanks list
         _GUICtrlListClear($desktoplist)
         
;--------
;button controls
                    
    Case $msg = $pastebutton;$msg = -3 Or $msg = -1 Or
         $a = GUICtrlRead($desktoplist)
         ClipPut($a)
         exit

     Case $msg = $exitbutton;$msg = -3 Or $msg = -1 Or
         $a = GUICtrlRead($desktoplist)
         exit  
         
     Case $msg = $helpbutton;$msg = -3 Or $msg = -1 Or
         $a = GUICtrlRead($desktoplist)
        ;msgbox with how to use
         msgbox(0, "How to use TreePaste", "1. Click your cursor in the field you wish to paste data to in your application." & @CRLF & "2. Use the tree menu in the left field to select the catagory." & @CRLF & "3. Select the item desired in thelist on the right." & @CRLF & "4. Click -Paste- to paste the data to the field" & @CRLF & "" & @CRLF & " If you do not wish to make a choice, click -Cancel-")
         
;------------   
;list controls

    Case $msg = $aboutitem; About window 
         msgbox(0, "About TreePaste", "TreePaste 1.0 designed by Vollyman and ligenza" )
         
;hardware controls       
    Case $msg = $desktopitem; Desktop,
         _GUICtrlListClear($desktoplist)
        ;$desk1 = FileReadLine("treepaste/desktop.ini"); Remove remark from the beginning of
                                                        ; to use with INI file in your script.
                                                        ; Make sure you have path correct to 
                                                        ; ini file. I found it best to have
                                                        ; ini files in a sub folder as shown
                                                        ; in the example.
         GUICtrlSetData($desktoplist, $desktop)
        ;GUICtrlSetData($desktoplist, $desk1);Remove remark from beginning of line to use with ini. 
         GUICtrlSetData($desktoplist, "desktop1|desktop2|desktop3"); This is for example purposes. Remark this line
                                                                   ; out when using INI files.          
         $data = GUICtrlRead($desktoplist)
         ClipPut($data)
         
    Case $msg = $laptopitem; Laptop
         _GUICtrlListClear($desktoplist)
        ;$laptop = FileReadLine("treepaste/Laptop.ini"); Remove remark from the beginning of
                                                        ; to use with INI file in your script.
                                                        ; Make sure you have path correct to 
                                                        ; ini file. I found it best to have
                                                        ; ini files in a sub folder as shown
                                                        ; in the example.
         GUICtrlSetData($desktoplist, $desktop)
        ;GUICtrlSetData($desktoplist, $laptop);Remove remark from beginning of line to use with ini.        
         GUICtrlSetData($desktoplist, "laptop1|laptop2|laptop3"); This is for example purposes. Remark this line
                                                                ; out when using INI files.
         $data = GUICtrlRead($desktoplist)
         ClipPut($data)      
      
;software controls

    Case $msg = $AthruMitem; Software beginning with "A thru M"
         _GUICtrlListClear($desktoplist)
        ;$aini = FileReadLine ("treepaste/software/AthruM.ini"); Remove remark from the beginning of
                                                                ; to use with INI file in your script.
                                                                ; Make sure you have path correct to 
                                                                ; ini file. I found it best to have
                                                                ; ini files in a sub folder as shown
                                                                ; in the example.
         GUICtrlSetData($desktoplist, $desktop)
        ;GUICtrlSetData($desktoplist, $aini);Remove remark from beginning of line to use with ini.
         GUICtrlSetData($desktoplist, "Autoit!|Excel|Frontpage"); This is for example purposes. Remark this line
                                                                ; out when using INI files.
         $data = GUICtrlRead($desktoplist)
         ClipPut($data)     

    Case $msg = $NthruZitem; Software beginning with "N thru Z"
         _GUICtrlListClear($desktoplist)
        ;$bini = FileReadLine ("treepaste/software/NthruZ.ini"); Remove remark from the beginning of
                                                                ; to use with INI file in your script.
                                                                ; Make sure you have path correct to 
                                                                ; ini file. I found it best to have
                                                                ; ini files in a sub folder as shown
                                                                ; in the example.
         GUICtrlSetData($desktoplist, $desktop)
        ;GUICtrlSetData($desktoplist, $bini);Remove remark from beginning of line to use with ini.
         GUICtrlSetData($desktoplist, "Outlook|Windows XP|Word"); This is for example purposes. Remark this line
                                                                ; out when using INI files.      
         $data = GUICtrlRead($desktoplist)
         ClipPut($data)      
 
                  EndSelect
    WEnd
  GUIDelete()
Exit

Func makeInput()
     GUICtrlDelete ( $input )
     $input = GUICtrlCreateInput("", 350, 10, 300, 450)
EndFunc

;)

Link to comment
Share on other sites

Note: If you're the one person that downloaded my Tree Paste 1.0R4.au3 then please delete it. :dance: It wasn't ment to be seen by human eyes. Attached is revision five.

The "fixed version" code as posted by volly

CODE
;Tree Paste 1.0

;Written by Vollyman with bunches of help from ligenza

;=============================================================

;about TreePaste

; This program is a sub program for UNPLUS. UNPlus, to describe

; it simply is a program that reprograms the function keys

; on your keyboard (CTRL + F6 thru F11) to perform scripted task to

; save you time. The use of the CTRL key is done to perserve

; functionality of other programs.

; When using TreePaste, the user will

; 1. Click in a field of the application they wish to edit.

; 2. Press CTRL + F10. This will blank out any data in the field.

; 3. In the window that opens, the user will navigate the tree

; to the desired catagory

; 4. A list will appear in the right window, and the user will

; select the item desired

; 5. Click "paste"

;

; This will close TreePaste, and paste the selected data to the

; field from the clipboard.

;

; All the data that appears in the right window is populated by INI

; files. This allows for updates to be performed by users or admins

; without the need to recode the program. The only time the program

; will need recoding is when a catagory is needed to be added.

;--------------

; The following code is used to reprogram the F10 key for treepaste

; You will need to write a program to have this run in a loop to

; keep it active. I put the sleep statements in for I found it makes

; it more stable. I found sometimes it will work too fast, and nothing

; will be pasted to the edit field.

;

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

; Func $funct1()

; Send("^a")

; sleep(100)

; Send("^x")

; sleep(100)

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

; sleep(100)

; Send("^v")

; EndFunc

;========================================================================

;========================================================================

;Begin script.

Opt("trayIconHide", 1); Hides the icon in the system tray

#include <GUIConstants.au3>;you will need to include this file

#Include <GuiList.au3>

GUICreate("Tree Paste", 655, 500, -1, -1, BitOR($WS_MINIMIZEBOX, $WS_MAXIMIZEBOX, $WS_GROUP, $WS_CAPTION, $WS_POPUP, $WS_SYSMENU))

Global $desktoplist = GUICtrlCreateList("", 350, 10, 300, 450)

Dim $input

;---------------

;main trunk of tree list

$maintree = GUICtrlCreateTreeView(10, 10, 300, 450)

$hardwareitem = GUICtrlCreateTreeViewItem("Hardware", $maintree)

$softwareitem = GUICtrlCreateTreeViewItem("Software", $maintree)

$aboutitem = GUICtrlCreateTreeViewItem("About", $maintree)

;hardware branch

$desktopitem = GUICtrlCreateTreeViewItem("Desktops", $hardwareitem)

$laptopitem = GUICtrlCreateTreeViewItem("Laptops", $hardwareitem)

;Software branch

$AthruMitem = GUICtrlCreateTreeViewItem("A - M", $softwareitem)

$NthruZitem = GUICtrlCreateTreeViewItem("N - Z", $softwareitem)

;-----------

;buttons

$pastebutton = GUICtrlCreateButton("Paste", 365, 462, 70, 20)

GUISetState()

$exitbutton = GUICtrlCreateButton("Cancel", 465, 462, 70, 20)

GUISetState()

$helpbutton = GUICtrlCreateButton("Help", 565, 462, 70, 20)

GUISetState()

;-----------

Dim $desktop

While 1

$msg = GUIGetMsg()

Select

Case $msg = $GUI_EVENT_CLOSE

Exit

;======================================================

;

; Controls

;

;======================================================

;choices in tree that will have no items listed

Case $msg = $hardwareitem; blanks list

_GUICtrlListClear($desktoplist)

Case $msg = $softwareitem; blanks list

_GUICtrlListClear($desktoplist)

;--------

;button controls

Case $msg = $pastebutton;$msg = -3 Or $msg = -1 Or

$a = GUICtrlRead($desktoplist)

ClipPut($a)

exit

Case $msg = $exitbutton;$msg = -3 Or $msg = -1 Or

$a = GUICtrlRead($desktoplist)

exit

Case $msg = $helpbutton;$msg = -3 Or $msg = -1 Or

$a = GUICtrlRead($desktoplist)

;msgbox with how to use

msgbox(0, "How to use TreePaste", "1. Click your cursor in the field you wish to paste data to in your application." & @CRLF & "2. Use the tree menu in the left field to select the catagory." & @CRLF & "3. Select the item desired in thelist on the right." & @CRLF & "4. Click -Paste- to paste the data to the field" & @CRLF & "" & @CRLF & " If you do not wish to make a choice, click -Cancel-")

;------------

;list controls

Case $msg = $aboutitem; About window

msgbox(0, "About TreePaste", "TreePaste 1.0 designed by Vollyman and ligenza" )

;hardware controls

Case $msg = $desktopitem; Desktop,

_GUICtrlListClear($desktoplist)

;$desk1 = FileReadLine("treepaste/desktop.ini"); Remove remark from the beginning of

; to use with INI file in your script.

; Make sure you have path correct to

; ini file. I found it best to have

; ini files in a sub folder as shown

; in the example.

GUICtrlSetData($desktoplist, $desktop)

;GUICtrlSetData($desktoplist, $desk1);Remove remark from beginning of line to use with ini.

GUICtrlSetData($desktoplist, "desktop1|desktop2|desktop3"); This is for example purposes. Remark this line

; out when using INI files.

$data = GUICtrlRead($desktoplist)

ClipPut($data)

Case $msg = $laptopitem; Laptop

_GUICtrlListClear($desktoplist)

;$laptop = FileReadLine("treepaste/Laptop.ini"); Remove remark from the beginning of

; to use with INI file in your script.

; Make sure you have path correct to

; ini file. I found it best to have

; ini files in a sub folder as shown

; in the example.

GUICtrlSetData($desktoplist, $desktop)

;GUICtrlSetData($desktoplist, $laptop);Remove remark from beginning of line to use with ini.

GUICtrlSetData($desktoplist, "laptop1|laptop2|laptop3"); This is for example purposes. Remark this line

; out when using INI files.

$data = GUICtrlRead($desktoplist)

ClipPut($data)

;software controls

Case $msg = $AthruMitem; Software beginning with "A thru M"

_GUICtrlListClear($desktoplist)

;$aini = FileReadLine ("treepaste/software/AthruM.ini"); Remove remark from the beginning of

; to use with INI file in your script.

; Make sure you have path correct to

; ini file. I found it best to have

; ini files in a sub folder as shown

; in the example.

GUICtrlSetData($desktoplist, $desktop)

;GUICtrlSetData($desktoplist, $aini);Remove remark from beginning of line to use with ini.

GUICtrlSetData($desktoplist, "Autoit!|Excel|Frontpage"); This is for example purposes. Remark this line

; out when using INI files.

$data = GUICtrlRead($desktoplist)

ClipPut($data)

Case $msg = $NthruZitem; Software beginning with "N thru Z"

_GUICtrlListClear($desktoplist)

;$bini = FileReadLine ("treepaste/software/NthruZ.ini"); Remove remark from the beginning of

; to use with INI file in your script.

; Make sure you have path correct to

; ini file. I found it best to have

; ini files in a sub folder as shown

; in the example.

GUICtrlSetData($desktoplist, $desktop)

;GUICtrlSetData($desktoplist, $bini);Remove remark from beginning of line to use with ini.

GUICtrlSetData($desktoplist, "Outlook|Windows XP|Word"); This is for example purposes. Remark this line

; out when using INI files.

$data = GUICtrlRead($desktoplist)

ClipPut($data)

EndSelect

WEnd

GUIDelete()

Exit

Func makeInput()

GUICtrlDelete ( $input )

$input = GUICtrlCreateInput("", 350, 10, 300, 450)

EndFunc

Version 4

Change Notes

CODE

;v4 Change Notes

;GUIDelete() Exiting the program will delete the GUI, this is redundant

;$a = GUICtrlRead($desktoplist)

;ClipPut($a) can be simplified into

;ClipPut(GUICtrlRead($desktoplist))

;You never use makeInput so why leave it in? Deleted.

;Renamed NthruZitem to itmNtoZ

;It starts with the prefix itm so we know it's an item of our treeview then it's followed by NtoZ which is shorter & more pretty then NtoZ

;Same thing with AthruMitem, renamed to itmAtoM. In larger programs having a variable naming convention that works well is essential, bad variable names make for messy code.

;Pasting is the process of taking data from the clipboard and putting it into a controle while copying is the process of

;taking data from a controle and putting it onto the clipboard, you have the two mixed up.

;thelist corrected to the list

;You had all this text on one line, shame on you. Use the next line operator to make it span multiple lines to improve readability.

;msgbox(0, "How to use TreePaste", "1. Click your cursor in the field you wish to paste data to in your application." & @CRLF _

; & "2. Use the tree menu in the left field to select the catagory." & @CRLF _

; & "3. Select the item desired in the list on the right." & @CRLF _

; & "4. Click the Copy button to copy the data to the clipboard" & @CRLF _

; & "" & @CRLF & " If you do not wish to make a choice, click -Cancel-")

;Stupid comments:

;Opt("trayIconHide", 1); Hides the icon in the system tray

;You can tell exactly from the code what is happening, don't make stupid comments like this.

;#include <GUIConstants.au3>;you will need to include this file

;Same deal here.. comments are used to explain to the programmer what is happening, don't explain extreamly basic things or the code will

;become cluttered. I understand you're new and learning but this is all part of the learning process. :dance: I left the comments unchanged.

;Finally your formatting sucks. There is no formatting in your code. You should try to stick to the standard formating convention to make your code readable

;to other programmers as well as yourself.

Version 5

Change notes

CODE

;v5 Change Notes

;You've sectioned off the code well except you left the global variables scattered about, not good! I added a global variable section and put them

;all under it.

;Global $input -- Why is this even here? You don't use it once. Remove stuff that is never used, you did this with the makeInput funciton I removed in

;v4 as well. :mad2: $input removed.

;What are you trying to do here?! This code is very bad. It shows you have no idea what GUISetState does, look it up in the HelpFile

;and read then look at how the examples use it. GUISetState, when called with no parameters, will show the gui. Why are you showing the GUI

;each time you make a button? The GUI is hidden when you create it as you're suppose to add all your controles and then once you're done you call

; GUISetState ONCE! :cheer: I fixed up the code to do just that and I added a little comment.

;;buttons

;$pastebutton = GUICtrlCreateButton("Paste", 365, 462, 70, 20)

;GUISetState()

;$btnCancel = GUICtrlCreateButton("Cancel", 465, 462, 70, 20)

;GUISetState()

;$btnHelp = GUICtrlCreateButton("Help", 565, 462, 70, 20)

;GUISetState()

;Okay in your origonal code this is what you did..

; Case $msg = $pastebutton;$msg = -3 Or $msg = -1 Or

;$a = GUICtrlRead($desktoplist)

;ClipPut($a)

;exit

;

;Case $msg = $btnCancel;$msg = -3 Or $msg = -1 Or

;$a = GUICtrlRead($desktoplist)

;exit

;"paste"button (it's really copy by the way.. might want to change that, see v4 notes for explination)

;Ok now on the code for the exit button you have a freaky comment that looks like it was stolen from somewhere (I removed it) and

;you create and assign the variable a to the highlited item in $desktoplist but never do anything with it! What are you thinking?

;I fixed up both events to work correctly, mainly when you click the "paste" button it copys the data like it should and the

;program does _not_ exit. The exit button will just exit the program like it should and wont do any last minute pointless calculations.

;I just noticed you have ;$msg = -3 Or $msg = -1 in there as a comment about three times. What the hell? It has nothing to do with your code

;nor the code you're putting it next to. All removed.

;Removed the stupid comment:

;;msgbox with how to use

;MsgBox(0, "How to use TreePaste"

;as you can see the first line says it's a message box and starts off with "How to use.." you do NOT need a comment there! If you do then shame on you.

;The "copy" button got on my nerves again and I just renamed it how it should of origonally been named, to copy. I also changed the caption to reflect

;this recent name change.

;Again talking about variable naming conventions.. xbutton is horrible. Renamed all of your xbuttons using a btnx convention where x

;is the identifier. example: helpbutton => btnHelp notice the capital H.

;when you have hundreds of buttons this shorter yet clear naming convention will come in handy.

;you named the Cancel button exitbutton.. stick to one name. Named btnCancel

;Line four of your Help button message

; & "" & @CRLF & " If you do not wish to make a choice, click -Cancel-")

;changed to click the cancel button. In all the other lines you end with a period and then you suddenly don't use one. Be consistant.

;-Cancel- is so weird and no one says that when refering to a button, if I was a user I'd be really confused hence my change to

; "the cancel button" this way they'll know what you're talking about with minimal confusion!

;You have this comment..

; to use with INI file in your script.

; Make sure you have path correct to

; ini file. I found it best to have

; ini files in a sub folder as shown

; in the example.

;about five times in your example and it means nothing. If you built this so others can use it then your a very cruel person.

;I don't see any effort put into this on your part to make the code readable.. it's taken me five revisions to even get it to this point! ;(

;Removed the comments that ment nothing _ALL_ of them.. You had many more, see your origonal source for them. haha.

;Ok, when your commenting code don't use aol speak as it is not professional. Changed thru to through.

;After removing all those identicial yet totally irrelivent comments I get the impression that this was a copy and paste hack job.

;Again if your target audience is really other autoit developers you must code well.. this is not acceptable unless you don't mind

;looking like some aol l33t dude. ;)

Version 5

Code (with v4 & v5 notes at the end)

CODE

;Tree Paste 1.0

;Written by Vollyman with bunches of help from ligenza

;=============================================================

;about TreePaste

; This program is a sub program for UNPLUS. UNPlus, to describe

; it simply is a program that reprograms the function keys

; on your keyboard (CTRL + F6 thru F11) to perform scripted task to

; save you time. The use of the CTRL key is done to perserve

; functionality of other programs.

; When using TreePaste, the user will

; 1. Click in a field of the application they wish to edit.

; 2. Press CTRL + F10. This will blank out any data in the field.

; 3. In the window that opens, the user will navigate the tree

; to the desired catagory

; 4. A list will appear in the right window, and the user will

; select the item desired

; 5. Click "paste"

;

; This will close TreePaste, and paste the selected data to the

; field from the clipboard.

;

; All the data that appears in the right window is populated by INI

; files. This allows for updates to be performed by users or admins

; without the need to recode the program. The only time the program

; will need recoding is when a catagory is needed to be added.

;--------------

; The following code is used to reprogram the F10 key for treepaste

; You will need to write a program to have this run in a loop to

; keep it active. I put the sleep statements in for I found it makes

; it more stable. I found sometimes it will work too fast, and nothing

; will be pasted to the edit field.

;

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

; Func $funct1()

; Send("^a")

; sleep(100)

; Send("^x")

; sleep(100)

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

; sleep(100)

; Send("^v")

; EndFunc

;========================================================================

;========================================================================

;Begin script.

opt("trayIconHide", 1); Hides the icon in the system tray

#include <GUIConstants.au3>;you will need to include this file

#Include <GuiList.au3>

GUICreate("Tree Paste", 655, 500, -1, -1, BitOR($WS_MINIMIZEBOX, $WS_MAXIMIZEBOX, $WS_GROUP, $WS_CAPTION, $WS_POPUP, $WS_SYSMENU))

;---------------

;Global variables

Global $desktoplist = GUICtrlCreateList("", 350, 10, 300, 450)

Global $desktop

;---------------

;main trunk of tree list

$maintree = GUICtrlCreateTreeView(10, 10, 300, 450)

$hardwareitem = GUICtrlCreateTreeViewItem("Hardware", $maintree)

$softwareitem = GUICtrlCreateTreeViewItem("Software", $maintree)

$aboutitem = GUICtrlCreateTreeViewItem("About", $maintree)

;hardware branch

$desktopitem = GUICtrlCreateTreeViewItem("Desktops", $hardwareitem)

$laptopitem = GUICtrlCreateTreeViewItem("Laptops", $hardwareitem)

;Software branch

$itmAtoM = GUICtrlCreateTreeViewItem("A - M", $softwareitem)

$itmNtoZ = GUICtrlCreateTreeViewItem("N - Z", $softwareitem)

;-----------

;buttons

$btnCopy = GUICtrlCreateButton("Copy", 365, 462, 70, 20)

$btnCancel = GUICtrlCreateButton("Cancel", 465, 462, 70, 20)

$btnHelp = GUICtrlCreateButton("Help", 565, 462, 70, 20)

;Ok now we're doing adding all the controles to the GUI so we'll show it.

;Even though the default is @SW_SHOW I sometimes enjoy putting it in there just

;to make it perfectly clear what it's doing. This is an example of a useful comment by the way although a bit verbose. :cheer:

GUISetState(@SW_SHOW)

;

;-----------

While 1

$msg = GUIGetMsg()

Select

Case $msg = $GUI_EVENT_CLOSE

Exit

;======================================================

;

; Controls

;

;======================================================

;choices in tree that will have no items listed

Case $msg = $hardwareitem; blanks list

_GUICtrlListClear ($desktoplist)

Case $msg = $softwareitem; blanks list

_GUICtrlListClear ($desktoplist)

;--------

;button controls

Case $msg = $btnCopy

ClipPut(GUICtrlRead($desktoplist))

Exit

Case $msg = $btnCancel

Exit

Case $msg = $btnHelp

MsgBox(0, "How to use TreePaste", "1. Click your cursor in the field you wish to paste data to in your application." & @CRLF _

& "2. Use the tree menu in the left field to select the catagory." & @CRLF _

& "3. Select the item desired in the list on the right." & @CRLF _

& "4. Click the Copy button to copy the data to the clipboard" & @CRLF _

& "" & @CRLF & " If you do not wish to make a choice, click the cancel button.")

;------------

;list controls

Case $msg = $aboutitem; About window

MsgBox(0, "About TreePaste", "TreePaste 1.0 designed by Vollyman and ligenza.")

;hardware controls

Case $msg = $desktopitem; Desktop,

_GUICtrlListClear ($desktoplist)

GUICtrlSetData($desktoplist, $desktop)

GUICtrlSetData($desktoplist, "desktop1|desktop2|desktop3"); This is for example purposes. Remark this line

ClipPut(GUICtrlRead($desktoplist))

Case $msg = $laptopitem; Laptop

_GUICtrlListClear ($desktoplist)

GUICtrlSetData($desktoplist, $desktop)

GUICtrlSetData($desktoplist, "laptop1|laptop2|laptop3"); This is for example purposes. Remark this line

ClipPut(GUICtrlRead($desktoplist))

Case $msg = $itmAtoM; Software beginning with "A through M"

_GUICtrlListClear ($desktoplist)

GUICtrlSetData($desktoplist, $desktop)

GUICtrlSetData($desktoplist, "Autoit!|Excel|Frontpage"); This is for example purposes. Remark this line

ClipPut(GUICtrlRead($desktoplist))

Case $msg = $itmNtoZ; Software beginning with "N through Z"

_GUICtrlListClear ($desktoplist)

GUICtrlSetData($desktoplist, $desktop)

GUICtrlSetData($desktoplist, "Outlook|Windows XP|Word"); This is for example purposes. Remark this line

ClipPut(GUICtrlRead($desktoplist))

EndSelect

WEnd

;v4 Change Notes

;GUIDelete() Exiting the program will delete the GUI, this is redundant

;$a = GUICtrlRead($desktoplist)

;ClipPut($a) can be simplified into

;ClipPut(GUICtrlRead($desktoplist))

;You never use makeInput so why leave it in? Deleted.

;Renamed NthruZitem to itmNtoZ

;It starts with the prefix itm so we know it's an item of our treeview then it's followed by NtoZ which is shorter & more pretty then NtoZ

;Same thing with AthruMitem, renamed to itmAtoM. In larger programs having a variable naming convention that works well is essential, bad variable names make for messy code.

;Pasting is the process of taking data from the clipboard and putting it into a controle while copying is the process of

;taking data from a controle and putting it onto the clipboard, you have the two mixed up.

;thelist corrected to the list

;You had all this text on one line, shame on you. Use the next line operator to make it span multiple lines to improve readability.

;msgbox(0, "How to use TreePaste", "1. Click your cursor in the field you wish to paste data to in your application." & @CRLF _

; & "2. Use the tree menu in the left field to select the catagory." & @CRLF _

; & "3. Select the item desired in the list on the right." & @CRLF _

; & "4. Click the Copy button to copy the data to the clipboard" & @CRLF _

; & "" & @CRLF & " If you do not wish to make a choice, click -Cancel-")

;Stupid comments:

;Opt("trayIconHide", 1); Hides the icon in the system tray

;You can tell exactly from the code what is happening, don't make stupid comments like this.

;#include <GUIConstants.au3>;you will need to include this file

;Same deal here.. comments are used to explain to the programmer what is happening, don't explain extreamly basic things or the code will

;become cluttered. I understand you're new and learning but this is all part of the learning process. ;) I left the comments unchanged.

;Finally your formatting sucks. There is no formatting in your code. You should try to stick to the standard formating convention to make your code readable

;to other programmers as well as yourself.

;v5 Change Notes

;You've sectioned off the code well except you left the global variables scattered about, not good! I added a global variable section and put them

;all under it.

;Global $input -- Why is this even here? You don't use it once. Remove stuff that is never used, you did this with the makeInput funciton I removed in

;v4 as well. :oops: $input removed.

;What are you trying to do here?! This code is very bad. It shows you have no idea what GUISetState does, look it up in the HelpFile

;and read then look at how the examples use it. GUISetState, when called with no parameters, will show the gui. Why are you showing the GUI

;each time you make a button? The GUI is hidden when you create it as you're suppose to add all your controles and then once you're done you call

; GUISetState ONCE! ;) I fixed up the code to do just that and I added a little comment.

;;buttons

;$pastebutton = GUICtrlCreateButton("Paste", 365, 462, 70, 20)

;GUISetState()

;$btnCancel = GUICtrlCreateButton("Cancel", 465, 462, 70, 20)

;GUISetState()

;$btnHelp = GUICtrlCreateButton("Help", 565, 462, 70, 20)

;GUISetState()

;Okay in your origonal code this is what you did..

; Case $msg = $pastebutton;$msg = -3 Or $msg = -1 Or

;$a = GUICtrlRead($desktoplist)

;ClipPut($a)

;exit

;

;Case $msg = $btnCancel;$msg = -3 Or $msg = -1 Or

;$a = GUICtrlRead($desktoplist)

;exit

;"paste"button (it's really copy by the way.. might want to change that, see v4 notes for explination)

;Ok now on the code for the exit button you have a freaky comment that looks like it was stolen from somewhere (I removed it) and

;you create and assign the variable a to the highlited item in $desktoplist but never do anything with it! What are you thinking?

;I fixed up both events to work correctly, mainly when you click the "paste" button it copys the data like it should and the

;program does _not_ exit. The exit button will just exit the program like it should and wont do any last minute pointless calculations.

;I just noticed you have ;$msg = -3 Or $msg = -1 in there as a comment about three times. What the hell? It has nothing to do with your code

;nor the code you're putting it next to. All removed.

;Removed the stupid comment:

;;msgbox with how to use

;MsgBox(0, "How to use TreePaste"

;as you can see the first line says it's a message box and starts off with "How to use.." you do NOT need a comment there! If you do then shame on you.

;The "copy" button got on my nerves again and I just renamed it how it should of origonally been named, to copy. I also changed the caption to reflect

;this recent name change.

;Again talking about variable naming conventions.. xbutton is horrible. Renamed all of your xbuttons using a btnx convention where x

;is the identifier. example: helpbutton => btnHelp notice the capital H.

;when you have hundreds of buttons this shorter yet clear naming convention will come in handy.

;you named the Cancel button exitbutton.. stick to one name. Named btnCancel

;Line four of your Help button message

; & "" & @CRLF & " If you do not wish to make a choice, click -Cancel-")

;changed to click the cancel button. In all the other lines you end with a period and then you suddenly don't use one. Be consistant.

;-Cancel- is so weird and no one says that when refering to a button, if I was a user I'd be really confused hence my change to

; "the cancel button" this way they'll know what you're talking about with minimal confusion!

;You have this comment..

; to use with INI file in your script.

; Make sure you have path correct to

; ini file. I found it best to have

; ini files in a sub folder as shown

; in the example.

;about five times in your example and it means nothing. If you built this so others can use it then your a very cruel person.

;I don't see any effort put into this on your part to make the code readable.. it's taken me five revisions to even get it to this point! ;(

;Removed the comments that ment nothing _ALL_ of them.. You had many more, see your origonal source for them. haha.

;Ok, when your commenting code don't use aol speak as it is not professional. Changed thru to through.

;After removing all those identicial yet totally irrelivent comments I get the impression that this was a copy and paste hack job.

;Again if your target audience is really other autoit developers you must code well.. this is not acceptable unless you don't mind

;looking like some aol l33t dude. :P

Exit

Edited by ligenza
Link to comment
Share on other sites

Odd emote error isn't allowing me to edit my post. It deleted what I had added in my edit. A fairly serious bug. I seem to "win" with these deleteing data bugs.

Edit: Incorrect number of tags error just caused me to loose everything I added in my edit. win = 3...

Version 6

Change notes

CODE

;v6

;Added function CopyToClip which copys the selected item to the clipboard only if there's something to copy in the first palce.

;Before you could just start the program and click copy and it would close, now it'll only work if you actually copy something.

;btnCopy will now run CopyToClip to take advantage of this new funtionality, old code removed. Added context menu which uses

;the new function CopyToClip also.

Version 6.1

Change notes

;v6.1
;Redesigned CopyToClip. Removed the Exit at the end of the code. It did not need to be there.

Version 6.1

Code, v6 & v6.1 change notes at bottom.

CODE
;Tree Paste 1.0

;Written by Vollyman with bunches of help from ligenza

;=============================================================

;about TreePaste

; This program is a sub program for UNPLUS. UNPlus, to describe

; it simply is a program that reprograms the function keys

; on your keyboard (CTRL + F6 thru F11) to perform scripted task to

; save you time. The use of the CTRL key is done to perserve

; functionality of other programs.

; When using TreePaste, the user will

; 1. Click in a field of the application they wish to edit.

; 2. Press CTRL + F10. This will blank out any data in the field.

; 3. In the window that opens, the user will navigate the tree

; to the desired catagory

; 4. A list will appear in the right window, and the user will

; select the item desired

; 5. Click "paste"

;

; This will close TreePaste, and paste the selected data to the

; field from the clipboard.

;

; All the data that appears in the right window is populated by INI

; files. This allows for updates to be performed by users or admins

; without the need to recode the program. The only time the program

; will need recoding is when a catagory is needed to be added.

;--------------

; The following code is used to reprogram the F10 key for treepaste

; You will need to write a program to have this run in a loop to

; keep it active. I put the sleep statements in for I found it makes

; it more stable. I found sometimes it will work too fast, and nothing

; will be pasted to the edit field.

;

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

; Func $funct1()

; Send("^a")

; sleep(100)

; Send("^x")

; sleep(100)

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

; sleep(100)

; Send("^v")

; EndFunc

;========================================================================

;========================================================================

;Begin script.

opt("trayIconHide", 1); Hides the icon in the system tray

#include <GUIConstants.au3>;you will need to include this file

#Include <GuiList.au3>

GUICreate("Tree Paste", 655, 500, -1, -1, BitOR($WS_MINIMIZEBOX, $WS_MAXIMIZEBOX, $WS_GROUP, $WS_CAPTION, $WS_POPUP, $WS_SYSMENU))

;---------------

;Global variables

Global $desktoplist = GUICtrlCreateList("", 350, 10, 300, 450)

Global $desktop

;---------------

;context menu

$contextmenu = GUICtrlCreateContextMenu($desktoplist)

$ctmCopy = GUICtrlCreateMenuItem("Copy", $contextmenu)

;main trunk of tree list

$maintree = GUICtrlCreateTreeView(10, 10, 300, 450)

$hardwareitem = GUICtrlCreateTreeViewItem("Hardware", $maintree)

$softwareitem = GUICtrlCreateTreeViewItem("Software", $maintree)

$aboutitem = GUICtrlCreateTreeViewItem("About", $maintree)

;hardware branch

$desktopitem = GUICtrlCreateTreeViewItem("Desktops", $hardwareitem)

$laptopitem = GUICtrlCreateTreeViewItem("Laptops", $hardwareitem)

;Software branch

$itmAtoM = GUICtrlCreateTreeViewItem("A - M", $softwareitem)

$itmNtoZ = GUICtrlCreateTreeViewItem("N - Z", $softwareitem)

;-----------

;buttons

$btnCopy = GUICtrlCreateButton("Copy", 365, 462, 70, 20)

$btnCancel = GUICtrlCreateButton("Cancel", 465, 462, 70, 20)

$btnHelp = GUICtrlCreateButton("Help", 565, 462, 70, 20)

;Ok now we're done adding all the controles to the GUI so we'll show it.

;Even though the default is @SW_SHOW I sometimes enjoy putting it in there just

;to make it perfectly clear what it's doing. This is an example of a useful comment by the way although a bit verbose. :mad2:

GUISetState(@SW_SHOW)

;

;-----------

While 1

$msg = GUIGetMsg()

Select

Case $msg = $GUI_EVENT_CLOSE

Exit

Case $msg = $ctmCopy ;contextmenu copy

CopyToClip()

;======================================================

;

; Controls

;

;======================================================

;choices in tree that will have no items listed

Case $msg = $hardwareitem; blanks list

_GUICtrlListClear ($desktoplist)

Case $msg = $softwareitem; blanks list

_GUICtrlListClear ($desktoplist)

;--------

;button controls

Case $msg = $btnCopy

CopyToClip()

Case $msg = $btnCancel

Exit

Case $msg = $btnHelp

MsgBox(0, "How to use TreePaste", "1. Click your cursor in the field you wish to paste data to in your application." & @CRLF _

& "2. Use the tree menu in the left field to select the catagory." & @CRLF _

& "3. Select the item desired in the list on the right." & @CRLF _

& "4. Click the Copy button to copy the data to the clipboard" & @CRLF _

& "" & @CRLF & " If you do not wish to make a choice, click the cancel button.")

;------------

;list controls

Case $msg = $aboutitem; About window

MsgBox(0, "About TreePaste", "TreePaste 1.0 designed by Vollyman and ligenza.")

;hardware controls

Case $msg = $desktopitem; Desktop,

_GUICtrlListClear ($desktoplist)

GUICtrlSetData($desktoplist, $desktop)

GUICtrlSetData($desktoplist, "desktop1|desktop2|desktop3"); This is for example purposes. Remark this line

ClipPut(GUICtrlRead($desktoplist))

Case $msg = $laptopitem; Laptop

_GUICtrlListClear ($desktoplist)

GUICtrlSetData($desktoplist, $desktop)

GUICtrlSetData($desktoplist, "laptop1|laptop2|laptop3"); This is for example purposes. Remark this line

ClipPut(GUICtrlRead($desktoplist))

Case $msg = $itmAtoM; Software beginning with "A through M"

_GUICtrlListClear ($desktoplist)

GUICtrlSetData($desktoplist, $desktop)

GUICtrlSetData($desktoplist, "Autoit!|Excel|Frontpage"); This is for example purposes. Remark this line

ClipPut(GUICtrlRead($desktoplist))

Case $msg = $itmNtoZ; Software beginning with "N through Z"

_GUICtrlListClear ($desktoplist)

GUICtrlSetData($desktoplist, $desktop)

GUICtrlSetData($desktoplist, "Outlook|Windows XP|Word"); This is for example purposes. Remark this line

ClipPut(GUICtrlRead($desktoplist))

EndSelect

WEnd

;-- Functions

Func CopyToClip()

;accessing controles is much slower than accessing a variable stored in memory

$selected = GUICtrlRead($desktoplist)

If Not ($selected == "") Then ;this prevents copying nothing

ClipPut($selected)

Exit

EndIf

EndFunc

;v6 change notes

;Added function CopyToClip which copys the selected item to the clipboard only if there's something to copy in the first palce.

;Before you could just start the program and click copy and it would close, now it'll only work if you actually copy something.

;btnCopy will now run CopyToClip to take advantage of this new funtionality, old code removed. Added context menu which uses

;the new function CopyToClip also.

;v6.1 change notes

;Redesigned CopyToClip. Removed the Exit at the end of the code. It did not need to be there.

Compiled ChangeLog v1 to v6.1

CODE
;Compiled ChangeLog v1 to v6.1

;v1

;I've fixed up your code. I belive my effort deserves some mention. Your code is very very bad. You are creating one list over another instead of dynamicly deleting/creating ;on the fly which is causing them to not function due to overlaping lists.

;v2

;I fixed up the code even more, notice the new include

;v3

;Fixed some odd bugs due to you doing freaky stuff and it's running well. :oops:

;v4

;GUIDelete() Exiting the program will delete the GUI, this is redundant

;$a = GUICtrlRead($desktoplist)

;ClipPut($a) can be simplified into

;ClipPut(GUICtrlRead($desktoplist))

;You never use makeInput so why leave it in? Deleted.

;Renamed NthruZitem to itmNtoZ

;It starts with the prefix itm so we know it's an item of our treeview then it's followed by NtoZ which is shorter & more pretty then NtoZ

;Same thing with AthruMitem, renamed to itmAtoM. In larger programs having a variable naming convention that works well is essential, bad variable names make for messy code.

;Pasting is the process of taking data from the clipboard and putting it into a controle while copying is the process of

;taking data from a controle and putting it onto the clipboard, you have the two mixed up.

;thelist corrected to the list

;You had all this text on one line, shame on you. Use the next line operator to make it span multiple lines to improve readability.

;msgbox(0, "How to use TreePaste", "1. Click your cursor in the field you wish to paste data to in your application." & @CRLF _

; & "2. Use the tree menu in the left field to select the catagory." & @CRLF _

; & "3. Select the item desired in the list on the right." & @CRLF _

; & "4. Click the Copy button to copy the data to the clipboard" & @CRLF _

; & "" & @CRLF & " If you do not wish to make a choice, click -Cancel-")

;Stupid comments:

;Opt("trayIconHide", 1); Hides the icon in the system tray

;You can tell exactly from the code what is happening, don't make stupid comments like this.

;#include <GUIConstants.au3>;you will need to include this file

;Same deal here.. comments are used to explain to the programmer what is happening, don't explain extreamly basic things or the code will

;become cluttered. I understand you're new and learning but this is all part of the learning process. wink.gif I left the comments unchanged.

;Finally your formatting sucks. There is no formatting in your code. You should try to stick to the standard formating convention to make your code readable

;to other programmers as well as yourself.

;v5

;You've sectioned off the code well except you left the global variables scattered about, not good! I added a global variable section and put them

;all under it.

;Global $input -- Why is this even here? You don't use it once. Remove stuff that is never used, you did this with the makeInput funciton I removed in

;v4 as well. :P $input removed.

;What are you trying to do here?! This code is very bad. It shows you have no idea what GUISetState does, look it up in the HelpFile

;and read then look at how the examples use it. GUISetState, when called with no parameters, will show the gui. Why are you showing the GUI

;each time you make a button? The GUI is hidden when you create it as you're suppose to add all your controles and then once you're done you call

; GUISetState ONCE! :dance: I fixed up the code to do just that and I added a little comment.

;;buttons

;$pastebutton = GUICtrlCreateButton("Paste", 365, 462, 70, 20)

;GUISetState()

;$btnCancel = GUICtrlCreateButton("Cancel", 465, 462, 70, 20)

;GUISetState()

;$btnHelp = GUICtrlCreateButton("Help", 565, 462, 70, 20)

;GUISetState()

;Okay in your origonal code this is what you did..

; Case $msg = $pastebutton;$msg = -3 Or $msg = -1 Or

;$a = GUICtrlRead($desktoplist)

;ClipPut($a)

;exit

;

;Case $msg = $btnCancel;$msg = -3 Or $msg = -1 Or

;$a = GUICtrlRead($desktoplist)

;exit

;"paste"button (it's really copy by the way.. might want to change that, see v4 notes for explination)

;Ok now on the code for the exit button you have a freaky comment that looks like it was stolen from somewhere (I removed it) and

;you create and assign the variable a to the highlited item in $desktoplist but never do anything with it! What are you thinking?

;I fixed up both events to work correctly, mainly when you click the "paste" button it copys the data like it should and the

;program does _not_ exit. The exit button will just exit the program like it should and wont do any last minute pointless calculations.

;I just noticed you have ;$msg = -3 Or $msg = -1 in there as a comment about three times. What the hell? It has nothing to do with your code

;nor the code you're putting it next to. All removed.

;Removed the stupid comment:

;;msgbox with how to use

;MsgBox(0, "How to use TreePaste"

;as you can see the first line says it's a message box and starts off with "How to use.." you do NOT need a comment there! If you do then shame on you.

;The "copy" button got on my nerves again and I just renamed it how it should of origonally been named, to copy. I also changed the caption to reflect

;this recent name change.

;Again talking about variable naming conventions.. xbutton is horrible. Renamed all of your xbuttons using a btnx convention where x

;is the identifier. example: helpbutton => btnHelp notice the capital H.

;when you have hundreds of buttons this shorter yet clear naming convention will come in handy.

;you named the Cancel button exitbutton.. stick to one name. Named btnCancel

;Line four of your Help button message

; & "" & @CRLF & " If you do not wish to make a choice, click -Cancel-")

;changed to click the cancel button. In all the other lines you end with a period and then you suddenly don't use one. Be consistant.

;-Cancel- is so weird and no one says that when refering to a button, if I was a user I'd be really confused hence my change to

; "the cancel button" this way they'll know what you're talking about with minimal confusion!

;You have this comment..

; to use with INI file in your script.

; Make sure you have path correct to

; ini file. I found it best to have

; ini files in a sub folder as shown

; in the example.

;about five times in your example and it means nothing. If you built this so others can use it then your a very cruel person.

;I don't see any effort put into this on your part to make the code readable.. it's taken me five revisions to even get it to this point! ;(

;Removed the comments that ment nothing _ALL_ of them.. You had many more, see your origonal source for them. haha.

;Ok, when your commenting code don't use aol speak as it is not professional. Changed thru to through.

;After removing all those identicial yet totally irrelivent comments I get the impression that this was a copy and paste hack job.

;Again if your target audience is really other autoit developers you must code well.. this is not acceptable unless you don't mind

;looking like some aol l33t dude. ;)

;v6 change notes

;Added function CopyToClip which copys the selected item to the clipboard only if there's something to copy in the first palce.

;Before you could just start the program and click copy and it would close, now it'll only work if you actually copy something.

;btnCopy will now run CopyToClip to take advantage of this new funtionality, old code removed. Added context menu which uses

;the new function CopyToClip also.

;v6.1

;Redesigned CopyToClip. Removed the Exit at the end of the code. It did not need to be there.

ChangeLogV1ToV6.1.rtf

Tree_Paste_1.0R6.1.au3

Edited by ligenza
Link to comment
Share on other sites

  • Developers

all the returns have been lost in the formatting. I tried that when you posted the fix.

Ahhh, I didn't try the wordpad trick first. THANKS!!!!!

Usually I use Crimson Editor. Is there a better editer out there? :P

Crimson is a very nice editor .... I obviously like SciTE4AutoIt3 better, but it could be I am prejudiced ;)

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

Been Real busy, We had a server go down. I did get a look at it this morning. It looked real good. WHay did you ditch the INI thing I put in?

just curious...

The only "INI thing" you had in there were some useless comments.

From my change log:

;You have this comment..

; to use with INI file in your script.

; Make sure you have path correct to

; ini file. I found it best to have

; ini files in a sub folder as shown

; in the example.

;about five times in your example and it means nothing.

Is that what you're refering to? Any programmer worth her salt knows how to use an ini file. Tons of useless huge comments that don't add anything to the meaning of the program shouldn't be in the code. If you want to use an ini then that's great but don't put comments in for stuff not related to your program!

Maybe you're refering to something totally different, if so just point me in the right direction. A quick look at the changelog yields only the refrence to that comment.

Just a quick note, I don't mean to have a "tone". English isn't my first language and I'm not that great at it yet so don't take what I'm saying too badly. ;)

Edited by ligenza
Link to comment
Share on other sites

Whats the difference between sciTe4Autoit3 and crimson?

Not much, here's the Crimson Editor features list as posted on their website

CODE

Features of Crimson Editor

Edit multiple documents

- switch between documents using file selection tab.

- Ctrl+Tab brings the last accessed document to topmost.

- support window splitter to see different parts of a document.

Syntax highlighting

- configurable via custom syntax files.

- preconfigured for more than 100 computer languages.

Multi-level undo / redo

- all editing actions are recorded from the opening of a file.

- any document always can be undone to it's initial contents.

- unlimited undo and redo buffers.

Project management

- manage group of related files into one project.

- remote files also can be included in a project.

Directory tree view window

- click to open documents.

- filter to display only selected file class.

Find & Replace

- replace specified text one by one, or as a whole.

- support regular expression.

Column mode editing

- copy and paste rectangular selections.

- switch between column mode and line mode. (Alt+C)

Natural word wrapping

- word wrapping does not affect syntax highlighting.

- configurable wrapping indentation. (easer to understand the syntax)

Spell checker

- around 100000 words were added in the dictionary.

- users can register new words in their own dictionary. (InstallDir/user.dic)

User tools and macros

- execute external programs with proper arguments.

- compile, execute and test your code.

- ease your fingers with key stroke recording. (record & replay)

Edit remote files directly using built-in FTP client

- open, edit, and save documents in remote FTP servers.

- save account information (encoded) for automatic logon.

Print & Print preview

- configurable page header and footer.

- print with line numbers.

- print with syntax highlighting. (used in color printer)

- true type font selection for printer.

Other useful features

support Unicode & UTF-8 encoding, drag & drop text editing,

single instance / multiple instances, ability to detect changed files,

bookmark & go to, highlight active line, highlight matching pairs,

multi-byte support with integrated IME (for eastern languages),

auto indent, wheel mouse support, copy & paste, line numbers,

configurable line spacing, option to save files in Unix format,

I belive it just comes down to a matter of prefrence. ;)

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...