Jump to content

Displaying dynamic search results - Help


Recommended Posts

Alright so currently I've come this far in my project with my small search engine

8ldp.png

The code is as follows :
 

#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:

l4a.png

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!
 

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...

Link to comment
Share on other sites

By the way I'm using Melba23's RecFileListToArray UDF

I know a LONG work around would be to take the input and append each file type to it and have the script search for each and store in separate output files, but that would take much too long

So what I'm hoping to be able to do is search the output file each file type and use them accordingly.

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...

Link to comment
Share on other sites

anyone?

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...

Link to comment
Share on other sites

  • Moderators

Wombat,

Please do not bump your own threads within 24 hours - particularly when you have already started a second thread on the same topic. :naughty:

Remember this is not a 24/7 support forum - those who answer are only here because they like helping others and have some time to spare. You just have to wait until someone who knows something about your particular problem, and is willing to help, comes online. Be patient and someone will answer eventually. ;)

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see 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

 

Link to comment
Share on other sites

You want to show your boss you have coding skills, so my advice is open the help file and read the Forum, because what you want can easily be created by just spending that little of extra time reading.

UDF List:

 
_AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_ArrayFilter/_ArrayReduce_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: 22/04/2018

Link to comment
Share on other sites

Wombat,

Please do not bump your own threads within 24 hours - particularly when you have already started a second thread on the same topic. :naughty:

Remember this is not a 24/7 support forum - those who answer are only here because they like helping others and have some time to spare. You just have to wait until someone who knows something about your particular problem, and is willing to help, comes online. Be patient and someone will answer eventually. ;)

M23

my apologies, I felt the reason no one was commenting in my previous thread was that it was too vague, all the more I will refrain from bumping without a 24hr interval. Again i apologize

 

You want to show your boss you have coding skills, so my advice is open the help file and read the Forum, because what you want can easily be created by just spending that little of extra time reading.

I have, and still am, what I'm asking for is help, not for anyone to do it for me. Sometimes we may overlook the answer, or not know the right question to ask, hence the reason we seek advice from more experienced persons.... I only ask when I am stuck and feel I have exhausted my options.

anywho can/will anyone be so nice as to let me in on why this code is only $GUI_SHOW'ing Button1 and not the others?

 

#include <ButtonConstants.au3>
#include <ComboConstants.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.gif", 12, 12, 49, 49)
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")
$Pic5 = GUICtrlCreatePic("C:\Users\Wombat\Documents\searchbar_half_2.5.jpg", 531, 104, 95, 45)
GUICtrlSetCursor(-1, 0)
GUICtrlSetOnEvent(-1, "Pic5Click")
$htmlButton = GUICtrlCreateButton("View Data Sheet", 352, 178, 224, 60, $BS_ICON)
GUICtrlSetImage(-1, "C:\Users\Wombat\Pictures\Document-48.ico", -1)
GUICtrlSetFont(-1, 12, 400, 0, "Tahoma")
GUICtrlSetState(-1, $GUI_HIDE)
GUICtrlSetCursor(-1, 0)
GUICtrlSetOnEvent(-1, "htmlButtonClick")
$Label1 = GUICtrlCreateLabel("View Data Sheet", 352, 157, 111, 22)
GUICtrlSetFont(-1, 11, 400, 0, "Tahoma")
GUICtrlSetColor(-1, 0x00FFFF)
GUICtrlSetState(-1, $GUI_HIDE)
GUICtrlSetOnEvent(-1, "Label1Click")
$ProgSelect = GUICtrlCreateCombo("ProgSelect", 353, 275, 224, 25, BitOR($CBS_DROPDOWN, $CBS_AUTOHSCROLL))
GUICtrlSetState(-1, $GUI_HIDE)
GUICtrlSetCursor(-1, 0)
GUICtrlSetOnEvent(-1, "ProgSelectChange")
$Label2 = GUICtrlCreateLabel("Select Program to Load", 351, 251, 156, 22)
GUICtrlSetFont(-1, 11, 400, 0, "Tahoma")
GUICtrlSetColor(-1, 0x00FFFF)
GUICtrlSetState(-1, $GUI_HIDE)
GUICtrlSetOnEvent(-1, "Label2Click")
$PartPreview = GUICtrlCreatePic("", 54, 145, 200, 200)
GUICtrlSetState(-1, $GUI_HIDE)
GUICtrlSetOnEvent(-1, "PartPreviewClick")
$Label3 = GUICtrlCreateLabel("Part Preview", 112, 110, 84, 22)
GUICtrlSetFont(-1, 11, 400, 0, "Tahoma")
GUICtrlSetColor(-1, 0x00FFFF)
GUICtrlSetState(-1, $GUI_HIDE)
GUICtrlSetOnEvent(-1, "Label3Click")
$Pic2 = GUICtrlCreatePic("C:\Users\Wombat\Documents\close-button2.jpg", 519, 7, 102, 51)
GUICtrlSetCursor(-1, 0)
GUICtrlSetOnEvent(-1, "Pic2Click")
$Button1 = GUICtrlCreateButton("Button1", 607, 317, 43, 43, $BS_ICON)
GUICtrlSetImage(-1, "C:\Users\Wombat\Pictures\reload_32.ico", -1)
GUICtrlSetState(-1, $GUI_HIDE)
GUICtrlSetCursor(-1, 0)
GUICtrlSetOnEvent(-1, "Button1Click")
$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 Button1Click()
    $Button1 = GUICtrlSetState(-1, $GUI_HIDE)
    $Label3 = GUICtrlSetState(-1, $GUI_HIDE)
    $Label2 = GUICtrlSetState(-1, $GUI_HIDE)
    $Label1 = GUICtrlSetState(-1, $GUI_HIDE)
    $PartPreview = GUICtrlSetState(-1, $GUI_HIDE)
    $ProgSelect = GUICtrlSetState(-1, $GUI_HIDE)
    $htmlButton = GUICtrlSetState(-1, $GUI_HIDE)
