-
Posts
38 -
Joined
-
Last visited
Recent Profile Visitors
The recent visitors block is disabled and is not being shown to other users.
Mannyfresh15's Achievements

Seeker (1/7)
0
Reputation
-
Hi guys, I wonder if there is a way to sort the filelist in an array from _FileListToArray () when files have the regular Windows enumeration example: File1 (1), File2 (2), File3 (3), etc. I'm posting two sample graphics so you can see what I mean I would like to get my list like in graphic 2 right now I'm getting my list like in graphic 1 which is the something I don't like. It's worth to say that I have no problem with a list when the files's names start with a number or is just a number thanks to the code found in this post. But, the problem is still present if I just get rid of the parenthesis that is () so in other words the problem happens when the enumeration is at the end of the names whether parenthesis are present or not.
-
Mannyfresh15 reacted to a post in a topic: Text from List
-
Now, that works! Thank you so much!
-
I Changed the path and created one and still doesn't work ): Anyways here is my version. #include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #include <File.au3> #include <ListBoxConstants.au3> #include <GuiListBox.au3> Global $MyFileList = "" #cs Global $MyFileList [4] $MyFileList [0] = "3" $MyFileList [1] = "Im #1" $MyFileList [2] = "I'm #2" $MyFileList [3] = "I'm #3" #ce #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("NGT File Creator", 387, 233, 414, 146) GUISetFont(12, 400, 0, "MS Sans Serif") $Button1 = GUICtrlCreateButton("Select", 292, 17, 75, 25) $Input1 = GUICtrlCreateInput("Enter a valid folder path with files in it.", 5, 16, 277, 28) GUICtrlSetstate(-1, $GUI_FOCUS) $idMylist = GUICtrlCreateList("Your files will be shown here", 5, 60, 376, 182,$WS_VSCROLL + $LBS_NOTIFY ) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### #cs For $a = 0 To (UBound ( $MyFileList ) -1 ) If $a = 0 Then GUICtrlSetData($idMylist, "") GUICtrlSetData($idMylist, " Number of files in Folder: " & $MyFileList [$a] & @CRLF & @CRLF ) Else GUICtrlSetData($idMylist,$a & " " & $MyFileList [$a] ) EndIf Next #ce While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Button1 $Folder1 = FileSelectFolder("Select a Folder", @UserProfileDir ,1) if Not @error Then If DirGetSize ($Folder1) = 0 Then MsgBox(262144, "Hey!", $Folder1 & @CRLF & "The folder is emty!.") ContinueLoop EndIf GUICtrlSetData($Input1 , $Folder1 ) $MyFileList = _FileListToArray ( $Folder1 ,"*" , 1) if @error = 1 or @error = 2 or @error = 3 or @error = 4 Then MsgBox (262144 , "Hey!" , "Error Loading Files ):" ,0) EndIf For $a = 0 To (UBound ( $MyFileList ) -1 ) If $a = 0 Then GUICtrlSetData($idMylist, "") GUICtrlSetData($idMylist, " Number of files in Folder: " & $MyFileList [$a] ) Else GUICtrlSetData($idMylist ,$a & " " & $MyFileList [$a] ) EndIf Next EndIf Case $idMylist $Item = _GUICtrlListBox_GetCurSel ( $idMylist ) If $Item > 0 Then For $a = 1 to UBound ( $MyFileList) -1 if $a = $Item Then ClipPut ( $MyFileList [$a]) ExitLoop EndIf Next _WinAPI_ShowMsg("Current Selection: " & $Item & " " & $MyFileList [$a] & @LF & "has been put in the Clipboard." ) EndIf Case $Input1 $file1 = GUICtrlRead($Input1) If FileGetSize ($file1) Then MsgBox(262144, "Hey!", $file1 & @CRLF & "It's not a folder!.") ContinueLoop EndIf If DirGetSize ($file1) = 0 Then MsgBox(262144, "Hey!", $file1 & @CRLF & "The folder is emty!.") ContinueLoop EndIf if Not FileExists ($file1) Then MsgBox (262144 , "Hey!" , "The folder doesn't exist!",0) ContinueLoop EndIf $MyFileList = _FileListToArray ( $file1 ,"*" , 1) if @error = 1 or @error = 2 or @error = 3 or @error = 4 Then MsgBox (262144 , "Hey!" , "Error Loading Files ):" ,0) EndIf For $a = 0 To (UBound ( $MyFileList ) -1 ) If $a = 0 Then GUICtrlSetData($idMylist, "") GUICtrlSetData($idMylist, " Number of files in Folder: " & $MyFileList [$a] ) Else GUICtrlSetData($idMylist,$a & " " & $MyFileList [$a] ) EndIf Next EndSwitch WEnd
-
Thank you very much for your reply I really appreciated. Although I get an error ): (13) : ==> Subscript used on non-accessible variable.: Dim $aCSV[$a_sCSV[0]][2] Dim $aCSV[$a_sCSV^ ERROR By the way. I've found a way, way way easier than the one you posted. I will post an example in a minute.
-
Does anybody know how to retrieve text from a List? That is: GUICtrlCreateList. I've found this thread and other similar that show how to retrieve text from a listview however I'm more interested in plain list control this type of controls have a feature/style called $LBS_NOTIFY that can be used somehow to get the text from the item in the list when the user clicks or double clicks the item but I have no Idea how to achieve it. I will appreciate anyhelp in anyway.
-
Mannyfresh15 reacted to a file: Learn To Program Using FREE Tools with AutoIt
-
Mannyfresh15 reacted to a file: AuPad
-
Mannyfresh15 reacted to a post in a topic: Help inserting two zeros every other two characters in a string
-
Mannyfresh15 reacted to a post in a topic: Help inserting two zeros every other two characters in a string
-
Mannyfresh15 reacted to a post in a topic: Help inserting two zeros every other two characters in a string
-
Mannyfresh15 reacted to a post in a topic: Help inserting two zeros every other two characters in a string
-
Mannyfresh15 reacted to a post in a topic: Help inserting two zeros every other two characters in a string
-
I need some help inserting two zeros every other two characters in a string #include <String.au3> $sString = "manny1" $NewString = _StringInsert ( $sString, "00",0 ) MsgBox (0,"Hello" , "Your String After Inserting 00's " & $NewString ,0) the outcome need to be ma00nn00y100 but IDK how to do it. Please help.
-
.....
-
mLipok, I checked out your "how to" and it's a great tutorial thank you very much for it. However, I solved my problem in a different way since I found out what was causing the problem. The caused due to I open _IECreate in one function and I was trying to fill the form in a different function and that was the problem causing my script to not work properly at times but it's all solved now (:
-
Nope but will
-
3.3.14.2