Jump to content

little help plz


Albatroz
 Share

Recommended Posts

  • Moderators

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
WEnd

Got it? :)

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png 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 columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

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

  • Moderators

Albatr4oz,

This works for me with both single and multiple selections: ;)

While 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

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png 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 columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

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

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

  • Moderators

Albatroz,

sorry for noob questions

Do not worry - we all began there! :)

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png 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 columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

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

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 by willichan
Link to comment
Share on other sites

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

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