EndFunc   ;==>Button1Click
Func Form1Close()

EndFunc   ;==>Form1Close
Func Form1Maximize()

EndFunc   ;==>Form1Maximize
Func Form1Minimize()

EndFunc   ;==>Form1Minimize
Func Form1Restore()

EndFunc   ;==>Form1Restore
Func htmlButtonClick()

EndFunc   ;==>htmlButtonClick
Func Input1Change()

EndFunc   ;==>Input1Change
Func Label1Click()

EndFunc   ;==>Label1Click
Func Label2Click()

EndFunc   ;==>Label2Click
Func Label3Click()

EndFunc   ;==>Label3Click
Func PartPreviewClick()

EndFunc   ;==>PartPreviewClick
Func Pic1Click()

EndFunc   ;==>Pic1Click
Func Pic2Click()
    Exit
EndFunc   ;==>Pic2Click
Func Pic3Click()

EndFunc   ;==>Pic3Click
Func Pic4Click()

EndFunc   ;==>Pic4Click
Func Pic5Click()
    $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)
        $Button1 = GUICtrlSetState(-1, $GUI_SHOW)
        $Label3 = GUICtrlSetState(-1, $GUI_SHOW)
        $Label2 = GUICtrlSetState(-1, $GUI_SHOW)
        $Label1 = GUICtrlSetState(-1, $GUI_SHOW)
        $PartPreview = GUICtrlSetState(-1, $GUI_SHOW)
        $ProgSelect = GUICtrlSetState(-1, $GUI_SHOW)
        $htmlButton = GUICtrlSetState(-1, $GUI_SHOW)
    EndIf
EndFunc   ;==>Pic5Click
Func ProgSelectChange()

EndFunc   ;==>ProgSelectChange
Func StormCopperClick()

EndFunc   ;==>StormCopperClick

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...

Link to comment
Share on other sites

I think the issue is communication breakdown. It appears as you are searching C: for file names typed in the search box. But your gui has a box for the html (from what file, where is that coming from? how does that correspond to nearly every file type except an .htm file on the pc?)

then the same thing with the bmp box, what bmp are you loading is it only if the user searches for a bmp file?

I assume you are saving the search results to some .list file and that is what's being put into the dropdown.

I don't see where this is adding any functionality, just a couple ways to display 2 specific file type results.

My suggestion would be have a small gui with a searchbox at the top, populate a listview with the search results.

Then you can launch the file with a double click using the default program, and/or create a right click menu for however you would like to interact with the selected file (move, delete, rename, open, copy, whatever)

If at a later date you think of something else you would like to add, you can simply add it to your right click menu and add a function in your script to handle the new option.

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!

Link to comment
Share on other sites

I think the issue is communication breakdown. It appears as you are searching C: for file names typed in the search box. But your gui has a box for the html (from what file, where is that coming from? how does that correspond to nearly every file type except an .htm file on the pc?)

then the same thing with the bmp box, what bmp are you loading is it only if the user searches for a bmp file?

I assume you are saving the search results to some .list file and that is what's being put into the dropdown.

I don't see where this is adding any functionality, just a couple ways to display 2 specific file type results.

My suggestion would be have a small gui with a searchbox at the top, populate a listview with the search results.

Then you can launch the file with a double click using the default program, and/or create a right click menu for however you would like to interact with the selected file (move, delete, rename, open, copy, whatever)

If at a later date you think of something else you would like to add, you can simply add it to your right click menu and add a function in your script to handle the new option.

 

Actually the buttons do not do anything currently, as of now the program searches for three different file types that include the users input.

 

Those would be: a .bmp file, a .html file, and a .lst file

after it finds these files it writes the results to three separate .TXT files storing the results for use later. I am trying to avoid using a list view as that's the easy way out and I'm trying to use the single window so that I can learn to call up the results in a custom way.

Here's the jist of what I'm trying to do with the results:

I'm wanting the labels, .html button, and combo box to be hidden until a search returns results. Once results are returned they appear and each item is connected to its appropriate .txt file.

So the .html button would read the output file with the stored results of the .html file that was searched for, it then would, upon clicking, read the directory stored within the .txt file and open it. I understand that the content of the .txt file would likely need to be set to a unique variable.

What I'm currently having trouble with is hiding and showing ALL the controls besides the search and exit button. It for some reason only hides and shows the refresh button labeled as Button1. All other controls do not show.

Here is my current code:

 

#include <ButtonConstants.au3>
#include <ComboConstants.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.gif", 12, 12, 49, 49)
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")
$Pic5 = GUICtrlCreatePic("C:\Users\Wombat\Documents\searchbar_half_2.5.jpg", 531, 104, 95, 45)
GUICtrlSetCursor(-1, 0)
GUICtrlSetOnEvent(-1, "Pic5Click")
$htmlButton = GUICtrlCreateButton("View Data Sheet", 352, 178, 224, 60, $BS_ICON)
GUICtrlSetImage(-1, "C:\Users\Wombat\Pictures\Document-48.ico", -1)
GUICtrlSetFont(-1, 12, 400, 0, "Tahoma")
GUICtrlSetCursor(-1, 0)
GUICtrlSetOnEvent(-1, "htmlButtonClick")
$Label1 = GUICtrlCreateLabel("View Data Sheet", 352, 157, 111, 22)
GUICtrlSetFont(-1, 11, 400, 0, "Tahoma")
GUICtrlSetColor(-1, 0x00FFFF)
GUICtrlSetOnEvent(-1, "Label1Click")
$ProgSelect = GUICtrlCreateCombo("ProgSelect", 353, 275, 224, 25, BitOR($CBS_DROPDOWN, $CBS_AUTOHSCROLL))
GUICtrlSetCursor(-1, 0)
GUICtrlSetOnEvent(-1, "ProgSelectChange")
$Label2 = GUICtrlCreateLabel("Select Program to Load", 351, 251, 156, 22)
GUICtrlSetFont(-1, 11, 400, 0, "Tahoma")
GUICtrlSetColor(-1, 0x00FFFF)
GUICtrlSetOnEvent(-1, "Label2Click")
$PartPreview = GUICtrlCreatePic("", 54, 145, 200, 200)
GUICtrlSetOnEvent(-1, "PartPreviewClick")
$Label3 = GUICtrlCreateLabel("Part Preview", 112, 110, 84, 22)
GUICtrlSetFont(-1, 11, 400, 0, "Tahoma")
GUICtrlSetColor(-1, 0x00FFFF)
GUICtrlSetOnEvent(-1, "Label3Click")
$Pic2 = GUICtrlCreatePic("C:\Users\Wombat\Documents\close-button2.jpg", 519, 7, 102, 51)
GUICtrlSetCursor(-1, 0)
GUICtrlSetOnEvent(-1, "Pic2Click")
$Button1 = GUICtrlCreateButton("Button1", 607, 317, 43, 43, $BS_ICON)
GUICtrlSetImage(-1, "C:\Users\Wombat\Pictures\reload_32.ico", -1)
GUICtrlSetCursor(-1, 0)
GUICtrlSetOnEvent(-1, "Button1Click")
$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 Button1Click()

