Jump to content
Sign in to follow this  
AJJ

User to Attach a file to a button in GUI

Recommended Posts

AJJ

my objective to create a sound desk for the kids work we do at work. Basically for dramas to have easy access to sound effects and music.

I would think this needs to be done creating a Gui,

having an "attach" button that attaches the sound effect to the play button

having a play button that plays the attached sound just once and the instant its pressed

then maybe a stop button next to it incase the sound is long and they just want the first bit.

Then a bonus would be to be able to make it so it remembers these files... but thats not important really.

I can make the gui, i can make the button play a sound file but i dont know how to create something that would attached an mp3 or wav to autoit file. i guess kinda like a "browse" button you get in an internet browser. It would just have to be as simple as whatever is in the user typed box would be where the computer looked for the mp3... but with an explorer browse window so they dont have to get the file name perfect by typing it.

thanks for any help!

Share this post


Link to post
Share on other sites
nfaustin

I use this function:

Local $file = FileOpenDialog("Choose file...", "J:\MUSIK", "MP3 (*.mp3)")
Edited by nfaustin

[font="Palatino Linotype"][size="2"]*** The information contained in this post should be considered and certified WORKS ON MY MACHINE ***[/size][/font][font="Palatino Linotype"][size="2"] [/size][/font]

Share this post


Link to post
Share on other sites
Melba23

AJJ,

If all your sound files were in the one folder, you could use an auto-completing combo like this:

#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <GuiComboBox.au3>
#include <Sound.au3>
#include <File.au3>

; Assume all sound files are in one folder N:\Sounds - adjust as necessary
$sFolder = "N:\Sounds\"

$asSounds = _FileListToArray($sFolder, "*", 1)
$sSound_Data = ""
For $i = 1 To $asSounds[0]
    $sSound_Data &= $asSounds[$i] & "|"
Next

; Create GUI
$hGUI = GUICreate("Test", 500, 500)

$hPlay = GUICtrlCreateButton("Play", 10, 10, 80, 30)
$hStop = GUICtrlCreateButton("Stop", 10, 50, 80, 30)
$hAttach = GUICtrlCreateButton("Attach", 10, 100, 80, 30)
$hChoose = GUICtrlCreateCombo("", 10, 150, 200, 20)
GUICtrlSetData(-1, $sSound_Data)

GUISetState()

GUIRegisterMsg($WM_COMMAND, "MY_WM_COMMAND")

While 1

    Switch GUIGetMsg()
        Case $GUI_EVENT_CLOSE
            Exit
        Case $hAttach
            ; Has something been chosen
            If GUICtrlRead($hChoose) <> "" Then $sToPlay = $sFolder & GUICtrlRead($hChoose)
        Case $hPlay
            If $sToPlay <> "" Then _SoundPlay($sToPlay)
        Case $hStop
            If $sToPlay <> "" Then _SoundStop($sToPlay)
    EndSwitch

WEnd

Func MY_WM_COMMAND($hWnd, $Msg, $wParam, $lParam)
    Local $iIDFrom = BitAND($wParam, 0x0000FFFF)
    Local $iCode = BitShift($wParam, 16)

    Switch $iIDFrom
        Case $hChoose
            Switch $iCode
                Case $CBN_EDITCHANGE
                    _GUICtrlComboBox_AutoComplete($hChoose)
            EndSwitch
    EndSwitch

    Return $GUI_RUNDEFMSG
EndFunc   ;==>MY_WM_COMMAND

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______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
AJJ

thats awesome, thanks alot for doing that, it says now that the $sToplay hasnt been declared, is that correct?

Share this post


Link to post
Share on other sites
Melba23

AJJ,

Sorry about that. I did not test for pressing "Play" before "Attach"!

Just add

$sToPlay = ""

after the includes.

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______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
AJJ

thats cool! ive got it all up and running now and made it to my file, you can select the sound you want, but attach doesnt seem to do anything, and it doesnt play when you press play!

also, what would i have to reproduce to create a number of buttons? because i can make the gui and then just sort the buttons out becaues it is simply copying and pasting... maybe?

Share this post


Link to post
Share on other sites
water

When I replace the following lines, select a file, press "attach" and then press play everything works fine

Case $hPlay
  If $sToPlay <> "" Then SoundPlay($sToPlay)
