Sign in to follow this  
Followers 0
Wombat

Adding functionality to my mini-search engine (powered by RecFileListToArray)

15 posts in this topic

#1 ·  Posted (edited)

Alright, so I've implemented the SE at my place of work and the boss is engines-to-full-speed about it. He wants to see me add some functionality to it.

Currently the code is as shown:

 

#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_Icon=SCCicon.ico
#AutoIt3Wrapper_Outfile=StormCopperTSE.exe
#AutoIt3Wrapper_Res_Comment=To be used only by StormCopper
#AutoIt3Wrapper_Res_Description=Enhanced search engine
#AutoIt3Wrapper_Res_Language=1033
#AutoIt3Wrapper_Res_requestedExecutionLevel=highestAvailable
#AutoIt3Wrapper_Run_AU3Check=n
#AutoIt3Wrapper_Tidy_Stop_OnError=n
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <RecFileListToArray.au3>
#include <Array.au3>

Opt("GUIOnEventMode", 1)
Opt("GUIResizeMode", $GUI_DOCKAUTO + $GUI_DOCKRIGHT + $GUI_DOCKBOTTOM)
Opt("GUIResizeMode", $GUI_DOCKAUTO + $GUI_DOCKRIGHT + $GUI_DOCKBOTTOM)
Opt("GUIResizeMode", $GUI_DOCKAUTO + $GUI_DOCKRIGHT + $GUI_DOCKBOTTOM)
Opt("GUIResizeMode", $GUI_DOCKAUTO + $GUI_DOCKRIGHT + $GUI_DOCKBOTTOM)
Opt("GUIResizeMode", $GUI_DOCKAUTO + $GUI_DOCKRIGHT + $GUI_DOCKBOTTOM)
Opt("GUIResizeMode", $GUI_DOCKAUTO + $GUI_DOCKRIGHT + $GUI_DOCKBOTTOM)
Opt("GUIResizeMode", $GUI_DOCKAUTO + $GUI_DOCKRIGHT + $GUI_DOCKBOTTOM)
Opt("GUIResizeMode", $GUI_DOCKAUTO + $GUI_DOCKRIGHT + $GUI_DOCKBOTTOM)
Opt("GUIResizeMode", $GUI_DOCKAUTO + $GUI_DOCKRIGHT + $GUI_DOCKBOTTOM)
Opt("GUIResizeMode", $GUI_DOCKAUTO + $GUI_DOCKRIGHT + $GUI_DOCKBOTTOM)
Opt("GUIResizeMode", $GUI_DOCKAUTO + $GUI_DOCKRIGHT + $GUI_DOCKBOTTOM)
Opt("GUIResizeMode", $GUI_DOCKAUTO + $GUI_DOCKRIGHT + $GUI_DOCKBOTTOM)
Opt("GUIResizeMode", $GUI_DOCKAUTO + $GUI_DOCKRIGHT + $GUI_DOCKBOTTOM)
Opt("GUIResizeMode", $GUI_DOCKAUTO + $GUI_DOCKRIGHT + $GUI_DOCKBOTTOM)
#region ### START Koda GUI section ### Form=C:\Users\BLAH\StormCopper Work\stormcopper search engine.kxf
$Form1_1 = GUICreate("Trumpf500 Search Engin", 312, 149, 753, 520)
GUISetOnEvent($GUI_EVENT_CLOSE, "Form1_1Close")
GUISetOnEvent($GUI_EVENT_MINIMIZE, "Form1_1Minimize")
GUISetOnEvent($GUI_EVENT_MAXIMIZE, "Form1_1Maximize")
GUISetOnEvent($GUI_EVENT_RESTORE, "Form1_1Restore")
$Label1 = GUICtrlCreateLabel("Trumpf500 Search Engine", 8, 8, 213, 24)
GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif")
GUICtrlSetColor(-1, 0x3399FF)
GUICtrlSetOnEvent(-1, "Label1Click")
$Input1 = GUICtrlCreateInput("*.au3", 8, 40, 209, 21)
GUICtrlSetOnEvent(-1, "Input1Change")
$Button2 = GUICtrlCreateButton("SEARCH", 32, 72, 161, 57)
GUICtrlSetOnEvent(-1, "Button2Click")
$Button1 = GUICtrlCreateButton("Close", 248, 8, 59, 25)
GUICtrlSetOnEvent(-1, "Button1Click")
GUISetState(@SW_SHOW)
#endregion ### END Koda GUI section ###
While 1
    Sleep(100)
