hausl78 Posted October 15, 2018 Share Posted October 15, 2018 (edited) Hello, I wanted to ask if mine project is generally possible. It's about a list of paths that should contain all clickable shell commands. You should also be able to search (filter). Whether this happens with CTRL+F or via a search field doesn't matter to me. I would have a database that is CSV or a SQLite DB, from this come the shell commands with arguments and they should be clickable. Background is a kind of list for a media player to be able to directly access single songs over several video concerts (mp4) via MPC player command. I would save the data ~ in this form. Artist;Track;VideoPath;VideoPos A shell command would be like: "C:\Program Files\MPC-BE x64\mpc-be64.exe" "E:\Videos\Artist - Gig ABC.mp4" /startpos 01:20:20 Can you do that with Autoit? And would you use CSV or SQLite? Especially for the search and sorting possibilities I would be here rather for SQLite. How is the support in Autoit, does it work well? Thanks a lot! Edited October 15, 2018 by hausl78 Link to comment Share on other sites More sharing options...
careca Posted October 15, 2018 Share Posted October 15, 2018 Seems doable, i would probably use ini files, depending on the size of the list. Spoiler Renamer - Rename files and folders, remove portions of text from the filename etc. GPO Tool - Export/Import Group policy settings. MirrorDir - Synchronize/Backup/Mirror Folders BeatsPlayer - Music player. Params Tool - Right click an exe to see it's parameters or execute them. String Trigger - Triggers pasting text or applications or internet links on specific strings. Inconspicuous - Hide files in plain sight, not fully encrypted. Regedit Control - Registry browsing history, quickly jump into any saved key. Time4Shutdown - Write the time for shutdown in minutes. Power Profiles Tool - Set a profile as active, delete, duplicate, export and import. Finished Task Shutdown - Shuts down pc when specified window/Wndl/process closes. NetworkSpeedShutdown - Shuts down pc if download speed goes under "X" Kb/s. IUIAutomation - Topic with framework and examples Au3Record.exe Link to comment Share on other sites More sharing options...
hausl78 Posted October 15, 2018 Author Share Posted October 15, 2018 Thank you, currently are about 30 commands, can grow to about 200 i think, so thats not as much. I just think about Sorting and filtering.. So the Data go from an ini file in an array i assume, and can then be sorted and/or filtered, correct? Just found this.. This might be my way, so i "only" have to make the parsing from the ini file into the list view. Â Â Â Link to comment Share on other sites More sharing options...
FrancescoDiMuro Posted October 15, 2018 Share Posted October 15, 2018 @hausl78 Always post your code, so we can see how can help you Click here to see my signature: Spoiler ALWAYS GOOD TO READ: Forum Rules Forum Etiquette  Link to comment Share on other sites More sharing options...
hausl78 Posted October 15, 2018 Author Share Posted October 15, 2018 (edited) Ahm, there ist no code at this moment. Before i spend work i want to know if its possible what i want. First evaluating.. then coding. Quote I wanted to ask if mine project is generally possible. Though this made that clear. Edited October 15, 2018 by hausl78 Link to comment Share on other sites More sharing options...
FrancescoDiMuro Posted October 15, 2018 Share Posted October 15, 2018 @hausl78 Yes, I read that. Just to inform you that, if you would need any help, just post the code you have And, since I made a little reproducer of what you are trying to do, I tell you that your project is 100% doable Click here to see my signature: Spoiler ALWAYS GOOD TO READ: Forum Rules Forum Etiquette  Link to comment Share on other sites More sharing options...
hausl78 Posted October 15, 2018 Author Share Posted October 15, 2018 Uh great news.. thanks. Did you use a SQLiteDB or from an ini? I will start if i have enough freetime.. its a private thing, not for work so i can during the day not really do a lot. If i have Code i will post it. Link to comment Share on other sites More sharing options...
FrancescoDiMuro Posted October 15, 2018 Share Posted October 15, 2018 @hausl78 Talking about 200 tracks, it can be done with one .ini file in which there are all the tracks, and you store whatever you want with the track Directly with the ListView, you can search for a specific track and, by double-clicking the row, for example, you can start the track or whatever you want. It always depends from what are your goals Click here to see my signature: Spoiler ALWAYS GOOD TO READ: Forum Rules Forum Etiquette  Link to comment Share on other sites More sharing options...
hausl78 Posted October 15, 2018 Author Share Posted October 15, 2018 I think i could have troubles with the ini file. Because i have the following data for each song: 1. the video-filename (one file contains a lot of songs, its a complete show) 2. the artist name 3. the track name 4. the position (~ "timestamp") of this track within the videofile I think this can be clear stored within an ini file? Â [e:/video/shows/the complete show 2016.mp4] 230=sting|fields of gold 12050=queen|radio gaga [e:/video/shows/the complete show 2017.mp4] 120=GunsNRoses|Knocking on heavens door 8500=Bob Geldof|tell me why i dont hate mondays [e:/video/single/queen - innuendo.mp4] 0=Queen|Innuendo [...] ... Â Link to comment Share on other sites More sharing options...
FrancescoDiMuro Posted October 15, 2018 Share Posted October 15, 2018 @hausl78 Maybe this one could be more "dynamic" ( from your first post ): [Track1] Artist=NameOfTheArtist Track=NameOfTheTrack VideoPath=PathOfTheVideo VideoPos=PosOfTheVideo You can have as much tracks as you want, since the things you are interested are the values of the keys Click here to see my signature: Spoiler ALWAYS GOOD TO READ: Forum Rules Forum Etiquette  Link to comment Share on other sites More sharing options...
hausl78 Posted October 15, 2018 Author Share Posted October 15, 2018 (edited) I think about it, thank you. But its also possible to build with this a list like this, that would be my goal. And sortable with click on the head is also possible? (Image from the web, just as example) Edited October 15, 2018 by hausl78 Link to comment Share on other sites More sharing options...
FrancescoDiMuro Posted October 15, 2018 Share Posted October 15, 2018 It's 100% possibile If you want to make it "simple", you can use an .ini file as I've said above; but, if you want to make a SQLite DB, then it would be a little less simple, since you have to manage your data with SQLite functions, and not directly in the ListView as you would do with the .ini file. Click here to see my signature: Spoiler ALWAYS GOOD TO READ: Forum Rules Forum Etiquette  Link to comment Share on other sites More sharing options...
hausl78 Posted October 15, 2018 Author Share Posted October 15, 2018 Great! As its just an simple tool for me and my friends it should be as simple as possible at all. So than i will install AutoIt at Home and try it. Thanks meanwhile. Link to comment Share on other sites More sharing options...
FrancescoDiMuro Posted October 15, 2018 Share Posted October 15, 2018 Go for the .ini files then Be sure to install AutoIt Full Installation and AutoIt Script Editor before you start scripting Click here to see my signature: Spoiler ALWAYS GOOD TO READ: Forum Rules Forum Etiquette  Link to comment Share on other sites More sharing options...
hausl78 Posted October 15, 2018 Author Share Posted October 15, 2018 (edited) ok thanks.. I just forgot to the possibility to search within the list. If i make a search-textfield, that should only find in artist and track, ist this to be handled with the fileliste-array (ini) ? My first idea was on every keypress within the search-textfield to trigger a Query to the SQLite DB something like WHERE artist LIKE '%input%' OR track LIKE '%input%' Currently i got them in an SQLite DB, and read it with:  SELECT s.title, s.interpret, f.filename, s.timecode FROM song s INNER JOIN file f ON s.file_id = f.id ORDER BY title  Edited October 15, 2018 by hausl78 Link to comment Share on other sites More sharing options...
hausl78 Posted October 15, 2018 Author Share Posted October 15, 2018 Look, I just found this one, i think this is a good help for creating, filtering etc.. the control. Â Link to comment Share on other sites More sharing options...
careca Posted October 15, 2018 Share Posted October 15, 2018 Yes, we can guide you. The idea is that the input will be read in the main loop, checking for changes in said input. As soon as there is a change, compare the input withc stringinstr with the listview items, filter what doesn't match. Re-Do the list as to show only the filtered items, but i figure this is too complex at the moment, we'll get there when we do. Spoiler Renamer - Rename files and folders, remove portions of text from the filename etc. GPO Tool - Export/Import Group policy settings. MirrorDir - Synchronize/Backup/Mirror Folders BeatsPlayer - Music player. Params Tool - Right click an exe to see it's parameters or execute them. String Trigger - Triggers pasting text or applications or internet links on specific strings. Inconspicuous - Hide files in plain sight, not fully encrypted. Regedit Control - Registry browsing history, quickly jump into any saved key. Time4Shutdown - Write the time for shutdown in minutes. Power Profiles Tool - Set a profile as active, delete, duplicate, export and import. Finished Task Shutdown - Shuts down pc when specified window/Wndl/process closes. NetworkSpeedShutdown - Shuts down pc if download speed goes under "X" Kb/s. IUIAutomation - Topic with framework and examples Au3Record.exe Link to comment Share on other sites More sharing options...
hausl78 Posted October 15, 2018 Author Share Posted October 15, 2018 (edited) Now i tried something.. Lets assume i have the following songs.ini ;[] ;artist= ;title= ;filepath= ;timecode= [10] artist=Santiano title=Sound of Silence filepath=Konzerte, Shows\Helene Fischer Show 2017.mp4 timecode=02:35:13 [20] artist=Seer title=Hoamatgfühl filepath=Konzerte, Shows\Seer - Open Air in Grundlsee 2014.mp4 timecode=00:23:54 I try to import this to the control, but i dont know how to "translate" the correct order from the ini-Array to the control. Is my way with the _IniReadFile good? expandcollapse popup; ----------------------------------------------------------------------------- ; S T A R T O P T I O N S ; ----------------------------------------------------------------------------- ; no tray-icon #NoTrayIcon ; OnEvent Modus AutoItSetOption('GUIOnEventMode', 1) ; ~ option explicit AutoItSetOption('MustDeclareVars', 1) ; ESC trigger $GUI_EVENT_CLOSE ? AutoItSetOption('GUICloseOnESC', 1) ; ----------------------------------------------------------------------------- ; I N C L U D E S ; ----------------------------------------------------------------------------- #include <GUIConstantsEx.au3> #include <MsgBoxConstants.au3> #include <WindowsConstants.au3> #include <Array.au3> ; ----------------------------------------------------------------------------- ; G U I ; ----------------------------------------------------------------------------- Func GUIMain() Local $i Local $hGUIMain = GUICreate('Video Launcher', 500, 300, 300, 150, -1) ; klick to "X" (ESC is deactivated) GUISetOnEvent($GUI_EVENT_CLOSE, 'exitProgramm', $hGUIMain) Local $idListview = GUICtrlCreateListView('Interpret|Titel|Datei|', 20, 50, 450, 200) Local $aSongsArray = _IniReadFile(@ScriptDir & '\songs.ini') _ArrayDisplay($aSongsArray) For $i = 1 To $aSongsArray[0][0] - 2 ;ConsoleWrite($aSongsArray[$i][0] & @LF) ConsoleWrite($aSongsArray[$i][1] & @LF) ;ConsoleWrite($aSongsArray[$i][2] & @LF) ConsoleWrite("--------" & @LF) GUICtrlCreateListViewItem( _ $aSongsArray[$i][1] & '|' & $aSongsArray[$i+1][1] & '|' & $aSongsArray[$i+2][1], _ $idListview _ ) Next GUISetState(@SW_SHOW) While 1 Sleep(1000) ; Idle.. wait for user input WEnd EndFunc ; ----------------------------------------------------------------------------- ; S T A R T P R O G R A M ; ----------------------------------------------------------------------------- guiMain() ; ----------------------------------------------------------------------------- ; F U N C T I O N S ; ----------------------------------------------------------------------------- Func _IniReadFile($sFilePath) Local $aReturn[1][3] = [[0, 3]], $aSectionArray, $aSectionNameArray, $iCount = 0 $aSectionNameArray = IniReadSectionNames($sFilePath) If @error Then Return SetError(1, 0, $aReturn) EndIf For $A = 1 To $aSectionNameArray[0] $aSectionArray = IniReadSection($sFilePath, $aSectionNameArray[$A]) If @error Then ContinueLoop EndIf For $B = 1 To $aSectionArray[0][0] $aReturn[0][0] += 1 $iCount += 1 If $aReturn[0][0] <= $iCount + 1 Then ReDim $aReturn[$aReturn[0][0] * 2][$aReturn[0][1]] EndIf $aReturn[$iCount][0] = $aSectionArray[$B][0] $aReturn[$iCount][1] = $aSectionArray[$B][1] $aReturn[$iCount][2] = $aSectionNameArray[$A] Next Next ReDim $aReturn[$aReturn[0][0] + 1][$aReturn[0][1]] ; Remove empty entries. Return $aReturn EndFunc ;==>_IniReadFile ; Handle event Func exitProgramm() Exit EndFunc  Its somehow thr wrong order...  Edited October 15, 2018 by hausl78 Link to comment Share on other sites More sharing options...
careca Posted October 15, 2018 Share Posted October 15, 2018 expandcollapse popup; ----------------------------------------------------------------------------- ; S T A R T O P T I O N S ; ----------------------------------------------------------------------------- ; no tray-icon #NoTrayIcon ; OnEvent Modus AutoItSetOption('GUIOnEventMode', 1) ; ~ option explicit AutoItSetOption('MustDeclareVars', 1) ; ESC trigger $GUI_EVENT_CLOSE ? AutoItSetOption('GUICloseOnESC', 1) ; ----------------------------------------------------------------------------- ; I N C L U D E S ; ----------------------------------------------------------------------------- #include <GUIConstantsEx.au3> #include <MsgBoxConstants.au3> #include <WindowsConstants.au3> #include <Array.au3> ; ----------------------------------------------------------------------------- ; S T A R T P R O G R A M ; ----------------------------------------------------------------------------- GUIMain() While 1 Sleep(1000) WEnd ; ----------------------------------------------------------------------------- ; G U I ; ----------------------------------------------------------------------------- Func GUIMain() Global $aSectionArray, $aSectionNameArray Global $Artist, $Title, $Path, $Time Local $hGUIMain = GUICreate('Video Launcher', 500, 300, 300, 150, -1) GUISetOnEvent($GUI_EVENT_CLOSE, 'exitProgramm', $hGUIMain) Local $idListview = GUICtrlCreateListView('Interpret|Titel|Datei|Timecode', 20, 50, 450, 200) Global $sFilePath = @ScriptDir & '\songs.ini' GUISetState(@SW_SHOW) ;============================================================================= $aSectionNameArray = IniReadSectionNames($sFilePath) For $A = 1 To $aSectionNameArray[0] $Artist = IniRead($sFilePath, $aSectionNameArray[$A], 'artist', 'error') $Title = IniRead($sFilePath, $aSectionNameArray[$A], 'title', 'error') $Path = IniRead($sFilePath, $aSectionNameArray[$A], 'filepath', 'error') $Time = IniRead($sFilePath, $aSectionNameArray[$A], 'timecode', 'error') GUICtrlCreateListViewItem($Artist & '|' & $Title & '|' & $Path & '|' & $Time, $idListview) Next ;============================================================================= EndFunc ;==>GUIMain ; ---------------------------------------------------------------------------- ; F U N C T I O N S ; ----------------------------------------------------------------------------- ; Handle event Func exitProgramm() Exit EndFunc ;==>exitProgramm  hausl78 1 Spoiler Renamer - Rename files and folders, remove portions of text from the filename etc. GPO Tool - Export/Import Group policy settings. MirrorDir - Synchronize/Backup/Mirror Folders BeatsPlayer - Music player. Params Tool - Right click an exe to see it's parameters or execute them. String Trigger - Triggers pasting text or applications or internet links on specific strings. Inconspicuous - Hide files in plain sight, not fully encrypted. Regedit Control - Registry browsing history, quickly jump into any saved key. Time4Shutdown - Write the time for shutdown in minutes. Power Profiles Tool - Set a profile as active, delete, duplicate, export and import. Finished Task Shutdown - Shuts down pc when specified window/Wndl/process closes. NetworkSpeedShutdown - Shuts down pc if download speed goes under "X" Kb/s. IUIAutomation - Topic with framework and examples Au3Record.exe Link to comment Share on other sites More sharing options...
hausl78 Posted October 16, 2018 Author Share Posted October 16, 2018 Thank you. So now my next steps... - Trigger shell cmd on double clich of the actual list entry Then .. nice to have - Sorting by click on the column header - Searchfiled (filter) to input a word what on keypress acutals the list if the word > 3 chars and the searchpart is within artist oder title. Will try now the double click.. Thank you meanwhile. (and sorry if my english is "crypted" somehow, im austrian, so not realy a native ) 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