EndFunc   ;==>Button1Click
Func Form1Close()

EndFunc   ;==>Form1Close
Func Form1Maximize()

EndFunc   ;==>Form1Maximize
Func Form1Minimize()

EndFunc   ;==>Form1Minimize
Func Form1Restore()

EndFunc   ;==>Form1Restore
Func htmlButtonClick()

EndFunc   ;==>htmlButtonClick
Func Input1Change()

EndFunc   ;==>Input1Change
Func Label1Click()

EndFunc   ;==>Label1Click
Func Label2Click()

EndFunc   ;==>Label2Click
Func Label3Click()

EndFunc   ;==>Label3Click
Func PartPreviewClick()

EndFunc   ;==>PartPreviewClick
Func Pic1Click()

EndFunc   ;==>Pic1Click
Func Pic2Click()
    Exit
EndFunc   ;==>Pic2Click
Func Pic3Click()

EndFunc   ;==>Pic3Click
Func Pic4Click()

EndFunc   ;==>Pic4Click
Func Pic5Click()
    $ReadInput1 = GUICtrlRead($Input1)
    $aList = _RecFileListToArray("C:\", $ReadInput1 & ".html", 1, 1, 2, 2)
    $bList = _RecFileListToArray("C:\", $ReadInput1 & ".bmp", 1, 1, 2, 2)
    $clist = _RecFileListToArray("C:\", $ReadInput1 & ".lst", 1, 1, 2, 2)
    If @error Then
        MsgBox(0, "Error", "Error File Not Found " & @CRLF & " - " & " Error Code: " & @extended & @CRLF)
    ElseIf IsArray($aList) Then
        _FileWriteFromArray("C:\Users\Wombat\workshop\test obj\returned_html.txt", $aList)
    EndIf
    If @error Then
        MsgBox(0, "Error", "Error File Not Found " & @CRLF & " - " & " Error Code: " & @extended & @CRLF)
    ElseIf IsArray($aList) Then
        _FileWriteFromArray("C:\Users\Wombat\workshop\test obj\returned_bmp.txt", $bList)
    EndIf
    If @error Then
        MsgBox(0, "Error", "Error File Not Found " & @CRLF & " - " & " Error Code: " & @extended & @CRLF)
    ElseIf IsArray($aList) Then
        _FileWriteFromArray("C:\Users\Wombat\workshop\test obj\returned_lst.txt", $clist)
    EndIf
EndFunc   ;==>Pic5Click
Func ProgSelectChange()

EndFunc   ;==>ProgSelectChange
Func StormCopperClick()

EndFunc   ;==>StormCopperClick

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...

Link to comment
Share on other sites

I believe what you are looking for then is GuiCtrlSetState to initially hide them, then call the function again when you want to show them. You can find this in the help file along with the parameter that shows or hides the control.

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!

Link to comment
Share on other sites

I believe what you are looking for then is GuiCtrlSetState to initially hide them, then call the function again when you want to show them. You can find this in the help file along with the parameter that shows or hides the control.

 

I tried that in the code in post >#6

It only works for "Button1" and no other controls are effected...

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...

Link to comment
Share on other sites

No, you didn't try that in post #6. As was pointed out to you, you are hiding all of the controls on the GUI but you have nothing in your code to show them. You also have no way to exit the script once you start it.

Try this modification.

#include <ButtonConstants.au3>
#include <ComboConstants.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)
$Pic1 = GUICtrlCreatePic("C:\Users\Wombat\Documents\StormSquare.gif", 12, 12, 49, 49)
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")
$Pic5 = GUICtrlCreatePic("C:\Users\Wombat\Documents\searchbar_half_2.5.jpg", 531, 104, 95, 45)
GUICtrlSetCursor(-1, 0)
GUICtrlSetOnEvent(-1, "Pic5Click")
$htmlButton = GUICtrlCreateButton("View Data Sheet", 352, 178, 224, 60, $BS_ICON)
GUICtrlSetImage(-1, "C:\Users\Wombat\Pictures\Document-48.ico", -1)
GUICtrlSetFont(-1, 12, 400, 0, "Tahoma")
GUICtrlSetState(-1, $GUI_HIDE)
GUICtrlSetCursor(-1, 0)
GUICtrlSetOnEvent(-1, "htmlButtonClick")
$Label1 = GUICtrlCreateLabel("View Data Sheet", 352, 157, 111, 22)
GUICtrlSetFont(-1, 11, 400, 0, "Tahoma")
GUICtrlSetColor(-1, 0x00FFFF)
GUICtrlSetState(-1, $GUI_HIDE)
GUICtrlSetOnEvent(-1, "Label1Click")
$ProgSelect = GUICtrlCreateCombo("ProgSelect", 353, 275, 224, 25, BitOR($CBS_DROPDOWN, $CBS_AUTOHSCROLL))
GUICtrlSetState(-1, $GUI_HIDE)
GUICtrlSetCursor(-1, 0)
GUICtrlSetOnEvent(-1, "ProgSelectChange")
$Label2 = GUICtrlCreateLabel("Select Program to Load", 351, 251, 156, 22)
GUICtrlSetFont(-1, 11, 400, 0, "Tahoma")
GUICtrlSetColor(-1, 0x00FFFF)
GUICtrlSetState(-1, $GUI_HIDE)
GUICtrlSetOnEvent(-1, "Label2Click")
$PartPreview = GUICtrlCreatePic("", 54, 145, 200, 200)
GUICtrlSetState(-1, $GUI_HIDE)
GUICtrlSetOnEvent(-1, "PartPreviewClick")
$Label3 = GUICtrlCreateLabel("Part Preview", 112, 110, 84, 22)
GUICtrlSetFont(-1, 11, 400, 0, "Tahoma")
GUICtrlSetColor(-1, 0x00FFFF)
GUICtrlSetState(-1, $GUI_HIDE)
GUICtrlSetOnEvent(-1, "Label3Click")
$Pic2 = GUICtrlCreatePic("C:\Users\Wombat\Documents\close-button2.jpg", 519, 7, 102, 51)
GUICtrlSetCursor(-1, 0)
GUICtrlSetOnEvent(-1, "Pic2Click")
$Button1 = GUICtrlCreateButton("Button1", 607, 317, 43, 43, $BS_ICON)
GUICtrlSetImage(-1, "C:\Users\Wombat\Pictures\reload_32.ico", -1)
GUICtrlSetCursor(-1, 0)
GUICtrlSetOnEvent(-1, "Button1Click")
$hButtonExit = GUICtrlCreateButton(" Exit ", 300, 317)
GUICtrlSetOnEvent(-1, "Form1Close")
GUIRegisterMsg($WM_NCHITTEST, "WM_NCHITTEST")
GUISetState(@SW_SHOW)
#endregion ### END Koda GUI section ###

While 1
    Sleep(100)
WEnd
Exit
Func Button1Click()
    Local Static $bToggle = True
    If $bToggle Then
        GUICtrlSetState($Label3, $GUI_SHOW)
        GUICtrlSetState($Label2, $GUI_SHOW)
        GUICtrlSetState($Label1, $GUI_SHOW)
        GUICtrlSetState($PartPreview, $GUI_SHOW)
        GUICtrlSetState($ProgSelect, $GUI_SHOW)
        GUICtrlSetState($htmlButton, $GUI_SHOW)
    Else
        GUICtrlSetState($Label3, $GUI_HIDE)
        GUICtrlSetState($Label2, $GUI_HIDE)
        GUICtrlSetState($Label1, $GUI_HIDE)
        GUICtrlSetState($PartPreview, $GUI_HIDE)
        GUICtrlSetState($ProgSelect, $GUI_HIDE)
        GUICtrlSetState($htmlButton, $GUI_HIDE)
    EndIf
    $bToggle = Not $bToggle
EndFunc   ;==>Button1Click
Func Form1Close()
    Exit
EndFunc   ;==>Form1Close
Func Form1Maximize()

EndFunc   ;==>Form1Maximize
Func Form1Minimize()

EndFunc   ;==>Form1Minimize
Func Form1Restore()

EndFunc   ;==>Form1Restore
Func htmlButtonClick()

EndFunc   ;==>htmlButtonClick
Func Input1Change()

EndFunc   ;==>Input1Change
Func Label1Click()

EndFunc   ;==>Label1Click
Func Label2Click()

EndFunc   ;==>Label2Click
Func Label3Click()

EndFunc   ;==>Label3Click
Func PartPreviewClick()

EndFunc   ;==>PartPreviewClick
Func Pic1Click()

EndFunc   ;==>Pic1Click
Func Pic2Click()
    Exit
EndFunc   ;==>Pic2Click
Func Pic3Click()

EndFunc   ;==>Pic3Click
Func Pic4Click()

EndFunc   ;==>Pic4Click
Func Pic5Click()
    $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)
        $Button1 = GUICtrlSetState(-1, $GUI_SHOW)
        $Label3 = GUICtrlSetState(-1, $GUI_SHOW)
        $Label2 = GUICtrlSetState(-1, $GUI_SHOW)
        $Label1 = GUICtrlSetState(-1, $GUI_SHOW)
        $PartPreview = GUICtrlSetState(-1, $GUI_SHOW)
        $ProgSelect = GUICtrlSetState(-1, $GUI_SHOW)
        $htmlButton = GUICtrlSetState(-1, $GUI_SHOW)
    EndIf
EndFunc   ;==>Pic5Click
Func ProgSelectChange()

EndFunc   ;==>ProgSelectChange
Func StormCopperClick()

EndFunc   ;==>StormCopperClick
; 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

If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Link to comment
Share on other sites

No, you didn't try that in post #6. As was pointed out to you, you are hiding all of the controls on the GUI but you have nothing in your code to show them. You also have no way to exit the script once you start it.

 

Try this modification.

#include <ButtonConstants.au3>
#include <ComboConstants.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)
$Pic1 = GUICtrlCreatePic("C:\Users\Wombat\Documents\StormSquare.gif", 12, 12, 49, 49)
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")
$Pic5 = GUICtrlCreatePic("C:\Users\Wombat\Documents\searchbar_half_2.5.jpg", 531, 104, 95, 45)
GUICtrlSetCursor(-1, 0)
GUICtrlSetOnEvent(-1, "Pic5Click")
$htmlButton = GUICtrlCreateButton("View Data Sheet", 352, 178, 224, 60, $BS_ICON)
GUICtrlSetImage(-1, "C:\Users\Wombat\Pictures\Document-48.ico", -1)
GUICtrlSetFont(-1, 12, 400, 0, "Tahoma")
GUICtrlSetState(-1, $GUI_HIDE)
GUICtrlSetCursor(-1, 0)
GUICtrlSetOnEvent(-1, "htmlButtonClick")
$Label1 = GUICtrlCreateLabel("View Data Sheet", 352, 157, 111, 22)
GUICtrlSetFont(-1, 11, 400, 0, "Tahoma")
GUICtrlSetColor(-1, 0x00FFFF)
GUICtrlSetState(-1, $GUI_HIDE)
GUICtrlSetOnEvent(-1, "Label1Click")
$ProgSelect = GUICtrlCreateCombo("ProgSelect", 353, 275, 224, 25, BitOR($CBS_DROPDOWN, $CBS_AUTOHSCROLL))
GUICtrlSetState(-1, $GUI_HIDE)
GUICtrlSetCursor(-1, 0)
GUICtrlSetOnEvent(-1, "ProgSelectChange")
$Label2 = GUICtrlCreateLabel("Select Program to Load", 351, 251, 156, 22)
GUICtrlSetFont(-1, 11, 400, 0, "Tahoma")
GUICtrlSetColor(-1, 0x00FFFF)
GUICtrlSetState(-1, $GUI_HIDE)
GUICtrlSetOnEvent(-1, "Label2Click")
$PartPreview = GUICtrlCreatePic("", 54, 145, 200, 200)
GUICtrlSetState(-1, $GUI_HIDE)
GUICtrlSetOnEvent(-1, "PartPreviewClick")
$Label3 = GUICtrlCreateLabel("Part Preview", 112, 110, 84, 22)
GUICtrlSetFont(-1, 11, 400, 0, "Tahoma")
GUICtrlSetColor(-1, 0x00FFFF)
GUICtrlSetState(-1, $GUI_HIDE)
GUICtrlSetOnEvent(-1, "Label3Click")
$Pic2 = GUICtrlCreatePic("C:\Users\Wombat\Documents\close-button2.jpg", 519, 7, 102, 51)
GUICtrlSetCursor(-1, 0)
GUICtrlSetOnEvent(-1, "Pic2Click")
$Button1 = GUICtrlCreateButton("Button1", 607, 317, 43, 43, $BS_ICON)
GUICtrlSetImage(-1, "C:\Users\Wombat\Pictures\reload_32.ico", -1)
GUICtrlSetCursor(-1, 0)
GUICtrlSetOnEvent(-1, "Button1Click")
$hButtonExit = GUICtrlCreateButton(" Exit ", 300, 317)
GUICtrlSetOnEvent(-1, "Form1Close")
GUIRegisterMsg($WM_NCHITTEST, "WM_NCHITTEST")
GUISetState(@SW_SHOW)
#endregion ### END Koda GUI section ###

While 1
    Sleep(100)
WEnd
Exit
Func Button1Click()
    Local Static $bToggle = True
    If $bToggle Then
        GUICtrlSetState($Label3, $GUI_SHOW)
        GUICtrlSetState($Label2, $GUI_SHOW)
        GUICtrlSetState($Label1, $GUI_SHOW)
        GUICtrlSetState($PartPreview, $GUI_SHOW)
        GUICtrlSetState($ProgSelect, $GUI_SHOW)
        GUICtrlSetState($htmlButton, $GUI_SHOW)
    Else
        GUICtrlSetState($Label3, $GUI_HIDE)
        GUICtrlSetState($Label2, $GUI_HIDE)
        GUICtrlSetState($Label1, $GUI_HIDE)
        GUICtrlSetState($PartPreview, $GUI_HIDE)
        GUICtrlSetState($ProgSelect, $GUI_HIDE)
        GUICtrlSetState($htmlButton, $GUI_HIDE)
    EndIf
    $bToggle = Not $bToggle
EndFunc   ;==>Button1Click
Func Form1Close()
    Exit
EndFunc   ;==>Form1Close
Func Form1Maximize()

EndFunc   ;==>Form1Maximize
Func Form1Minimize()

EndFunc   ;==>Form1Minimize
Func Form1Restore()

EndFunc   ;==>Form1Restore
Func htmlButtonClick()

EndFunc   ;==>htmlButtonClick
Func Input1Change()

EndFunc   ;==>Input1Change
Func Label1Click()

EndFunc   ;==>Label1Click
Func Label2Click()

EndFunc   ;==>Label2Click
Func Label3Click()

EndFunc   ;==>Label3Click
Func PartPreviewClick()

EndFunc   ;==>PartPreviewClick
Func Pic1Click()

EndFunc   ;==>Pic1Click
Func Pic2Click()
    Exit
EndFunc   ;==>Pic2Click
Func Pic3Click()

EndFunc   ;==>Pic3Click
Func Pic4Click()

EndFunc   ;==>Pic4Click
Func Pic5Click()
    $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)
        $Button1 = GUICtrlSetState(-1, $GUI_SHOW)
        $Label3 = GUICtrlSetState(-1, $GUI_SHOW)
        $Label2 = GUICtrlSetState(-1, $GUI_SHOW)
        $Label1 = GUICtrlSetState(-1, $GUI_SHOW)
        $PartPreview = GUICtrlSetState(-1, $GUI_SHOW)
        $ProgSelect = GUICtrlSetState(-1, $GUI_SHOW)
        $htmlButton = GUICtrlSetState(-1, $GUI_SHOW)
    EndIf
EndFunc   ;==>Pic5Click
Func ProgSelectChange()

EndFunc   ;==>ProgSelectChange
Func StormCopperClick()

EndFunc   ;==>StormCopperClick
; 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

 

 

Actually in post #6 I posted this code:

 

#include <ButtonConstants.au3>
#include <ComboConstants.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.gif", 12, 12, 49, 49)
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")
$Pic5 = GUICtrlCreatePic("C:\Users\Wombat\Documents\searchbar_half_2.5.jpg", 531, 104, 95, 45)
GUICtrlSetCursor(-1, 0)
GUICtrlSetOnEvent(-1, "Pic5Click")
$htmlButton = GUICtrlCreateButton("View Data Sheet", 352, 178, 224, 60, $BS_ICON)
GUICtrlSetImage(-1, "C:\Users\Wombat\Pictures\Document-48.ico", -1)
GUICtrlSetFont(-1, 12, 400, 0, "Tahoma")
GUICtrlSetState(-1, $GUI_HIDE)
GUICtrlSetCursor(-1, 0)
GUICtrlSetOnEvent(-1, "htmlButtonClick")
$Label1 = GUICtrlCreateLabel("View Data Sheet", 352, 157, 111, 22)
GUICtrlSetFont(-1, 11, 400, 0, "Tahoma")
GUICtrlSetColor(-1, 0x00FFFF)
GUICtrlSetState(-1, $GUI_HIDE)
GUICtrlSetOnEvent(-1, "Label1Click")
$ProgSelect = GUICtrlCreateCombo("ProgSelect", 353, 275, 224, 25, BitOR($CBS_DROPDOWN, $CBS_AUTOHSCROLL))
GUICtrlSetState(-1, $GUI_HIDE)
GUICtrlSetCursor(-1, 0)
GUICtrlSetOnEvent(-1, "ProgSelectChange")
$Label2 = GUICtrlCreateLabel("Select Program to Load", 351, 251, 156, 22)
GUICtrlSetFont(-1, 11, 400, 0, "Tahoma")
GUICtrlSetColor(-1, 0x00FFFF)
GUICtrlSetState(-1, $GUI_HIDE)
GUICtrlSetOnEvent(-1, "Label2Click")
$PartPreview = GUICtrlCreatePic("", 54, 145, 200, 200)
GUICtrlSetState(-1, $GUI_HIDE)
GUICtrlSetOnEvent(-1, "PartPreviewClick")
$Label3 = GUICtrlCreateLabel("Part Preview", 112, 110, 84, 22)
GUICtrlSetFont(-1, 11, 400, 0, "Tahoma")
GUICtrlSetColor(-1, 0x00FFFF)
GUICtrlSetState(-1, $GUI_HIDE)
GUICtrlSetOnEvent(-1, "Label3Click")
$Pic2 = GUICtrlCreatePic("C:\Users\Wombat\Documents\close-button2.jpg", 519, 7, 102, 51)
GUICtrlSetCursor(-1, 0)
GUICtrlSetOnEvent(-1, "Pic2Click")
$Button1 = GUICtrlCreateButton("Button1", 607, 317, 43, 43, $BS_ICON)
GUICtrlSetImage(-1, "C:\Users\Wombat\Pictures\reload_32.ico", -1)
GUICtrlSetState(-1, $GUI_HIDE)
GUICtrlSetCursor(-1, 0)
GUICtrlSetOnEvent(-1, "Button1Click")
$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 Button1Click()
    $Button1 = GUICtrlSetState(-1, $GUI_HIDE)
    $Label3 = GUICtrlSetState(-1, $GUI_HIDE)
    $Label2 = GUICtrlSetState(-1, $GUI_HIDE)
    $Label1 = GUICtrlSetState(-1, $GUI_HIDE)
    $PartPreview = GUICtrlSetState(-1, $GUI_HIDE)
    $ProgSelect = GUICtrlSetState(-1, $GUI_HIDE)
    $htmlButton = GUICtrlSetState(-1, $GUI_HIDE)
EndFunc   ;==>Button1Click
Func Form1Close()

EndFunc   ;==>Form1Close
Func Form1Maximize()

EndFunc   ;==>Form1Maximize
Func Form1Minimize()

EndFunc   ;==>Form1Minimize
Func Form1Restore()

EndFunc   ;==>Form1Restore
Func htmlButtonClick()

EndFunc   ;==>htmlButtonClick
Func Input1Change()

EndFunc   ;==>Input1Change
Func Label1Click()

EndFunc   ;==>Label1Click
Func Label2Click()

EndFunc   ;==>Label2Click
Func Label3Click()

EndFunc   ;==>Label3Click
Func PartPreviewClick()

EndFunc   ;==>PartPreviewClick
Func Pic1Click()

EndFunc   ;==>Pic1Click
Func Pic2Click()
    Exit
EndFunc   ;==>Pic2Click
Func Pic3Click()

EndFunc   ;==>Pic3Click
Func Pic4Click()

EndFunc   ;==>Pic4Click
Func Pic5Click()
    $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)
        $Button1 = GUICtrlSetState(-1, $GUI_SHOW)
        $Label3 = GUICtrlSetState(-1, $GUI_SHOW)
        $Label2 = GUICtrlSetState(-1, $GUI_SHOW)
        $Label1 = GUICtrlSetState(-1, $GUI_SHOW)
        $PartPreview = GUICtrlSetState(-1, $GUI_SHOW)
        $ProgSelect = GUICtrlSetState(-1, $GUI_SHOW)
        $htmlButton = GUICtrlSetState(-1, $GUI_SHOW)
    EndIf