WEnd
Func Button1Click()
    Exit
EndFunc   ;==>Button1Click
Func Button2Click()
    $ReadInput1 = GUICtrlRead($Input1)
    $aList = _RecFileListToArray(@HomeDrive, $ReadInput1, 1, 1, 1, 2)
    If IsArray($aList) Then
        _ArrayDisplay($aList, "$FileList")
    EndIf
EndFunc   ;==>Button2Click
Func Form1_1Close()
    Exit
EndFunc   ;==>Form1_1Close
Func Form1_1Maximize()
EndFunc   ;==>Form1_1Maximize
Func Form1_1Minimize()
EndFunc   ;==>Form1_1Minimize
Func Form1_1Restore()
EndFunc   ;==>Form1_1Restore
Func Input1Change()
EndFunc   ;==>Input1Change
Func Label1Click()
EndFunc   ;==>Label1Click

It displays the results with _ArrayDisplay as you can see. I have done my studies and found that you cannot add functionailty to this as it stops your script from running. So, if i'm on the right track, I must temporarily store the results to be referenced by a custom GUI with said desired functionalities...correct? or no?

pointers, tips, criticisms welcome!
by the way THANK YOU MELBA23 ! and the members who have helped me get this far!

 

Edit: and no I'm not getting paid for this coding, I get paid to run one of these:
trumpf.jpg
 

Here are some of the things I would like to change:
 - The wildcard * is needed after whatever the user types into the input field, I would like to have this automatically added by the code rather than hoping the user knows that they need a wildcard, much less what one is or even that * is one. So how can I have the code structured so as that it adds a * at the end of the users input?

 - A normal return presents something similar to this:
        

         ExampleFile.txt
         ExampleFile.lst
         ExampleFile.html

This is because the files we use have a text doc, a program file, and a html spreadsheet like file. I need to add functionalities unique to each file type. So how do I take the results (which in my case i believe would be $aList) and store them as retrievable variables or arrays?

Edited by Wombat

Just look at us.
Everything is backwards; everything is upside down. Doctors destroy health. Lawyers destroy justice. Universities destroy knowledge. Governments destroy freedom. The major media destroy information and religions destroy spirituality. ~ Michael Ellner


The internet is our one and only hope at a truly free world, do not let them take it from us...

Share this post


Link to post
Share on other sites



To always add the "*" at the end of the user input, you'd use something like:

If StringRight($input, 1) <> "*" Then $input &= "*"

That way you know that $input will always end in that character. Basically, you check if the last character is "*", and if it isn't then add "*" to the end of the string.

As to the second, what do you want to do with $aList? To loop through it, look at a For...Next loop.

Share this post


Link to post
Share on other sites

Have you thought above using something already on the market? Everything is an application that comes to my mind.


_AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_ConvertLHWebColor()/_ConvertSHWebColor()_DesktopDimensions()_DisplayPassword()_DotNet_Load()/_DotNet_Unload()_Fibonacci()_FileCompare()_FileCompareContents()_FileNameByHandle()_FilePrefix/SRE()_FindInFile()_GetBackgroundColor()/_SetBackgroundColor()_GetConrolID()_GetCtrlClass()_GetDirectoryFormat()_GetDriveMediaType()_GetFilename()/_GetFilenameExt()_GetHardwareID()_GetIP()_GetIP_Country()_GetOSLanguage()_GetSavedSource()_GetStringSize()_GetSystemPaths()_GetURLImage()_GIFImage()_GoogleWeather()_GUICtrlCreateGroup()_GUICtrlListBox_CreateArray()_GUICtrlListView_CreateArray()_GUICtrlListView_SaveCSV()_GUICtrlListView_SaveHTML()_GUICtrlListView_SaveTxt()_GUICtrlListView_SaveXML()_GUICtrlMenu_Recent()_GUICtrlMenu_SetItemImage()_GUICtrlTreeView_CreateArray()_GUIDisable()_GUIImageList_SetIconFromHandle()_GUIRegisterMsg()_GUISetIcon()_Icon_Clear()/_Icon_Set()_IdleTime()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_IsSystemDrive()_IsUPX()_IsValidType()_IsWebColor()_Language()_Log()_MicrosoftInternetConnectivity()_MSDNDataType()_PathFull/GetRelative/Split()_PathSplitEx()_PrintFromArray()_ProgressSetMarquee()_ReDim()_RockPaperScissors()/_RockPaperScissorsLizardSpock()_ScrollingCredits_SelfDelete()_SelfRename()_SelfUpdate()_SendTo()_ShellAll()_ShellFile()_ShellFolder()_SingletonHWID()_SingletonPID()_Startup()_StringCompact()_StringIsValid()_StringRegExpMetaCharacters()_StringReplaceWholeWord()_StringStripChars()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_Create_CTL_CODE()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()Au3 script parsingAutoIt SearchAutoIt3 PortableAutoIt3WrapperToPragmaAutoItWinGetTitle()/AutoItWinSetTitle()CodingDirToHTML5FileInstallrFileReadLastChars()GeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()Int_Parse() & Int_TryParse()IsISBN()LockFile()Mapping CtrlIDsOOP in AutoItParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandProtect GlobalsQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...

