Jump to content

kalayaan

Active Members
  • Posts

    68
  • Joined

  • Last visited

Profile Information

  • Location
    Calif

kalayaan's Achievements

Wayfarer

Wayfarer (2/7)

0

Reputation

  1. @gafrost, by god, you're right. I'm laughing at myself as I type. too embarassing. :"> . I should've guessed the items would be renumbered after each deletion. Glad I don't do this for a living. Thanks again and until my next booboo.
  2. Hi folks, My GUI has a listbox containing filepaths. and a button that does what is equivalent to a DELETE ALL function (which will delete the files and remove the items in the listbox as they are deleted). It's wierd but my FOR...NEXT loop would not delete everything. I found that at some point, $LB_GETTEXT will return some garbage in the text. Would really appreciate it if someone could take a look. THanks in advance... Here's my code... #include <GuiConstants.au3> $LBS_MULTISELECT = 80000 $LB_DELETESTRING = 0x182 $LB_GETCOUNT = 0x18B $LB_GETTEXT = 0x0189 $FileList = "c:\file01.txt|c:\file02.txt|c:\file03.txt|c:\file04.txt|c:\file05.txt|c:\file06.txt|c:\file07.txt|c:\file08.txt|c:\file09.txt" GuiCreate("LB Test", 299, 291,-1, -1) $List_1 = GuiCtrlCreateList("", 10, 10, 280, 227);,$LBS_MULTISELECT) GuiCtrlSetData(-1,$FileList) $Button_2 = GuiCtrlCreateButton("Delete ALL", 10, 250, 80, 30) GuiSetState() While 1 $msg = GuiGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case $msg = $Button_2 $items_count = _GUICtrlListCount($List_1); count the number of items in listbox For $i = 0 to $items_count - 1 $FileToDelete = _GUICtrlListGetText($List_1, $i) MsgBox(262144,'Debug line ~31','Selection:' & @lf & '$FileToDelete ' & @lf & @lf & 'Return:' & @lf & $FileToDelete & @lf & @lf & '@Error:' & @lf & @Error & @lf & @lf & '@Extended:' & @lf & @Extended);### Debug MSGBOX ; FileDelete($FileToDelete) _GUICtrlListDeleteItem($List_1, $i) Next EndSelect WEnd Func _GUICtrlListCount($h_listbox) Return GUICtrlSendMsg($h_listbox, $LB_GETCOUNT, 0, 0) EndFunc ;==>_GUICtrlListCount Func _GUICtrlListDeleteItem($h_listbox, $i_index) Return GUICtrlSendMsg($h_listbox, $LB_DELETESTRING, $i_index, 0) EndFunc ;==>_GUICtrlListDeleteItem Func _GUICtrlListGetText($h_listbox, $i_index) Return GUICtrlRecvMsg($h_listbox, $LB_GETTEXT, $i_index, 1) EndFunc ;==>_GUICtrlListGetText
  3. john, thanks for the link. at the risk of being a burden , could you show me an example how to use DLLCall with something like unrar.dll (from http://www.rarlab.com/rar/UnRARDLL.exe)? thanks
  4. hi folks, i'm trying to read the contents of a folder and its subdirs. some of the files in this folder are zip and rar files. how would you go about having these archives treated as subdirectories (like windows explorer does) and their contents listed along with the uncompressed contents of the folder? many thanks. lee EDIT: btw, i'm using run(@comspec /c dir...) and writing the result to file.
  5. is there a way to read the properties of an EXE file? Currently, AutoIt only reads the file version through FileGetVersion. I was hoping to get the data from the Comments and Description fields. Thanks.
  6. Form Designer looks nice and clean. very promising indeed. good job, lookfar. Was surprised to see some controls available though they are not at present supported by AutoIt like statusbar. is there a way to use activex to make them useable?
  7. hello and here goes: 1. could anyone show how a listview control read the contents of an item in the treeview like in the folderview of windows explorer, clicking on a folder in the tree displays the contents in the listview? 2. is there any style setting that will link the size of the treeview pane with the listview pane? (again like in explorer, resiizing one affects the other) thanks very much!
  8. Am in the same boat as Red. But, hey Red, wouldn't it be nice if the 103 was released with the listview control included to complete the GUI functionality? Just my thought.
  9. bummer. i was trying to list the contents of a folder and the treeviewitems are created automatically. oh well. probable workaround may be to store the text in an array at creation and crossreference afterwards. thanks anyway...
  10. Hi, I know it's been asked by redndahead (http://www.autoitscript.com/forum/index.php?showtopic=5053&hl=) but I don't think an answer has been found. So how does one read what is selected in a treeview? GuiRead picks up the control ID but not the text. Thanks.
  11. hi all, is there a way to tag particular windows so that even if they change titles, autoit can still identify them and work with them? an example would be internet web browser windows that change title when a new page is loaded. thanks for any help.
  12. jeez, i had the oct 26(?) version and i had no idea the world has turned. got to go to the download page now... thanks!
  13. slim, i've encountered this problem myself. glad you have a solution, but do you have the value for $TCM_DELETEITEM ? (I can't seem to connect to MSDN to search) Thanks
  14. Thanks for the fast reply, slim.
×
×
  • Create New...