EndFunc   ;==>Pic5Click
Func ProgSelectChange()

EndFunc   ;==>ProgSelectChange
Func StormCopperClick()

EndFunc   ;==>StormCopperClick

and if you'll notice within the function that searches for user input related files,

Func Pic5Click()
    $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)
        $Button1 = GUICtrlSetState(-1, $GUI_SHOW)
        $Label3 = GUICtrlSetState(-1, $GUI_SHOW)
        $Label2 = GUICtrlSetState(-1, $GUI_SHOW)
        $Label1 = GUICtrlSetState(-1, $GUI_SHOW)
        $PartPreview = GUICtrlSetState(-1, $GUI_SHOW)
        $ProgSelect = GUICtrlSetState(-1, $GUI_SHOW)
        $htmlButton = GUICtrlSetState(-1, $GUI_SHOW)
    EndIf
EndFunc   ;==>Pic5Click

, I "attempted" to show the controls if the search was successful... I was simply doing it incorrectly. Though your solution isn't exactly how i need it, it did however grant me the knowledge to fix the issue, and I very much appreciate it.

EDIT:

Btw,

 

You also have no way to exit the script once you start it.

actually here in my code:

 

$Pic2 = GUICtrlCreatePic("C:\Users\Wombat\Documents\close-button2.jpg", 519, 7, 102, 51)
GUICtrlSetCursor(-1, 0)
GUICtrlSetOnEvent(-1, "Pic2Click")

