Moderators Melba23 Posted February 18, 2011 Moderators Share Posted February 18, 2011 Albatroz,Do not put $fArray = True in the function call - just the value True! You use it like this:#include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <GuiListView.au3> $hGUI = GUICreate("Test", 620, 500) Global $listview = _GUICtrlListView_Create($hGUI, "", 10, 35, 600, 400, BitOR($LVS_SHOWSELALWAYS, $LVS_REPORT, $WS_BORDER)) _GUICtrlListView_SetExtendedListViewStyle($listview, $LVS_EX_FULLROWSELECT) _GUICtrlListView_AddColumn($listview, "Game ID", 70, 2) _GUICtrlListView_AddColumn($listview, "Game Title", 300, 0) _GUICtrlListView_AddColumn($listview, "Game Region", 100, 2) _GUICtrlListView_AddColumn($listview, "Game Size", 100, 1) $hButton = GUICtrlCreateButton("Selected", 10, 460, 80, 30) GUISetState() For $i = 0 To 15 Global $game = _GUICtrlListView_AddItem($listview, "Item " & $i, 1) _GUICtrlListView_AddSubItem($listview, $game, "SubItem 1" & $i, 1) _GUICtrlListView_AddSubItem($listview, $game, "SubItem 2" & $i, 2) _GUICtrlListView_AddSubItem($listview, $game, "SubItem 3" & $i, 3) Next While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit Case $hButton $gameid = _GUICtrlListView_GetSelectedIndices($listview, True) ; <<<<<<<<<<<<<<<<<<<<<<< _ArrayDisplay($gameid) EndSwitch WEndGot it? M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
Albatroz Posted February 19, 2011 Author Share Posted February 19, 2011 He is referring to the optional second ($fArray) parameter of the _GUICtrlListView_GetSelectedIndices() function. Global $gameid = _GUICtrlListView_GetSelectedIndices($listview, TRUE) Take a look at the help file for _GUICtrlListView_GetSelectedIndices. It has an explanation for it i tried,,, but it isnt working,,, i can do multi selection but i cant execute functions to any selection,,, just if i do a single selection Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted February 19, 2011 Moderators Share Posted February 19, 2011 Albatr4oz, This works for me with both single and multiple selections: expandcollapse popupWhile 1 $msg = GUIGetMsg() ;~ Global $gameid = _GUICtrlListView_GetSelectedIndices($listview) ;;;original Global $gameid = _GUICtrlListView_GetSelectedIndices($listview, True) ; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< Global $jogoID = IniRead($IniIM, $gameid, "id", "Not Found") $witPath = IniRead($IniIM, $gameid, "filename", "Not Found") Global $jogoFN = $witPath If $msg = $DestFolder Then ;Folder() _ArrayDisplay($gameid) ElseIf $msg = $conv1 Then Global $ext = ".001" convert() ElseIf $msg = $conv2 Then Global $ext = ".002" convert() ElseIf $msg = $conv3 Then Global $ext = ".003" convert() ElseIf $msg = $conv4 Then Global $ext = ".004" convert() EndIf If $msg = $GUI_EVENT_CLOSE Then GUIDelete() ExitLoop EndIf WEnd EndFunc ;==>Convertion ; This is just to show you it working Func convert() ; Now loop through the selections in the array we got above For $i = 1 To $gameid[0] ; Just run your converting code here for each of the selections in turn MsgBox(0, "Convert", "Converting selection " & $gameid[$i]) Next EndFunc You do the same thing with your deleting code - just loop through the array. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
Albatroz Posted February 19, 2011 Author Share Posted February 19, 2011 ok,,, i got it and my function is working but, im not getting it to work with my command Function Func Convert() $file1 = "'" & $jogoFN & "'" If $tmpdir = "" Then $message = "Select TEMP Folder to converted Game Images" Global $tmpdir = FileSelectFolder($message, "") if @error <> 1 then For $i = 1 To $gameid[0] $file2 = $tmpdir & "\" & $jogoID & $ext MsgBox(0, "Convert", "Converting selection " & $gameid[$i]) ;RunWait("converter.exe " & $opt & $file1 & " " & $file2, $tmpdir) Next Else EndIf Else For $i = 1 To $gameid[0] $file2 = $tmpdir & "\" & $jogoID & $ext MsgBox(0, "Convert", "Converting selection " & $gameid[$i]) ;RunWait("converter.exe " & $opt & $file1 & " " & $file2, $tmpdir) Next EndIf EndFunc maybe this will last question thx for patient and for all your helping Link to comment Share on other sites More sharing options...
Albatroz Posted February 19, 2011 Author Share Posted February 19, 2011 ok,,, i got it and my function is working but, im not getting it to work with my command Function Func Convert() $file1 = "'" & $jogoFN & "'" If $tmpdir = "" Then $message = "Select TEMP Folder to converted Game Images" Global $tmpdir = FileSelectFolder($message, "") if @error <> 1 then For $i = 1 To $gameid[0] $file2 = $tmpdir & "\" & $jogoID & $ext MsgBox(0, "Convert", "Converting selection " & $gameid[$i]) ;RunWait("converter.exe " & $opt & $file1 & " " & $file2, $tmpdir) Next Else EndIf Else For $i = 1 To $gameid[0] $file2 = $tmpdir & "\" & $jogoID & $ext MsgBox(0, "Convert", "Converting selection " & $gameid[$i]) ;RunWait("converter.exe " & $opt & $file1 & " " & $file2, $tmpdir) Next EndIf EndFunc maybe this will last question thx for patient and for all your helping Finally it worked!!! Func Convert() $file1 = "'" & $jogoFN & "'" If $tmpdir = "" Then $message = "Select TEMP Folder to converted Game Images" Global $tmpdir = FileSelectFolder($message, "") if @error <> 1 then For $i = 1 To $gameid[0] $jogoID = IniRead($iniIM, $gameid[$i], "id", "") $jogoFN = IniRead($iniIM, $gameid[$i], "filename", "") $file1 = "'" & $jogoFN & "'" $file2 = $tmpdir & "\" & $jogoID & $ext RunWait("converter.exe " & $opt & $file1 & " " & $file2, $tmpdir) Next Else EndIf Else For $i = 1 To $gameid[0] $jogoID = IniRead($iniIM, $gameid[$i], "id", "") $jogoFN = IniRead($iniIM, $gameid[$i], "filename", "") $file1 = "'" & $jogoFN & "'" $file2 = $tmpdir & "\" & $jogoID & $ext RunWait("converter.exe " & $opt & $file1 & " " & $file2, $tmpdir) Next EndIf EndFunc thx a lot for your time melba,, and sorry for noob questions Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted February 19, 2011 Moderators Share Posted February 19, 2011 Albatroz,sorry for noob questionsDo not worry - we all began there! M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
Albatroz Posted February 22, 2011 Author Share Posted February 22, 2011 that project is done,,, now i wanna create a new project to my mommy office. Im thinking about a client manager and requests manager too. What the best option to create them? cause i only know iniread/iniwrite... but probably a better option to work with database. any example would be great too thx Link to comment Share on other sites More sharing options...
Albatroz Posted February 23, 2011 Author Share Posted February 23, 2011 nothing??? Link to comment Share on other sites More sharing options...
willichan Posted February 23, 2011 Share Posted February 23, 2011 (edited) that project is done,,,now i wanna create a new project to my mommy office.nothing???You will probably get more response if you open new questions in a new thread with a subject that describes what help you are needing. Avoid generic subjects like Please Help.When you just continue on with the same thread, most people will think you are already being helped with your issue, and move on.You will pretty much just be seen by the same members that were already helping you, and they may be too busy, or not be the right resource to help you for the new issue.Start a new thread. Explain clearly what you are trying to do, and what you have already done on your own. You will see a larger community of help that way. Edited February 23, 2011 by willichan My UDFs: Barcode Libraries, Automate creation of any type of project folder, File Locking with Cooperative Semaphores, Inline binary files, Continue script after reboot, WinWaitMulti, Name Aggregator, Enigma, CornedBeef Hash Link to comment Share on other sites More sharing options...
Albatroz Posted February 23, 2011 Author Share Posted February 23, 2011 You will probably get more response if you open new questions in a new thread with a subject that describes what help you are needing. Avoid generic subjects like Please Help.When you just continue on with the same thread, most people will think you are already being helped with your issue, and move on.You will pretty much just be seen by the same members that were already helping you, and they may be too busy, or not be the right resource to help you for the new issue.Start a new thread. Explain clearly what you are trying to do, and what you have already done on your own. You will see a larger community of help that way.thx a lot,,, i will create a new one then Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now