Jump to content
Sign in to follow this  
incepator

search file

Recommended Posts

incepator

how make to display in that ListView whole word according to the first 2 of 3 characters written ?

#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <ListViewConstants.au3>
#include <WindowsConstants.au3>
#include <File.au3>
#include <Array.au3>

$Form1 = GUICreate("Form1", 572, 375, 192, 124)
$ListView1 = GUICtrlCreateListView("NR.|FILE", 8, 8, 554, 326)
GUICtrlSendMsg(-1, $LVM_SETCOLUMNWIDTH, 0, 50)
GUICtrlSendMsg(-1, $LVM_SETCOLUMNWIDTH, 1, 300)
$Button1 = GUICtrlCreateButton("Search", 24, 344, 75, 25)
$Input1 = GUICtrlCreateInput("Search closest name...", 128, 344, 121, 21)

GUISetState(@SW_SHOW)

Global $FileList = _FileListToArray(@ScriptDir)
If IsArray($FileList) Then
    For $i = 1 To $FileList[0]
    $ListView1_1 = GUICtrlCreateListViewItem($i&"|"&$FileList[$i], $ListView1)
    Next
Else
    Exit
EndIf

While True
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $GUI_EVENT_CLOSE
        Exit
    Case $Button1

    EndSwitch
WEnd
Edited by incepator

Share this post


Link to post
Share on other sites
Melba23

incepator,

That was fun on a grey afternoon: :D

#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <GuiListView.au3>
#include <GuiEdit.au3>
#include <File.au3>

$Form1 = GUICreate("Form1", 572, 375, 192, 124)
$ListView1 = GUICtrlCreateListView("NR.|FILE", 8, 8, 554, 326)
GUICtrlSetBkColor(-1, 0xC4C4C4)
GUICtrlSendMsg(-1, $LVM_SETCOLUMNWIDTH, 0, 50)
GUICtrlSendMsg(-1, $LVM_SETCOLUMNWIDTH, 1, 300)
$Input1 = GUICtrlCreateInput("", 128, 344, 121, 21)
GUICtrlSendMsg(-1, $EM_SETCUEBANNER, True, "Search closest name...") ; Use a cue banner - much better then using text
GUICtrlSetState($Input1, $GUI_FOCUS)
GUISetState(@SW_SHOW)

Global $FileList = _FileListToArray(@ScriptDir)

If IsArray($FileList) Then
    For $i = 1 To $FileList[0]
        $ListView1_1 = GUICtrlCreateListViewItem($i & "|" & $FileList[$i], $ListView1)
    Next
Else
    Exit
EndIf

; Register a Command handler
GUIRegisterMsg($WM_COMMAND, "_WM_COMMAND")

While 1

    Switch GUIGetMsg()
        Case $GUI_EVENT_CLOSE
            Exit
    EndSwitch
WEnd

; Her is the handler
Func _WM_COMMAND($hWnd, $MsgID, $wParam, $lParam)

    Local $nID = BitAND($wParam, 0xFFFF)
    Local $nNotifyCode = BitShift($wParam, 16)

    ; Has the input changed
    If $nNotifyCode = $EN_CHANGE Then
        If $nID = $Input1 Then
            ; Read it and look for the first match in the array
            $sText = GUICtrlRead($Input1)
            $iIndex = _ArraySearch($FileList, $sText, 1, 0, 0, 1) - 1 ; Convert to 0-based
            ; Click the matched item
            _GUICtrlListView_ClickItem($ListView1, $iIndex)
            ; And reset the focus to the input
            Sleep(10)
            GUICtrlSetState($Input1, $GUI_FOCUS)
            ; Move the caret to the end
            ControlSend($Form1, "", $Input1, "{END}")
        EndIf
    EndIf

    Return $GUI_RUNDEFMSG
EndFunc

All clear? Please ask if not :)

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

 

Share this post


Link to post
Share on other sites
incepator

Melba23,

OK, I analyze this function and i try to understand.

Thank you!

EDIT

to make your day more beautiful ... if you can help ....

think you can make this script similar to the above?

Thank you!