Case $hStop
  If $sToPlay <> "" Then SoundPlay("")

You could even strip down your script to only two buttons - start and stop

#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <GuiComboBox.au3>
#include <Sound.au3>
#include <File.au3>

Global $sToPlay = ""

; Assume all sound files are in one folder N:\Sounds - adjust as necessary
$sFolder = "C:\Xfer\musik\The Cranberries\No Need to Argue\"

$asSounds = _FileListToArray($sFolder, "*", 1)
$sSound_Data = ""
For $i = 1 To $asSounds[0]
    $sSound_Data &= $asSounds[$i] & "|"
Next

; Create GUI
$hGUI = GUICreate("Test", 500, 500)

$hPlay = GUICtrlCreateButton("Play", 10, 10, 80, 30)
$hStop = GUICtrlCreateButton("Stop", 10, 50, 80, 30)
$hChoose = GUICtrlCreateCombo("", 10, 110, 200, 20)
GUICtrlSetData(-1, $sSound_Data)

GUISetState()

GUIRegisterMsg($WM_COMMAND, "MY_WM_COMMAND")

While 1

    Switch GUIGetMsg()
        Case $GUI_EVENT_CLOSE
            Exit
        Case $hPlay
            If GUICtrlRead($hChoose) <> "" Then 
                $sToPlay = $sFolder & GUICtrlRead($hChoose)
                SoundPlay($sToPlay)
            EndIf
        Case $hStop
            If $sToPlay <> "" Then SoundPlay("")
    EndSwitch

WEnd

Func MY_WM_COMMAND($hWnd, $Msg, $wParam, $lParam)
    Local $iIDFrom = BitAND($wParam, 0x0000FFFF)
    Local $iCode = BitShift($wParam, 16)

    Switch $iIDFrom
        Case $hChoose
            Switch $iCode
                Case $CBN_EDITCHANGE
                    _GUICtrlComboBox_AutoComplete($hChoose)
            EndSwitch
    EndSwitch

    Return $GUI_RUNDEFMSG
EndFunc   ;==>MY_WM_COMMAND
Edited by water

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2018-06-01 - Version 1.4.9.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-01-27 - Version 1.3.3.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites
AJJ