Updated: 04/09/2015

Share this post


Link to post
Share on other sites

To always add the "*" at the end of the user input, you'd use something like:

If StringRight($input, 1) <> "*" Then $input &= "*"

That way you know that $input will always end in that character. Basically, you check if the last character is "*", and if it isn't then add "*" to the end of the string.

As to the second, what do you want to do with $aList? To loop through it, look at a For...Next loop.

This is very helpful, thank you.

Have you thought above using something already on the market? Everything is an application that comes to my mind.

A viable solution if a quick fix were what they're looking for. It's not though, they want custom coded software that works how they want it to. Autoit gives us that capability to start with. Also, I dont know if you were in my last thread but this is as well a test to prove tom my employer that I do understand coding and software developement, not a scouting mission for software. I'm trying to earn an offered position in their software dev department.

Thank you though


Just look at us.
Everything is backwards; everything is upside down. Doctors destroy health. Lawyers destroy justice. Universities destroy knowledge. Governments destroy freedom. The major media destroy information and religions destroy spirituality. ~ Michael Ellner


The internet is our one and only hope at a truly free world, do not let them take it from us...

Share this post


Link to post
Share on other sites

This is very helpful, thank you.

A viable solution if a quick fix were what they're looking for. It's not though, they want custom coded software that works how they want it to. Autoit gives us that capability to start with. Also, I dont know if you were in my last thread but this is as well a test to prove tom my employer that I do understand coding and software developement, not a scouting mission for software. I'm trying to earn an offered position in their software dev department.

Thank you though

Nope, I wasn't. Sorry.


_AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_ConvertLHWebColor()/_ConvertSHWebColor()_DesktopDimensions()_DisplayPassword()_DotNet_Load()/_DotNet_Unload()_Fibonacci()_FileCompare()_FileCompareContents()_FileNameByHandle()_FilePrefix/SRE()_FindInFile()_GetBackgroundColor()/_SetBackgroundColor()_GetConrolID()_GetCtrlClass()_GetDirectoryFormat()_GetDriveMediaType()_GetFilename()/_GetFilenameExt()_GetHardwareID()_GetIP()_GetIP_Country()_GetOSLanguage()_GetSavedSource()_GetStringSize()_GetSystemPaths()_GetURLImage()_GIFImage()_GoogleWeather()_GUICtrlCreateGroup()_GUICtrlListBox_CreateArray()_GUICtrlListView_CreateArray()_GUICtrlListView_SaveCSV()_GUICtrlListView_SaveHTML()_GUICtrlListView_SaveTxt()_GUICtrlListView_SaveXML()_GUICtrlMenu_Recent()_GUICtrlMenu_SetItemImage()_GUICtrlTreeView_CreateArray()_GUIDisable()_GUIImageList_SetIconFromHandle()_GUIRegisterMsg()_GUISetIcon()_Icon_Clear()/_Icon_Set()_IdleTime()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_IsSystemDrive()_IsUPX()_IsValidType()_IsWebColor()_Language()_Log()_MicrosoftInternetConnectivity()_MSDNDataType()_PathFull/GetRelative/Split()_PathSplitEx()_PrintFromArray()_ProgressSetMarquee()_ReDim()_RockPaperScissors()/_RockPaperScissorsLizardSpock()_ScrollingCredits_SelfDelete()_SelfRename()_SelfUpdate()_SendTo()_ShellAll()_ShellFile()_ShellFolder()_SingletonHWID()_SingletonPID()_Startup()_StringCompact()_StringIsValid()_StringRegExpMetaCharacters()_StringReplaceWholeWord()_StringStripChars()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_Create_CTL_CODE()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()Au3 script parsingAutoIt SearchAutoIt3 PortableAutoIt3WrapperToPragmaAutoItWinGetTitle()/AutoItWinSetTitle()CodingDirToHTML5FileInstallrFileReadLastChars()GeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()Int_Parse() & Int_TryParse()IsISBN()LockFile()Mapping CtrlIDsOOP in AutoItParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandProtect GlobalsQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...