#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <GUIListBox.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <ButtonConstants.au3>
#include <TabConstants.au3>
#include <GDIPlus.au3>
#Include <Memory.au3>
#include <File.au3>
#include <Array.au3>
#include "GUICtrlPic.au3"
#include "onEventFunc.au3"
#include <GuiTab.au3>
#include <GuiListView.au3>
#NoTrayIcon
Opt("GUIOnEventMode", 1)
$Form1 = GUICreate("", 1007, 615, -1, -1, -1)
GUISetBkColor(0x99B4D1)
$Input1 = GUICtrlCreateInput("Search...", 3, 0, 1002, 24, BitOR($GUI_SS_DEFAULT_INPUT,$ES_CENTER))
GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif")
$Tab1 = GUICtrlCreateTab(3, 23, 1001, 590)
$all_dir = _FileListToArray(@ScriptDir, "*", 2)
If IsArray($all_dir) Then
For $i = 1 To $all_dir[0]
     Global $TabSheet1 = GUICtrlCreateTabItem($all_dir[$i])
     $all_dir2 = _FileListToArray(@ScriptDir&""&$all_dir[$i], "*", 2)
     If IsArray($all_dir2) Then
     Local $iRow = 1, $iColumn = 1
     For $ii = 1 To $all_dir2[0]
     GUICtrlCreateLabel($all_dir2[$ii], $iColumn*200-185, $iRow*140-90-17+20, 175, 17, BitOR($SS_CENTER,$WS_BORDER), $GUI_WS_EX_PARENTDRAG)
     GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")
     Local $aPic[UBound($all_dir2)]
     $aPic[$ii] = _GUICtrlPic_Create(@ScriptDir&""&$all_dir[$i]&""&$all_dir2[$ii]&""&"template_thumbnail.png" , $iColumn*200-185, $iRow*140-90+20, 176, 113, BitOR($SS_CENTERIMAGE, $SS_SUNKEN, $SS_NOTIFY, $WS_BORDER))
     SetOnEventA($aPic[$ii], "_picevent", $paramByVal, $all_dir2[$ii])
     GUICtrlSetTip(-1, $all_dir2[$ii])
     GUICtrlSetCursor (-1, 0)
     $iColumn += 1
     If Not Mod($ii, 5) Then
     $iRow += 1
     $iColumn = 1
     EndIf
     Next
     EndIf
Next
EndIf
GUISetState(@SW_SHOW)
GUISetOnEvent($GUI_EVENT_CLOSE, "_Exit")

While True
Sleep(10)
WEnd
Func _Exit()
GUIDelete($Form1)
Exit
EndFunc
Func _picevent($iPicture)
Local $save = FileSaveDialog("Save as...", @DesktopDir, "Template Save (*.*)", 2, $iPicture, $Form1)
If Not @error Then
$dir_dir = _GUICtrlTab_GetItemText($Tab1, GUICtrlRead($Tab1))
$dir_sub = $iPicture
DirCopy(@ScriptDir&""&$dir_dir&""&$dir_sub ,$save,1)
EndIf
EndFunc
Edited by incepator

Share this post


Link to post
Share on other sites
Melba23

incepator,

Where did you find _GUICtrlPic_Create? Can you post the function please. :)

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

 

Share this post


Link to post
Share on other sites
Melba23

incepator,

I have the code to determine which image most closely matches the search criteria - but what do want to happen to it? You cannot select it as we did in the listview. ;)

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

 

Share this post


Link to post
Share on other sites
incepator

I just want to display the image that matches the search criteria and nothing else.

post-75717-0-43335300-1350916240_thumb.j

post-75717-0-48023000-1350916257_thumb.j

Share this post


Link to post
Share on other sites
Melba23

incepator,

That was harder than I thought it would be! :sweating:

I have rewritten the code so that the tabs are only populated when you select them. It works nicely with my single bmp file (I did not use the additional includes) - you will have to amend the _DrawPics function to match your images. I hope it works for you too: ;)

#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <GUIListBox.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <ButtonConstants.au3>
#include <TabConstants.au3>
#include <GDIPlus.au3>
#include <Memory.au3>
#include <File.au3>
#include <Array.au3>
;#include "GUICtrlPic.au3"
;#include "onEventFunc.au3"
#include <GuiTab.au3>
#include <GuiListView.au3>

Opt("GUIOnEventMode", 1)

; Create an array to hold the ControlIDs of the pictures drawn
Global $aPic_Controls[2]

$hGUI = GUICreate("", 1007, 615, -1, -1, -1)
GUISetOnEvent($GUI_EVENT_CLOSE, "_Exit")
GUISetBkColor(0x99B4D1)

