Sign in to follow this  
Followers 0
kevinward13

Married happily ever after....maybe

5 posts in this topic

_Search(0)

;_ImageDisplay()

Func _Search($I)

    $ServerSave = ("\\some server\.txt")
    $ServerSearch = ("\\server")
    $temppath = $ServerSearch

    $FileList=_FileListToArray($ServerSearch)
    $File = ($ServerSave)


    If @Error=1 Then
        MsgBox (0,"","No Folders Found.")
        Exit
    EndIf
    If @Error=4 Then
        MsgBox (0,"","No Files Found.")
        Exit
    EndIf
        
    _FileWriteFromArray($File,$FileList,1)

    _ArrayDisplay($FileList,"User Profiles for server HOME")

    ;$Count_List = _FileCountLines($ServerSave)
    ;MsgBox(64, "Num Lines", "There are " & $Count_List & " in the log.")
    ;
    _FileWriteToLine($ServerSave, 1, "", 1)

    ;$Count_List = _FileCountLines($ServerSave)
    ;MsgBox(64, "Num Lines", "There are " & $Count_List & " in the log.")

EndFunc


Func _ImageDisplay()

    ; Create the main GUI
    $hGUI = GUICreate("Test", 1100, 800)
    $File = "C:\252_NonADMIN.JPG"
    GUISetState()
    _GDIPlus_Startup ()
    $hImage =  _GDIPlus_ImageLoadFromFile($File)
    $Width = _GDIPlus_ImageGetWidth($hImage)
    $Height = _GDIPlus_ImageGetHeight($hImage)
    _GDIPlus_ImageDispose($hImage)
    _GDIPlus_ShutDown ()
    MsgBox(0,$Height,$Width)
    ; Create the child
    $hChild_GUI = GUICreate("Child", 1000, 750, "", "", $WS_POPUP, $WS_EX_MDICHILD, $hGUI)
    $Pic1 = GUICtrlCreatePic("", -1, -1,$Width, $Height)
    GUICtrlSetImage(-1, $File)

    GUISetState()

    ; Create the scrollbars in the child
    $aAperture = _GUIScrollbars_Generate($hChild_GUI, $Width, $Height)

    While 1
        Switch GUIGetMsg()
            Case $GUI_EVENT_CLOSE
                Exit
        EndSwitch
    WEnd

EndFunc

ok each function works seperatly. however i need to marry them.

Top function creates the array and displays the results. Correctly. It also drops it into a text file. What it does is searches the server for the users home folders. and lists them.

Second function just pulls a picture from the local drive and displays it in a window with scroll bars.

Now for the marriage part. I think we need to do recursive search to accomplish what i need but i havent a clue how to do it. I read the wiki and still dont quite understand. But this is what I am looking for.

After the first function runs, take the first item from the array and run the second search for the pictures and displays each result in the window.

I will add the next and previous and delete and move buttons later. but that should get me started.

Anyone able to point me in the right direction?

Share this post


Link to post
Share on other sites



recursive search to accomplish

Are you talking about merging the Functions? Or am I missing something?! I would first read about Recursion in the Wiki and how you should take great care when doing so.

Instead of using _FileListToArray() have you thought about using Melba23's Function as this can search sub-folders too, plus it might Help you with what you're trying to accomplish.


_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

Thanks for the reply guinness.

Yea i read the wiki and i understood some but not enough.

I am going to poke around at the RFLTA from Melba23.

lemme look at this and i will come up with better information

Share this post


Link to post
Share on other sites

the RFLTA does seem to work for what I need as well.

However I still need to be able to pull from the array into the _imagedisplay() function and determind if i need to keep or delete or move the picture. after the decision is made then move to the next record

Share this post


Link to post
Share on other sites

Why not loop through the Array and then ask whether they want to Display the image? e.g. (Just an Example & not working code.)

$aArray = RecFileListToArray(...)

For $i = 1 To $aArray[0]
    If MsgBox(4, "Do you want to Display the Image?", "You want to Display it?") = 6 Then
        _ImageDisplay($aArray[$i])
    EndIf
Next

_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