Updated: 04/09/2015

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

 

As to the second, what do you want to do with $aList? To loop through it, look at a For...Next loop.

 

If i'm correct in assuming that $aList is my results, then I would like to be able to define a certain function in a gui for each type of file. So after I create the gui, I would have, as an example, a button for each that would open the file in a predefined manner, such as the html in IE the .lst in its own associated program, and the others in theirs. I'm thinking first I would need to divide the results into seperate arrays? Or are they already divided? As they are presented with a corresponding number in the results window, and that's what the _RecFilesToArray does... correct?

Curently it displays them with _ArrayDisplay, I want it to call up a child GUI and display a set of options(buttons) for handeling the results.

Edited by Wombat

Just look at us.
Everything is backwards; everything is upside down. Doctors destroy health. Lawyers destroy justice. Universities destroy knowledge. Governments destroy freedom. The major media destroy information and religions destroy spirituality. ~ Michael Ellner


The internet is our one and only hope at a truly free world, do not let them take it from us...

Share this post


Link to post
Share on other sites

Am I correct to assume that the results show as:

[0] | 4 (example, this is the # of results)
[1] | Example.lst
[2] | Example.html
[3] | Example.bmp

Because the [1] - [3] in the example above are the array id numbers assigned to the results?


Just look at us.
Everything is backwards; everything is upside down. Doctors destroy health. Lawyers destroy justice. Universities destroy knowledge. Governments destroy freedom. The major media destroy information and religions destroy spirituality. ~ Michael Ellner


The internet is our one and only hope at a truly free world, do not let them take it from us...

Share this post


Link to post
Share on other sites

#8 ·  Posted (edited)

Anyone???

 

EDIT:

I'm thinking i need to use something like this:
 

; #FUNCTION# ====================================================================================================================
; Name ..........: _FileWriteFromArray
; Description ...: Writes an array to a specified file.
; Syntax ........: _FileWriteFromArray($sFilePath, $aArray[, $iBase = 0[, $iUBound = 0[, $sDelimeter = "|"]]])
; Parameters ....: $sFilePath - Path of the file to write to, or a file handle returned by FileOpen().
;                  $aArray - [in/out and const] The array to be written to the file.
;                  $iBase - [optional] Start array index to read, normally set to 0 or 1. Default is 0.
;                  $iUBound - [optional] Set to the last record you want to write to the File. Default is 0 (whole array.)
;                  $sDelimeter - [optional] Delimiter character(s) for 2-dimension arrays. Default is "|".
; Return values .: Success - Returns a 1
;                  Failure - Returns a 0
;                  @error  - 0 = No error.
;                  |1 = Error opening specified file
;                  |2 = Input is not an Array
;                  |3 = Error writing to file
;                  |4 = Array dimensions > 2
;                  |5 = Start index is greater than the $iUbound parameter
; Author ........: Jos van der Zande <jdeb at autoitscript dot com>
; Modified.......: Updated for file handles by PsaltyDS, @error = 4 msg and 2-dimension capability added by Spiff59 and fixed by guinness.
; Remarks .......: If a string path is provided, the file is overwritten and closed.
;                  To use other write modes, like append or Unicode formats, open the file with FileOpen() first and pass the file handle instead.
;                  If a file handle is passed, the file will still be open after writing.
; Related .......: _FileReadToArray
; Link ..........:
; Example .......: Yes
; ===============================================================================================================================
Func _FileWriteFromArray($sFilePath, Const ByRef $aArray, $iBase = Default, $iUBound = Default, $sDelimeter = "|")
    ; Check if we have a valid array as input
    If Not IsArray($aArray) Then Return SetError(2, 0, 0)

    ; Check the number of dimensions
    Local $iDims = UBound($aArray, 0)
    If $iDims > 2 Then Return SetError(4, 0, 0)

    ; Determine last entry of the array
    Local $iLast = UBound($aArray) - 1
    If $iUBound = Default Or $iUBound > $iLast Then $iUBound = $iLast
    If $iBase < 0 Or $iBase = Default Then $iBase = 0
    If $iBase > $iUBound Then Return SetError(5, 0, 0)
    If $sDelimeter = Default Then $sDelimeter = "|"

    ; Open output file for overwrite by default, or use input file handle if passed
    Local $hFileOpen = 0
    If IsString($sFilePath) Then
        $hFileOpen = FileOpen($sFilePath, $FO_OVERWRITE)
    Else
        $hFileOpen = $sFilePath
    EndIf
    If $hFileOpen = -1 Then Return SetError(1, 0, 0)

    ; Write array data to file
    Local $iError = 0
    Switch $iDims
        Case 1
            For $i = $iBase To $iUBound
                If FileWrite($hFileOpen, $aArray[$i] & @CRLF) = 0 Then
                    $iError = 3
                    ExitLoop
                EndIf
            Next
        Case 2
            Local $sTemp
            Local $iCols = UBound($aArray, 2)
            For $i = $iBase To $iUBound
                $sTemp = $aArray[$i][0]
                For $j = 1 To $iCols - 1
                    $sTemp &= $sDelimeter & $aArray[$i][$j]
                Next
                If FileWrite($hFileOpen, $sTemp & @CRLF) = 0 Then
                    $iError = 3
                    ExitLoop
                EndIf
            Next
    EndSwitch

    ; Close file only if specified by a string path
    If IsString($sFilePath) Then FileClose($hFileOpen)

    ; Return results
    If $iError Then Return SetError($iError, 0, 0)
    Return 1
EndFunc   ;==>_FileWriteFromArray

to write my results to a temp file then find a way to search the temp file for lines corresponding to specific functions of the buttons???

Edited by Wombat

Just look at us.
Everything is backwards; everything is upside down. Doctors destroy health. Lawyers destroy justice. Universities destroy knowledge. Governments destroy freedom. The major media destroy information and religions destroy spirituality. ~ Michael Ellner


The internet is our one and only hope at a truly free world, do not let them take it from us...

Share this post


Link to post
Share on other sites

BUMP


Just look at us.
Everything is backwards; everything is upside down. Doctors destroy health. Lawyers destroy justice. Universities destroy knowledge. Governments destroy freedom. The major media destroy information and religions destroy spirituality. ~ Michael Ellner


The internet is our one and only hope at a truly free world, do not let them take it from us...

Share this post


Link to post
Share on other sites

Perhaps you can get some use from a program I've made and have been updating for a while now.

I'm very bad at commenting my scripts but if you have any questions, feel free to ask.

If you want to run it to see how it works, you need to install it through the installer (which you can download through my sig), otherwise it will error out.

Allin1v3.0.2.0_Source.zip


010101000110100001101001011100110010000001101001011100110010000

001101101011110010010000001110011011010010110011100100001

My Android cat and mouse game
https://play.google.com/store/apps/details?id=com.KaosVisions.WhiskersNSqueek

We're gonna need another Timmy!

Share this post


Link to post
Share on other sites

#11 ·  Posted (edited)

I've accomplished

1) appending * to the user input field
2)writing my search results to a .txt file