i changed it so it only detected MP3s (i guessed this and it worked!")

$asSounds = _FileListToArray($sFolder, "*.mp3", 1)

what would i have to do to get it to look at mp3, wma, wav etc. only?

also, it still doesnt actually play...

Share this post


Link to post
Share on other sites
Melba23

AJJ,

If you want to look for multiple file types, you will have to write your own function - or look on the forums for one - or use this one :( :

#include-once

; #FUNCTION# ====================================================================================================================
; Name...........: _RecFileListToArray
; Description ...: Lists files and\or folders in a specified path with optional recursion.  Compatible with existing _FileListToArray syntax
; Syntax.........: _RecFileListToArray($sPath[, $sInclude_List = "*"[, $iReturn = 0[, $fRecur = 0[, $sExclude_List = ""[, $iFullPath = 0]]]]])
; Parameters ....: $sPath   - Initial path used to generate filelist
;                  $sInclude_List - Optional: the filter for included results (default is "*"). Multiple filters must be separated by ";"
;                  $iReturn   - Optional: specifies whether to return files, folders or both
;                  |$iReturn=0 (Default) Return both files and folders
;                  |$iReturn=1 Return files only
;                  |$iReturn=2 Return folders only
;                  $fRecur  - Optional: specifies whether to search in subfolders
;                  |$fRecur=0 (Default) Do not search in subfolders
;                  |$fRecur=1 Search in subfolders
;                  $sExclude_List - Optional: the filter for excluded results (default is ""). Multiple filters must be separated by ";"
;                  $iFullPath  - Optional: specifies path of result string
;                  |$iFullPath=0 (Default) Initial path not included
;                  |$iFullPath=1 Initial path included
;                  |$iFullPath=2 File/folder name only
; Requirement(s).: v3.3.1.1 or higher
; Return values .: Success:  One-dimensional array made up as follows:
;                  |$array[0] = Number of Files\Folders returned
;                  |$array[1] = 1st File\Folder
;                  |$array[2] = 2nd File\Folder
;                  |...
;                  |$array[n] = nth File\Folder
;                  Failure: Null string and @error = 1 with @extended set as follows:
;                  |1 = Path not found or invalid
;                  |2 = Invalid $sInclude_List
;                  |3 = Invalid $iReturn
;                  |4 = Invalid $fRecur
;                  |5 = Invalid $sExclude_List
;                  |6 = Invalid $iFullPath
;                  |7 = No files/folders found
; Author ........: Melba23 using SRE code from forums
; Remarks .......:
; Related .......:
; Link ..........;
; Example .......; Yes
; ===============================================================================================================================
Func _RecFileListToArray($sInitialPath, $sInclude_List = "*", $iReturn = 0, $fRecur = 0, $sExclude_List = "", $iFullPath = 0)

    Local $asReturnList[1] = [0], $asFolderList[3] = [1], $sInclude_List_Mask, $sExclude_List_Mask
    Local $sCurrentPath, $hSearch, $sReturnPath = "", $sName, $fFolder

    ; Check valid path
    If Not FileExists($sInitialPath) Then Return SetError(1, 1, "")
    ; Ensure trailing \
    If StringRight($sInitialPath, 1) <> "\" Then $sInitialPath = $sInitialPath & "\"
    ; Add path to folder list
    $asFolderList[1] = $sInitialPath

    ; Determine Filter mask for SRE check
    If StringRegExp($sInclude_List, "\\|/|:|\<|\>|\|") Then Return SetError(1, 2, "") ; Check for invalid characters
    $sInclude_List = StringReplace(StringStripWS(StringRegExpReplace($sInclude_List, "\s*;\s*", ";"), 3), ";", "|") ; Strip WS and swap :/|
    $sInclude_List_Mask = "(?i)^" & StringReplace(StringReplace(StringReplace($sInclude_List, ".", "\."), "*", ".*"), "?", ".") & "\z" ; Convert to SRE pattern

    ; Determine Exclude mask for SRE check
    If $sExclude_List = "" Then
        $sExclude_List_Mask = ":" ; Set unmatchable mask
    Else
        If StringRegExp($sExclude_List, "\\|/|:|\<|\>|\|") Then Return SetError(1, 5, "") ; Check for invalid characters
        $sExclude_List = StringReplace(StringStripWS(StringRegExpReplace($sExclude_List, "\s*;\s*", ";"), 3), ";", "|") ; Strip WS and swap ;/|
        $sExclude_List_Mask = "(?i)^" & StringReplace(StringReplace(StringReplace($sInclude_List, ".", "\."), "*", ".*"), "?", ".") & "\z" ; Convert to SRE pattern
    EndIf

    ; Verify other parameter values
    If Not ($iReturn = 0 Or $iReturn = 1 Or $iReturn = 2) Then Return SetError(1, 3, "")
    If Not ($fRecur = 0 Or $fRecur = 1) Then Return SetError(1, 4, "")
    If Not ($iFullPath = 0 Or $iFullPath = 1 Or $iFullPath = 2) Then Return SetError(1, 6, "")

    ; Search in listed folders
    While $asFolderList[0] > 0

        ; Set path to search
        $sCurrentPath = $asFolderList[$asFolderList[0]]
        ; Reduce folder array count
        $asFolderList[0] -= 1
        ; Get search handle
        $hSearch = FileFindFirstFile($sCurrentPath & "*")
        ; If folder empty move to next in list
        If $hSearch = -1 Then ContinueLoop

        ; Determine path to add to file/folder name
        Switch $iFullPath
            Case 0 ; Initial path not included
                $sReturnPath = StringReplace($sCurrentPath, $sInitialPath, "")
            Case 1 ; Initial path included
                $sReturnPath = $sCurrentPath
            ; Case 2 ; Name only so leave as ""
        EndSwitch

        ; Search folder
        While 1
            $sName = FileFindNextFile($hSearch)
            ; Check for end of folder
            If @error Then ExitLoop
            ; Check for subfolder - @extended set in 3.3.1.1 +
            $fFolder = @extended

            ; If recursive search, add subfolder to folder list
            If $fRecur And $fFolder Then
                ; Increase folder array count
                $asFolderList[0] += 1
                ; Double folder array size if too small (fewer ReDim needed)
                If UBound($asFolderList) <= $asFolderList[0] + 1 Then ReDim $asFolderList[UBound($asFolderList) * 2]
                ; Add subfolder to list
                $asFolderList[$asFolderList[0]] = $sCurrentPath & $sName & "\"
            EndIf

            ; Check file/folder type against required return value and file/folder name against Include/Exclude masks
            If $fFolder + $iReturn <> 2 And StringRegExp($sName, $sInclude_List_Mask) And Not StringRegExp($sName, $sExclude_List_Mask) Then
                ; Increase return array count
                $asReturnList[0] += 1
                ; Double return array size if too small (fewer ReDim needed)
                If UBound($asReturnList) <= $asReturnList[0] Then ReDim $asReturnList[UBound($asReturnList) * 2]
                ; Add required path to file/folder name and add to array
                $asReturnList[$asReturnList[0]] = $sReturnPath & $sName
            EndIf
        WEnd

        ; Close current search
        FileClose($hSearch)

    WEnd

    ; Check if any file/folders to return
    If $asReturnList[0] = 0 Then Return SetError(1, 7, "")
    ; Remove unused return array elements from last ReDim
    ReDim $asReturnList[$asReturnList[0] + 1]

    Return $asReturnList

EndFunc   ;==>_RecFileListToArray

It is designed to be used as an include file so you will have to add another #include line to get it to work.

I cannot see why your script does not play - as the saying goes "It works on my machine!". >_< Could you please post the entire script that you are using so I can take a look.

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______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
AJJ

autoit would be alot more logical if, instead of having to write a whole new function you could just say -

look for "*.mp3" AND "*.wav" AND "*.Wma"

ok my code:

#include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <GuiComboBox.au3> #include <Sound.au3> #include <File.au3>  Global $sToPlay = ""  ; Assume all sound files are in one folder N:\Sounds - adjust as necessary $sFolder = "C:\Documents and Settings\All Users\Documents\My Music\Sample Music"  $asSounds = _FileListToArray($sFolder, "*.mp3", 1) $sSound_Data = "" For $i = 1 To $asSounds[0]     $sSound_Data &= $asSounds[$i] & "|" Next  ; Create GUI $hGUI = GUICreate("Test", 500, 500)  $hPlay = GUICtrlCreateButton("Play", 10, 10, 80, 30) $hStop = GUICtrlCreateButton("Stop", 10, 50, 80, 30) $hChoose = GUICtrlCreateCombo("", 10, 110, 200, 20) GUICtrlSetData(-1, $sSound_Data)  GUISetState()  GUIRegisterMsg($WM_COMMAND, "MY_WM_COMMAND")  While 1      Switch GUIGetMsg()         Case $GUI_EVENT_CLOSE             Exit         Case $hPlay             If GUICtrlRead($hChoose) <> "" Then                 $sToPlay = $sFolder & GUICtrlRead($hChoose)                 SoundPlay($sToPlay)             EndIf         Case $hStop             If $sToPlay <> "" Then SoundPlay("")     EndSwitch  WEnd  Func MY_WM_COMMAND($hWnd, $Msg, $wParam, $lParam)     Local $iIDFrom = BitAND($wParam, 0x0000FFFF)     Local $iCode = BitShift($wParam, 16)      Switch $iIDFrom         Case $hChoose             Switch $iCode                 Case $CBN_EDITCHANGE                     _GUICtrlComboBox_AutoComplete($hChoose)             EndSwitch     EndSwitch      Return $GUI_RUNDEFMSG EndFunc   ;==>MY_WM_COMMAND

EDIT: Ok, why did it do that?

Edited by AJJ

Share this post


Link to post
Share on other sites
AJJ

infact thinking about it, couldnt you just do this:

associate a file extension with a number

then create a variable with each number and extension

create a variable that will randomise and select a number

then that way you could use more than one file extension in the same string... obvously it would be very annouying because you would have to keep restarting the program until it let you use the file extension you wanted... but its out of the box thinking eh?

Share this post


Link to post
Share on other sites
Melba23

AJ,

Your script did not work because the path was incomplete. Just add a "\" at the end of "C:\Documents and Settings\All Users\Documents\My Music\Sample Music" and all will be well - at least "it works on my machine!".

As for your "out of the box" thinking - get back in! The include file I posted does what you want without any fuss - and with recursion as well. But if you want to write your own custom search UDF, please feel free to plagiarise any part of mine you feel might be of use. However, if you want to follow up your idea of associating file extensions and numbers - then you are on your own! >_<

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______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
AJJ

yeah maybe the box is safer >_<

is that a rule then that the end of paths are always "\"

would the function that you wroet just work on its own without any editing? as you can tell im quite noobish to all this!

Share this post


Link to post
Share on other sites
AJJ

so what would i have to do to replicate that box, play etc. could you do just one so i can see what needs to be replicated then i can do the rest myself!

Share this post


Link to post
Share on other sites
GEOSoft

When a path ends with a folder name or if you are using the directory macros then it must end with the backslash.

For example to get the file somefile.txt on your desktop you would use

@MyDocumentsDir & "\somefile.txt"

or

$sDocs = @MyDocumetsDir & "\"

$sFile = $sDocs & "somefile.txt"

"C:\Documents and Settings\All Users\Documents\My Music\Sample Music"

Would be better written as

@DocumentsCommonDir & "\My Music\Sample Music\"

Edited by GEOSoft

George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Share this post


Link to post
Share on other sites
Melba23

AJJ,

As George has explained, you need "\" between all the elements of a path. I added the "\" when defining the folder - I could equally well have added it when making up the $sToPlay variable: $sToPlay = $sFolder & "\" & GUICtrlRead($hChoose). The choice of when you do it is up to you, but the important thing is to make sure your path is correct. If you are in doubt, just use MsgBox and see what you have at that point in your script.

As to the search function - it is ready to go. Just save it in the same folder as your script (perhaps under the name RecFileListToArray.au3) and then add the line "#include <RecFileListToArray.au3>" to your script. Then when you want to list your sound files you use this syntax:

_RecFileListToArray("C:\Documents and Settings\All Users\Documents\My Music\Sample Music", "*.mp3;*.wma;*.wav", 1, 1)

which translates as:

Function("This path", "These file extensions", Return files only, Recursive - look in subfolders)

You can safely ignore the rest of the parameters - they default to settings which have no effect on your needs.

By the way, George's suggestion to use @DocumentsCommonDir & "\My Music\Sample Music\" is a very good one - it makes the code more portable, which is always a good thing.

As to your "replication" request - I am afraid I do not fully understand what you want. Do you mean you want a second sound file ready to go so that you can get ahead of the game? A bit more explanation would help. >_<

Please ask if anything else is unclear - we are here to help, after all!

M23

Edit: One thing I have just thought of - the search function uses the Beta functionality for detecting folders with FileFindNextFile. If you are still using AutoIt 3.3.0.0 or lower, let me know and I will post a modified version for you.

Edited by Melba23

Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______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
AJJ

hey, yeah, thank you guys so much for helping me out with this, im learning!

its now reporting subscript used with non array variable, but i havnt really changed anything

just done this:

; Assume all sound files are in one folder N:\Sounds - adjust as necessary

$sFolder = @ScriptDir\

$asSounds = _RecFileListToArray($sFolder, "*.mp3;*.wma;*.wav", 1, 1)

$sSound_Data = ""

For $i = 1 To $asSounds[0]

$sSound_Data &= $asSounds[$i] & "|"

Next

was that the right place?

Share this post


Link to post
Share on other sites
GEOSoft

hey, yeah, thank you guys so much for helping me out with this, im learning!

its now reporting subscript used with non array variable, but i havnt really changed anything

just done this:

; Assume all sound files are in one folder N:\Sounds - adjust as necessary

$sFolder = @ScriptDir\

$asSounds = _RecFileListToArray($sFolder, "*.mp3;*.wma;*.wav", 1, 1)

$sSound_Data = ""

For $i = 1 To $asSounds[0]

$sSound_Data &= $asSounds[$i] & "|"

Next

was that the right place?

$sFolder = "N:\Sounds\"

George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Share this post


Link to post
Share on other sites
AJJ

can i not have my macro there?

Share this post


Link to post
Share on other sites
GEOSoft

can i not have my macro there?

Sure you can as long as the script is in N:\Sounds

@ScriptDir is the folder that the script is being run from.


George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

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  

×