$cInput = GUICtrlCreateInput("", 3, 0, 1002, 24, BitOR($GUI_SS_DEFAULT_INPUT, $ES_CENTER))
GUICtrlSendMsg(-1, $EM_SETCUEBANNER, True, "Search...")
GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif")

$cTab = GUICtrlCreateTab(3, 23, 1001, 590)
GUICtrlSetOnEvent(-1, "_Draw_Tab")

$aFolder_List = _FileListToArray(@ScriptDir, "*", 2)
If IsArray($aFolder_List) Then
    ; Create an array to hold the tabsheet ControlIDs
    Global $aTab_CIDs[$aFolder_List[0] + 1]
    For $i = 1 To $aFolder_List[0]
        $aTab_CIDs[$i] = GUICtrlCreateTabItem($aFolder_List[$i])
    Next
EndIf
GUICtrlCreateTabItem("")

GUISetState(@SW_SHOW)

; Register a Command handler
GUIRegisterMsg($WM_COMMAND, "_WM_COMMAND")

While True
    Sleep(10)
WEnd

Func _Draw_Tab()
    ; Set the input blank to force a redraw of the page
    GUICtrlSetData($cInput, "")
EndFunc   ;==>_Draw_Tab

; Here is the handler
Func _WM_COMMAND($hWnd, $MsgID, $wParam, $lParam)

    Local $nID = BitAND($wParam, 0xFFFF)
    Local $nNotifyCode = BitShift($wParam, 16)

    ; Has the input changed
    If $nNotifyCode = $EN_CHANGE Then
        If $nID = $cInput Then
            ; Determine which tab is visible
            $iTab = GUICtrlRead($cTab)
            ; And so the folder displayed
            $sPath = $aFolder_List[$iTab + 1]
            ; Get an array of the subfolders
            Local $aSubFolder_List = _FileListToArray(@ScriptDir & "" & $sPath, "*", 2)
            If Not IsArray($aSubFolder_List) Then Return
            ; Read input content
            $sText = GUICtrlRead($cInput)
            ; Delete all current pic controls
            For $i = $aPic_Controls[0] To $aPic_Controls[1]
                GUICtrlDelete($i)
            Next
            ; Is there anything in the input?
            If StringLen($sText) <> 0 Then
                ; Look for the match
                $iIndex = _ArraySearch($aSubFolder_List, $sText, 1, 0, 0, 1)
                If $iIndex <> -1 Then
                    ; Draw just the match
                    Local $aMatchFolder_List[2] = [1, $aSubFolder_List[$iIndex]]
                    ; Redraw pics
                    _DrawPics($aMatchFolder_List, $aTab_CIDs[$iTab + 1])
                EndIf
            Else
                ; Redraw pics
                _DrawPics($aSubFolder_List, $aTab_CIDs[$iTab + 1])
            EndIf
            ; And reset the focus to the input
            Sleep(10)
            GUICtrlSetState($cInput, $GUI_FOCUS)
            ; Move the caret to the end
            ControlSend($hGUI, "", $cInput, "{END}")
        EndIf
    EndIf

    Return $GUI_RUNDEFMSG
EndFunc   ;==>_WM_COMMAND

Func _Exit()
    GUIDelete($hGUI)
    Exit

EndFunc   ;==>_Exit

Func _DrawPics($aList, $iTab)
    ; Switch to the correct tab
    GUISwitch($hGUI, $iTab)
    ; First control created
    $aPic_Controls[0] = GUICtrlCreateDummy()

    Local $iRow = 1, $iColumn = 1
    For $ii = 1 To $aList[0]
        GUICtrlCreateLabel($aList[$ii], $iColumn * 200 - 185, $iRow * 140 - 90 - 17 + 20, 175, 17, BitOR($SS_CENTER, $WS_BORDER), $GUI_WS_EX_PARENTDRAG)
        GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")
        Local $aPic[UBound($aList)]
        ;$aPic[$ii] = _GUICtrlPic_Create(@ScriptDir & "" & $aFolder_List[$i] & "" & $aSubFolder_List[$ii] & "" & "template_thumbnail.png", $iColumn * 200 - 185, $iRow * 140 - 90 + 20, 176, 113, BitOR($SS_CENTERIMAGE, $SS_SUNKEN, $SS_NOTIFY, $WS_BORDER))
        $aPic[$ii] = GUICtrlCreatePic("Image.bmp", $iColumn * 200 - 185, $iRow * 140 - 90 + 20, 176, 113, BitOR($SS_CENTERIMAGE, $SS_SUNKEN, $SS_NOTIFY, $WS_BORDER))
        ;SetOnEventA($aPic[$ii], "_picevent", $paramByVal, $aSubFolder_List[$ii])
        ;GUICtrlSetTip(-1, $aSubFolder_List[$ii])
        GUICtrlSetCursor(-1, 0)
        $iColumn += 1
        If Not Mod($ii, 5) Then
            $iRow += 1
            $iColumn = 1
        EndIf
    Next
    ; Final control created
    $aPic_Controls[1] = GUICtrlCreateDummy()
    ; End tab switch
    GUICtrlCreateTabItem("")
    GUISwitch($hGUI)