Now I'm working on a dynamic child  GUI that will display the results stored in the .txt file. The trouble I expect to run into is that it writes the results in the .txt file as shown:

C:blahblahblahExamplFile.lst
C:blahblahblahExamplFile.bmp
C:blahblahblahExamplFile.html

How would i pull each line seperately from that????
So that I can assign button1 of the child to line one (C:blahblahblahExamplFile.lst
) button2 of the child (C:blahblahblahExamplFile.html) etc etc.....?

EDIT: my preferred solution would look at the file types and pull the corresponding line, so that its not just going line by line but if the html is above the bmp it knows not to assign the html file to the bmp button....



My code currently is as shown:
 

#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_Icon=SCCicon.ico
#AutoIt3Wrapper_Outfile=StormCopperTSE.exe
#AutoIt3Wrapper_Res_Comment=To be used only by StormCopper
#AutoIt3Wrapper_Res_Description=Enhanced search engine
#AutoIt3Wrapper_Res_Language=1033
#AutoIt3Wrapper_Res_requestedExecutionLevel=highestAvailable
#AutoIt3Wrapper_Run_AU3Check=n
#AutoIt3Wrapper_Tidy_Stop_OnError=n
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <RecFileListToArray.au3>
#include <Array.au3>

Opt("GUIOnEventMode", 1)
Opt("GUIResizeMode", $GUI_DOCKAUTO + $GUI_DOCKRIGHT + $GUI_DOCKBOTTOM)
Opt("GUIResizeMode", $GUI_DOCKAUTO + $GUI_DOCKRIGHT + $GUI_DOCKBOTTOM)
Opt("GUIResizeMode", $GUI_DOCKAUTO + $GUI_DOCKRIGHT + $GUI_DOCKBOTTOM)
Opt("GUIResizeMode", $GUI_DOCKAUTO + $GUI_DOCKRIGHT + $GUI_DOCKBOTTOM)
Opt("GUIResizeMode", $GUI_DOCKAUTO + $GUI_DOCKRIGHT + $GUI_DOCKBOTTOM)
Opt("GUIResizeMode", $GUI_DOCKAUTO + $GUI_DOCKRIGHT + $GUI_DOCKBOTTOM)
Opt("GUIResizeMode", $GUI_DOCKAUTO + $GUI_DOCKRIGHT + $GUI_DOCKBOTTOM)
Opt("GUIResizeMode", $GUI_DOCKAUTO + $GUI_DOCKRIGHT + $GUI_DOCKBOTTOM)
Opt("GUIResizeMode", $GUI_DOCKAUTO + $GUI_DOCKRIGHT + $GUI_DOCKBOTTOM)
Opt("GUIResizeMode", $GUI_DOCKAUTO + $GUI_DOCKRIGHT + $GUI_DOCKBOTTOM)
Opt("GUIResizeMode", $GUI_DOCKAUTO + $GUI_DOCKRIGHT + $GUI_DOCKBOTTOM)
Opt("GUIResizeMode", $GUI_DOCKAUTO + $GUI_DOCKRIGHT + $GUI_DOCKBOTTOM)
Opt("GUIResizeMode", $GUI_DOCKAUTO + $GUI_DOCKRIGHT + $GUI_DOCKBOTTOM)
Opt("GUIResizeMode", $GUI_DOCKAUTO + $GUI_DOCKRIGHT + $GUI_DOCKBOTTOM)
#region ### START Koda GUI section ### Form=C:\Users\BLAH\StormCopper Work\stormcopper search engine.kxf
$Form1_1 = GUICreate("Trumpf500 Search Engin", 312, 149, 753, 520)
GUISetOnEvent($GUI_EVENT_CLOSE, "Form1_1Close")
GUISetOnEvent($GUI_EVENT_MINIMIZE, "Form1_1Minimize")
GUISetOnEvent($GUI_EVENT_MAXIMIZE, "Form1_1Maximize")
GUISetOnEvent($GUI_EVENT_RESTORE, "Form1_1Restore")
$Label1 = GUICtrlCreateLabel("Trumpf500 Search Engine", 8, 8, 213, 24)
GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif")
GUICtrlSetColor(-1, 0x3399FF)
GUICtrlSetOnEvent(-1, "Label1Click")
$Input1 = GUICtrlCreateInput("*.au3", 8, 40, 209, 21)
GUICtrlSetOnEvent(-1, "Input1Change")
$Button2 = GUICtrlCreateButton("SEARCH", 32, 72, 161, 57)
GUICtrlSetOnEvent(-1, "Button2Click")
$Button1 = GUICtrlCreateButton("Close", 248, 8, 59, 25)
GUICtrlSetOnEvent(-1, "Button1Click")
GUISetState(@SW_SHOW)
#endregion ### END Koda GUI section ###
While 1
    Sleep(100)