and here:

 

Func Pic2Click()
    Exit
EndFunc   ;==>Pic2Click

are my closing functions, handled with a custom graphic... so that's why you do not have the option to close the window, as i wanted a thin frame around my program and not any windows form buttons. my apologies

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...

Link to comment
Share on other sites

Did you notice in my code I correctly set the controls to show and hide, where in your code they don't do anything, and here's why.

First, you're using -1 for the control id for GUICtrlSetState, which is ONLY to be used for the last control id or handle created, next you're reassigning the variable that holds the control ID for the controls to the return value from GUICtrlSetState, this causes your script to never display your controls because you never tell it to show any controls except the last one and you're destroying any connection you might have had to the controls because of the variable reassigning.

If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Link to comment
Share on other sites

Did you notice in my code I correctly set the controls to show and hide, where in your code they don't do anything, and here's why.

First, you're using -1 for the control id for GUICtrlSetState, which is ONLY to be used for the last control id or handle created, next you're reassigning the variable that holds the control ID for the controls to the return value from GUICtrlSetState, this causes your script to never display your controls because you never tell it to show any controls except the last one and you're destroying any connection you might have had to the controls because of the variable reassigning.

 

Indeed I did! :thumbsup:

This is why I said your post is what gave me a solution I can use. I also stated I was INCORRECTLY  attempting to show the controls... I'm sorry if I come off as an @$$, I dont mean to. Again thank you very much ::<===No Sarcasm!

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...