EndFunc   ;==>_DrawPics

Func _picevent($iPicture)
    Local $save = FileSaveDialog("Save as...", @DesktopDir, "Template Save (*.*)", 2, $iPicture, $hGUI)
    If Not @error Then
        $dir_dir = _GUICtrlTab_GetItemText($cTab, GUICtrlRead($cTab))
        $dir_sub = $iPicture
        DirCopy(@ScriptDir & "" & $dir_dir & "" & $dir_sub, $save, 1)
    EndIf
EndFunc   ;==>_picevent

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

 

Share this post


Link to post
Share on other sites
Melba23

incepator,

A better version that shows all folders that match the input: :)

#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <GUIListBox.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <ButtonConstants.au3>
#include <TabConstants.au3>
#include <GDIPlus.au3>
#include <Memory.au3>
#include <File.au3>
#include <Array.au3>
;#include "GUICtrlPic.au3"
;#include "onEventFunc.au3"
#include <GuiTab.au3>
#include <GuiListView.au3>

Opt("GUIOnEventMode", 1)

; Create an array to hold the ControlIDs of the pictures drawn
Global $aPic_Controls[2]

$hGUI = GUICreate("", 1007, 615, -1, -1, -1)
GUISetOnEvent($GUI_EVENT_CLOSE, "_Exit")
GUISetBkColor(0x99B4D1)

$cInput = GUICtrlCreateInput("", 3, 0, 1002, 24, BitOR($GUI_SS_DEFAULT_INPUT, $ES_CENTER))
GUICtrlSendMsg(-1, $EM_SETCUEBANNER, True, "Search...")
GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif")

$cTab = GUICtrlCreateTab(3, 23, 1001, 590)
GUICtrlSetOnEvent(-1, "_Draw_Tab")

$aFolder_List = _FileListToArray(@ScriptDir, "*", 2)
If IsArray($aFolder_List) Then
    ; Create an array to hold the tabsheet ControlIDs
    Global $aTab_CIDs[$aFolder_List[0] + 1]
    For $i = 1 To $aFolder_List[0]
        $aTab_CIDs[$i] = GUICtrlCreateTabItem($aFolder_List[$i])
    Next
EndIf
GUICtrlCreateTabItem("")

GUISetState(@SW_SHOW)

; Register a Command handler
GUIRegisterMsg($WM_COMMAND, "_WM_COMMAND")

While True
    Sleep(10)
WEnd

Func _Draw_Tab()
    ; Set the input blank to force a redraw of the page
    GUICtrlSetData($cInput, "")
EndFunc   ;==>_Draw_Tab

; Here is the handler
Func _WM_COMMAND($hWnd, $MsgID, $wParam, $lParam)

    Local $nID = BitAND($wParam, 0xFFFF)
    Local $nNotifyCode = BitShift($wParam, 16)

    ; Has the input changed
    If $nNotifyCode = $EN_CHANGE Then
        If $nID = $cInput Then
            ; Determine which tab is visible
            $iTab = GUICtrlRead($cTab)
            ; And so the folder displayed
            $sPath = $aFolder_List[$iTab + 1]
            ; Get an array of the subfolders
            Local $aSubFolder_List = _FileListToArray(@ScriptDir & "" & $sPath, "*", 2)
            If Not IsArray($aSubFolder_List) Then Return
            ; Read input content
            $sText = GUICtrlRead($cInput)
            ; Delete all current pic controls
            For $i = $aPic_Controls[0] To $aPic_Controls[1]
                GUICtrlDelete($i)
            Next
            ; Is there anything in the input?
            If StringLen($sText) <> 0 Then
                Local $aMatchFolder_List[1] = [0]
                $iStart = 1
                For $i = 1 To $aSubFolder_List[0]
                    ; Look for the match
                    If StringInStr($aSubFolder_List[$i], $sText) Then
                        ; Add to list
                        $aMatchFolder_List[0] += 1
                        ReDim $aMatchFolder_List[$aMatchFolder_List[0] + 1]
                        $aMatchFolder_List[$aMatchFolder_List[0]] = $aSubFolder_List[$i]
                    EndIf
                Next
                ; Redraw pics if needed
                If $aMatchFolder_List[0] Then
                    _DrawPics($aMatchFolder_List, $aTab_CIDs[$iTab + 1])
                EndIf
            Else
                ; Redraw pics
                _DrawPics($aSubFolder_List, $aTab_CIDs[$iTab + 1])
            EndIf
            ; And reset the focus to the input
            Sleep(10)
            GUICtrlSetState($cInput, $GUI_FOCUS)
            ; Move the caret to the end
            ControlSend($hGUI, "", $cInput, "{END}")
        EndIf
    EndIf

    Return $GUI_RUNDEFMSG