WEnd
Func Button1Click()
    Exit
EndFunc   ;==>Button1Click
Func Button2Click()
    $ReadInput1 = GUICtrlRead($Input1)
    $aList = _RecFileListToArray(@HomeDrive, $ReadInput1 & "*", 1, 1, 1, 2)
    If IsArray($aList) Then
        _FileWriteFromArray("C:\blah\blah\desktop\test.txt", $aList)
    EndIf
EndFunc   ;==>Button2Click
Func Form1_1Close()
    Exit
EndFunc   ;==>Form1_1Close
Func Form1_1Maximize()
EndFunc   ;==>Form1_1Maximize
Func Form1_1Minimize()
EndFunc   ;==>Form1_1Minimize
Func Form1_1Restore()
EndFunc   ;==>Form1_1Restore
Func Input1Change()
EndFunc   ;==>Input1Change
Func Label1Click()
EndFunc   ;==>Label1Click
Edited by Wombat

Just look at us.
Everything is backwards; everything is upside down. Doctors destroy health. Lawyers destroy justice. Universities destroy knowledge. Governments destroy freedom. The major media destroy information and religions destroy spirituality. ~ Michael Ellner


The internet is our one and only hope at a truly free world, do not let them take it from us...

Share this post


Link to post
Share on other sites