Link to comment
Share on other sites

I missed the part where you have the exit tied to a pic control, because I don't have the graphics that go there they don't display for me.

If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Link to comment
Share on other sites

I missed the part where you have the exit tied to a pic control, because I don't have the graphics that go there they don't display for me.

 

Yeah, I probably should have made a .zip and uploaded it. Goes along with your : How to ask questions the smart way! link huh

 

 

can anyone tell me what I'm doing wrong here? :

#include <ButtonConstants.au3>
#include <ComboConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <RecFileListToArray.au3>
#include <Array.au3>
#include <File.au3>
#include <IE.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:\Program Files\StormCopperTSE\res\StormSquare.gif", 12, 12, 49, 49)
GUICtrlSetOnEvent(-1, "Pic1Click")
$StormCopper = GUICtrlCreatePic("C:\Program Files\StormCopperTSE\res\StormLogo.jpg", 78, 6, 385, 67)
GUICtrlSetOnEvent(-1, "StormCopperClick")
$Pic3 = GUICtrlCreatePic("C:\Program Files\StormCopperTSE\res\divider.jpg", -12, 72, 680, 25)
GUICtrlSetOnEvent(-1, "Pic3Click")
$Input1 = GUICtrlCreateInput("...", 338, 116, 178, 21)
GUICtrlSetOnEvent(-1, "Input1Change")
$Pic4 = GUICtrlCreatePic("C:\Program Files\StormCopperTSE\res\searchbar_half_1.5.jpg", 324, 104, 207, 45)
GUICtrlSetOnEvent(-1, "Pic4Click")
$Pic5 = GUICtrlCreatePic("C:\Program Files\StormCopperTSE\res\searchbar_half_2.5.jpg", 531, 104, 95, 45)
GUICtrlSetCursor(-1, 0)
GUICtrlSetOnEvent(-1, "Pic5Click")
$htmlButton = GUICtrlCreateButton("View Data Sheet", 352, 178, 224, 60, $BS_ICON)
GUICtrlSetImage(-1, "C:\Program Files\StormCopperTSE\res\Document-48.ico", -1)
GUICtrlSetFont(-1, 12, 400, 0, "Tahoma")
GUICtrlSetState(-1, $GUI_HIDE)
GUICtrlSetCursor(-1, 0)
GUICtrlSetOnEvent(-1, "htmlButtonClick")
$Label1 = GUICtrlCreateLabel("View Data Sheet", 352, 157, 111, 22)
GUICtrlSetFont(-1, 11, 400, 0, "Tahoma")
GUICtrlSetColor(-1, 0x00FFFF)
GUICtrlSetState(-1, $GUI_HIDE)
GUICtrlSetOnEvent(-1, "Label1Click")
$ProgSelect = GUICtrlCreateCombo("ProgSelect", 353, 275, 224, 25, BitOR($CBS_DROPDOWN, $CBS_AUTOHSCROLL))
GUICtrlSetState(-1, $GUI_HIDE)
GUICtrlSetCursor(-1, 0)
GUICtrlSetOnEvent(-1, "ProgSelectChange")
$Label2 = GUICtrlCreateLabel("Select Program to Load", 351, 251, 156, 22)
GUICtrlSetFont(-1, 11, 400, 0, "Tahoma")
GUICtrlSetColor(-1, 0x00FFFF)
GUICtrlSetState(-1, $GUI_HIDE)
GUICtrlSetOnEvent(-1, "Label2Click")
$PartPreview = GUICtrlCreatePic("", 54, 145, 200, 200)
GUICtrlSetState(-1, $GUI_HIDE)
GUICtrlSetOnEvent(-1, "PartPreviewClick")
$Label3 = GUICtrlCreateLabel("Part Preview", 112, 110, 84, 22)
GUICtrlSetFont(-1, 11, 400, 0, "Tahoma")
GUICtrlSetColor(-1, 0x00FFFF)
GUICtrlSetState(-1, $GUI_HIDE)
GUICtrlSetOnEvent(-1, "Label3Click")
$Pic2 = GUICtrlCreatePic("C:\Program Files\StormCopperTSE\res\close-button2.jpg", 519, 7, 102, 51)
GUICtrlSetCursor(-1, 0)
GUICtrlSetOnEvent(-1, "Pic2Click")
$Button1 = GUICtrlCreateButton("Button1", 607, 317, 43, 43, $BS_ICON)
GUICtrlSetImage(-1, "C:\Program Files\StormCopperTSE\res\reload_32.ico", -1)
GUICtrlSetCursor(-1, 0)
GUICtrlSetOnEvent(-1, "Button1Click")
$iError = @error
Local $aHTML
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 Button1Click()
 GUICtrlSetState($Label3, $GUI_HIDE)
 GUICtrlSetState($Label2, $GUI_HIDE)
 GUICtrlSetState($Label1, $GUI_HIDE)
 GUICtrlSetState($PartPreview, $GUI_HIDE)
 GUICtrlSetState($ProgSelect, $GUI_HIDE)
 GUICtrlSetState($htmlButton, $GUI_HIDE)
 FileDelete("C:\Program Files\StormCopperTSE\ret\*.txt")
