Alright so currently I've come this far in my project with my small search engine
The code is as follows :
AutoIt
#include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #include <RecFileListToArray.au3> #include <Array.au3> #include <File.au3> Opt("GUIOnEventMode", 1) #region ### START Koda GUI section ### Form=C:\Users\Wombat\Documents\NewTSE.kxf $Form1 = GUICreate("Trumpf500 Search Engine", 651, 362, 192, 124, BitOR($WS_THICKFRAME, $WS_POPUP)) GUISetBkColor(0x434E54) GUISetOnEvent($GUI_EVENT_CLOSE, "Form1Close") GUISetOnEvent($GUI_EVENT_MINIMIZE, "Form1Minimize") GUISetOnEvent($GUI_EVENT_MAXIMIZE, "Form1Maximize") GUISetOnEvent($GUI_EVENT_RESTORE, "Form1Restore") $Pic1 = GUICtrlCreatePic("C:\Users\Wombat\Documents\StormSquare.jpg", 8, 5, 62, 62) GUICtrlSetOnEvent(-1, "Pic1Click") $StormCopper = GUICtrlCreatePic("C:\Users\Wombat\Documents\StormLogo.jpg", 78, 6, 385, 67) GUICtrlSetOnEvent(-1, "StormCopperClick") $Pic3 = GUICtrlCreatePic("C:\Users\Wombat\Documents\divider.jpg", -12, 72, 680, 25) GUICtrlSetOnEvent(-1, "Pic3Click") $Input1 = GUICtrlCreateInput("", 338, 116, 178, 21) GUICtrlSetOnEvent(-1, "Input1Change") $Pic4 = GUICtrlCreatePic("C:\Users\Wombat\Documents\searchbar_half_1.5.jpg", 324, 104, 207, 45) GUICtrlSetOnEvent(-1, "Pic4Click") $SearchButton = GUICtrlCreatePic("C:\Users\Wombat\Documents\searchbar_half_2.5.jpg", 531, 104, 95, 45) GUICtrlSetOnEvent(-1, "SearchButtonClick") $iError = @error GUIRegisterMsg($WM_NCHITTEST, "WM_NCHITTEST") GUISetState(@SW_SHOW) #endregion ### END Koda GUI section ### While 1 Sleep(100) WEnd ; If you want the GUI to be moved as well. Func WM_NCHITTEST($hWnd, $iMsg, $wParam, $lParam) #forceref $hWnd, $iMsg, $wParam, $lParam Return $HTCAPTION EndFunc ;==>WM_NCHITTEST Func Form1Close() Exit EndFunc ;==>Form1Close Func Form1Maximize() EndFunc ;==>Form1Maximize Func Form1Minimize() EndFunc ;==>Form1Minimize Func Form1Restore() EndFunc ;==>Form1Restore Func Input1Change() EndFunc ;==>Input1Change Func Pic1Click() EndFunc ;==>Pic1Click Func Pic3Click() EndFunc ;==>Pic3Click Func Pic4Click() EndFunc ;==>Pic4Click Func SearchButtonClick();;;;<======= Search Function $ReadInput1 = GUICtrlRead($Input1) $aList = _RecFileListToArray("C:\", $ReadInput1 & "*", 1, 1, 1, 2) If @error Then MsgBox(0, "Error", "Error File Not Found " & @CRLF & " - " & " Error Code: " & @extended & @CRLF) ElseIf IsArray($aList) Then ;;;<====Write's the results of the search to a text file for referencing later _FileWriteFromArray("C:\Users\Wombat\workshop\variables_returned.txt", $aList) EndIf EndFunc ;==>SearchButtonClick Func StormCopperClick() EndFunc ;==>StormCopperClick
Now it searches for the input and if nothing is found it displays an error message with descriptive error code. If anything is found it creates a text file and writes the results to it.
What I need pointers on now is how to display the results, preferably like so:
1 = view corresponding .HTML file in IE
2 = display corresponding .BMP file
3 = select corresponding .LST file with COMBO BOX
(this is a simple paint markup and not how the display will look, they will be 1=button, 2=frame, 3=combobox )
you all have been extremely helpful so far, I wouldn't be this far into the project with the great members of this forum!