EndFunc   ;==>_WM_COMMAND

Func _Exit()
    GUIDelete($hGUI)
    Exit

EndFunc   ;==>_Exit

Func _DrawPics($aList, $iTab)
    ; Switch to the correct tab
    GUISwitch($hGUI, $iTab)
    ; First control created
    $aPic_Controls[0] = GUICtrlCreateDummy()

    Local $iRow = 1, $iColumn = 1
    For $ii = 1 To $aList[0]
        GUICtrlCreateLabel($aList[$ii], $iColumn * 200 - 185, $iRow * 140 - 90 - 17 + 20, 175, 17, BitOR($SS_CENTER, $WS_BORDER), $GUI_WS_EX_PARENTDRAG)
        GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")
        Local $aPic[UBound($aList)]
        ;$aPic[$ii] = _GUICtrlPic_Create(@ScriptDir & "" & $aFolder_List[$i] & "" & $aSubFolder_List[$ii] & "" & "template_thumbnail.png", $iColumn * 200 - 185, $iRow * 140 - 90 + 20, 176, 113, BitOR($SS_CENTERIMAGE, $SS_SUNKEN, $SS_NOTIFY, $WS_BORDER))
        $aPic[$ii] = GUICtrlCreatePic("M:ProgramAu3 ScriptsImagesVistaX.bmp", $iColumn * 200 - 185, $iRow * 140 - 90 + 20, 176, 113, BitOR($SS_CENTERIMAGE, $SS_SUNKEN, $SS_NOTIFY, $WS_BORDER))
        ;SetOnEventA($aPic[$ii], "_picevent", $paramByVal, $aSubFolder_List[$ii])
        ;GUICtrlSetTip(-1, $aSubFolder_List[$ii])
        GUICtrlSetCursor(-1, 0)
        $iColumn += 1
        If Not Mod($ii, 5) Then
            $iRow += 1
            $iColumn = 1
        EndIf
    Next
    ; Final control created
    $aPic_Controls[1] = GUICtrlCreateDummy()
    ; End tab switch
    GUICtrlCreateTabItem("")
    GUISwitch($hGUI)
EndFunc   ;==>_DrawPics

Func _picevent($iPicture)
    Local $save = FileSaveDialog("Save as...", @DesktopDir, "Template Save (*.*)", 2, $iPicture, $hGUI)
    If Not @error Then
        $dir_dir = _GUICtrlTab_GetItemText($cTab, GUICtrlRead($cTab))
        $dir_sub = $iPicture
        DirCopy(@ScriptDir & "" & $dir_dir & "" & $dir_sub, $save, 1)
    EndIf
EndFunc   ;==>_picevent

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

 

Share this post


Link to post
Share on other sites
incepator

is perfect!

Have a great thought!

I'll try to understand this script is very advanced for me but I will try to understand it.

Thanks a lot!

Share this post


Link to post
Share on other sites
Melba23

incepator,

Just ask if you do not understand anything in the code. My aim is to get you to change your username into something more advanced. ;)

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

 

Share this post


Link to post
Share on other sites
incepator

hmm ... you know what means "incepator"?

you know Romanian?

Share this post


Link to post
Share on other sites
Melba23

incepator,

No, but Google Translate does. ;)

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

 

Share this post


Link to post
Share on other sites
incepator
:graduated: Ohhh yes

Share this post


Link to post
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
Sign in to follow this  

×