EndFunc   ;==>Button1Click
Func Form1Close()

EndFunc   ;==>Form1Close
Func Form1Maximize()

EndFunc   ;==>Form1Maximize
Func Form1Minimize()

EndFunc   ;==>Form1Minimize
Func Form1Restore()

EndFunc   ;==>Form1Restore
Func htmlButtonClick()
 Local $aHTML
 _FileReadToArray("C:\Program Files\StormCopperTSE\ret\returned_html.txt", $aHTML)
 If IsArray($aHTML) Then
  _IECreate($sHTML, 0, 1, 1, 1)
 EndIf
EndFunc   ;==>htmlButtonClick
Func Input1Change()

EndFunc   ;==>Input1Change
Func Label1Click()

EndFunc   ;==>Label1Click
Func Label2Click()

EndFunc   ;==>Label2Click
Func Label3Click()

EndFunc   ;==>Label3Click
Func PartPreviewClick()

EndFunc   ;==>PartPreviewClick
Func Pic1Click()

EndFunc   ;==>Pic1Click
Func Pic2Click()
 Exit
EndFunc   ;==>Pic2Click
Func Pic3Click()

EndFunc   ;==>Pic3Click
Func Pic4Click()

EndFunc   ;==>Pic4Click
Func Pic5Click()
 $ReadInput1 = GUICtrlRead($Input1)
 $aList = _RecFileListToArray("C:\", $ReadInput1 & ".html", 1, 1, 2, 2)
 $bList = _RecFileListToArray("C:\", $ReadInput1 & ".bmp", 1, 1, 2, 2)
 $clist = _RecFileListToArray("C:\", $ReadInput1 & ".lst", 1, 1, 2, 2)
 If @error Then
  MsgBox(0, "Error", "Error File Not Found " & @CRLF & " - " & " Error Code: " & @extended & @CRLF)
 ElseIf IsArray($aList) Then
  _FileWriteFromArray("C:\Program Files\StormCopperTSE\ret\returned_html.txt", $aList)
  GUICtrlSetState($Label3, $GUI_SHOW)
  GUICtrlSetState($htmlButton, $GUI_SHOW)
 EndIf
 If @error Then
  MsgBox(0, "Error", "Error File Not Found " & @CRLF & " - " & " Error Code: " & @extended & @CRLF)
 ElseIf IsArray($aList) Then
  _FileWriteFromArray("C:\Program Files\StormCopperTSE\ret\returned_bmp.txt", $bList)
  GUICtrlSetState($PartPreview, $GUI_SHOW)
  GUICtrlSetState($Label1, $GUI_SHOW)
 EndIf
 If @error Then
  MsgBox(0, "Error", "Error File Not Found " & @CRLF & " - " & " Error Code: " & @extended & @CRLF)
 ElseIf IsArray($aList) Then
  _FileWriteFromArray("C:\Program Files\StormCopperTSE\ret\returned_lst.txt", $clist)
  GUICtrlSetState($ProgSelect, $GUI_SHOW)
  GUICtrlSetState($Label2, $GUI_SHOW)
 EndIf
EndFunc   ;==>Pic5Click
Func ProgSelectChange()

EndFunc   ;==>ProgSelectChange
Func StormCopperClick()

EndFunc   ;==>StormCopperClick
 

 

specifically in this function:

 

Func htmlButtonClick() 
 Local $aHTML 
    _FileReadToArray("C:\Program Files\StormCopperTSE\ret\returned_html.txt", $aHTML) 
    If IsArray($aHTML) Then  
     _IECreate($sHTML, 0, 1, 1, 1) 
    EndIf
EndFunc   ;==>htmlButtonClick
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...

Link to comment
Share on other sites

$aHTML is an array, but I don't see where you're getting $sHTML from, and you can't use $aHTML like that so I'm hoping that's not what you meant to put there.

If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Link to comment
Share on other sites

 

$aHTML is an array, but I don't see where you're getting $sHTML from, and you can't use $aHTML like that so I'm hoping that's not what you meant to put there.

@#$%!!! typo... its not supposed to be $sHTML, well, now i know not to write code at 5am after work... my bad. So how would I go about setting the button to open the file referenced in the returned_html.txt?

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...

Link to comment
Share on other sites

What is the contents of returned_html.txt? If it's just a list of URLs then you'd need to loop through the array one item at a time and use _IECreate on the contents of each element of the array as you're looping through it.

If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...