bump?


Just look at us.
Everything is backwards; everything is upside down. Doctors destroy health. Lawyers destroy justice. Universities destroy knowledge. Governments destroy freedom. The major media destroy information and religions destroy spirituality. ~ Michael Ellner


The internet is our one and only hope at a truly free world, do not let them take it from us...

Share this post


Link to post
Share on other sites

#13 ·  Posted (edited)

I'm not sure what you are trying to accomplish, but here goes.

Your search results could be displayed in a GUI containing a LIstView, and a button.  Whenever the user selects one file in your results list, and clicks on the button, you can act accordingly by checking the file's extension on the fly.  All very simple, but maybe I'm missing the point...

If you want to have a button for *every* file in your result list, you're gonna have to create a whole lot of buttons! :-)

Edited by kyo

Share this post


Link to post
Share on other sites

This thread can be closed, and all following comments directed here as it better explains what I looking for : '?do=embed' frameborder='0' data-embedContent>>


Just look at us.
Everything is backwards; everything is upside down. Doctors destroy health. Lawyers destroy justice. Universities destroy knowledge. Governments destroy freedom. The major media destroy information and religions destroy spirituality. ~ Michael Ellner


The internet is our one and only hope at a truly free world, do not let them take it from us...

Share this post


Link to post
Share on other sites

#15 ·  Posted (edited)

Just mark a post as solved and most will believe it has been solved.

Edit: Hmm, I just read the other post. 

Edited by guinness

_AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_ConvertLHWebColor()/_ConvertSHWebColor()_DesktopDimensions()_DisplayPassword()_DotNet_Load()/_DotNet_Unload()_Fibonacci()_FileCompare()_FileCompareContents()_FileNameByHandle()_FilePrefix/SRE()_FindInFile()_GetBackgroundColor()/_SetBackgroundColor()_GetConrolID()_GetCtrlClass()_GetDirectoryFormat()_GetDriveMediaType()_GetFilename()/_GetFilenameExt()_GetHardwareID()_GetIP()_GetIP_Country()_GetOSLanguage()_GetSavedSource()_GetStringSize()_GetSystemPaths()_GetURLImage()_GIFImage()_GoogleWeather()_GUICtrlCreateGroup()_GUICtrlListBox_CreateArray()_GUICtrlListView_CreateArray()_GUICtrlListView_SaveCSV()_GUICtrlListView_SaveHTML()_GUICtrlListView_SaveTxt()_GUICtrlListView_SaveXML()_GUICtrlMenu_Recent()_GUICtrlMenu_SetItemImage()_GUICtrlTreeView_CreateArray()_GUIDisable()_GUIImageList_SetIconFromHandle()_GUIRegisterMsg()_GUISetIcon()_Icon_Clear()/_Icon_Set()_IdleTime()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_IsSystemDrive()_IsUPX()_IsValidType()_IsWebColor()_Language()_Log()_MicrosoftInternetConnectivity()_MSDNDataType()_PathFull/GetRelative/Split()_PathSplitEx()_PrintFromArray()_ProgressSetMarquee()_ReDim()_RockPaperScissors()/_RockPaperScissorsLizardSpock()_ScrollingCredits_SelfDelete()_SelfRename()_SelfUpdate()_SendTo()_ShellAll()_ShellFile()_ShellFolder()_SingletonHWID()_SingletonPID()_Startup()_StringCompact()_StringIsValid()_StringRegExpMetaCharacters()_StringReplaceWholeWord()_StringStripChars()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_Create_CTL_CODE()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()Au3 script parsingAutoIt SearchAutoIt3 PortableAutoIt3WrapperToPragmaAutoItWinGetTitle()/AutoItWinSetTitle()CodingDirToHTML5FileInstallrFileReadLastChars()GeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()Int_Parse() & Int_TryParse()IsISBN()LockFile()Mapping CtrlIDsOOP in AutoItParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandProtect GlobalsQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...

Updated: 04/09/2015

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