-
Posts
26 -
Joined
-
Last visited
Everything posted by enigmaforceiv
-
I'm trying to learn the best I can in the small amount of time that I got to "complete" this project. I'm not just taking bits of info and slapping it together in the official script; instead, I am analyzing and cross-referencing each command for a better understanding of what that command does. I wish not for people to help me by giving me an entire working script that can simply be copied and pasted, but for just a simple explanation or guidance. In this case, figuring out what "&" does, and why the script is considering that it's badly formatted.
-
#region #AutoIt3Wrapper_Run_Tidy=y #AutoIt3Wrapper_Tidy_Stop_OnError=n #endregion #include <File.au3> #include <Array.au3> #include <GUIConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <EditConstants.au3> #include <AVIConstants.au3> #include "RecFileListToArray.au3" Global $font = "Arial" Global $GUI_BGC = "0x5F0505" ;============================================================================= Opt("GuiOnEventMode", 1) Opt("GUICoordMode", 3) ;============================================================================= $GUI = GUICreate("C21 Chicago's Finest ~ Let's Take This Journey... Together.", 800, 600) ; creates window GUICtrlCreatePic("logo4.jpg", 0, 0, 800, 115) GUICtrlCreateMenu("File") GUICtrlCreateMenu("About") GUICtrlCreateMenu("Logout") GUISetBkColor($GUI_BGC) GUISetFont(9, 400, 0, $font) GUISetOnEvent($GUI_EVENT_CLOSE, "_Exit") $FileViewer = GUICtrlCreateList("", 400, 142, 375, 175) $BuyerV = GUICtrlCreateTabItem("Buyers") ;creates item in tab $Blist = GUICtrlCreateList("", 195, 143, 175, 180);creates list in the above tab Buyers() ;calls function ;FUNCTIONS HERE PLEASE ----- Begin Tabbed Items Function Func Buyers() $FileList = _FileListToArray("C:DropboxCentury21Client DatabaseBuyers", "*", 2) ; get only folders with the quoted string _ArrayDelete($FileList, 0) ; Throwing out the total folder count from the 0 index For $folder In $FileList ; Loop over folders found. GUICtrlSetData($Blist, $folder) Next In the $Blist, I notice that whenever I select a folder, it becomes highlighted. However, what I want to do is make that selection output its subfiles into the $FileViewer. How would I do that?
-
I was wondering if it is possible to make the List and its items clickable? Currently, my program lists Folders, and I want to be able to click the Folders and list its contents. Will I need another script to do this? Forgive me for my ignorance - I think I came across a similar thread, but lost it!
-
Problems getting my script to close
enigmaforceiv replied to enigmaforceiv's topic in AutoIt General Help and Support
Thanks again everyone! -
Problems getting my script to close
enigmaforceiv replied to enigmaforceiv's topic in AutoIt General Help and Support
Sorry, had them collapsed. -
#region #AutoIt3Wrapper_Run_Tidy=y #AutoIt3Wrapper_Tidy_Stop_OnError=n #endregion #include <File.au3> #include <Array.au3> #include <GUIConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <EditConstants.au3> #include "RecFileListToArray.au3" Global $font = "Arial" Global $GUI_BGC = "0x660000" $GUI = GUICreate("C21 Chicago's Finest", 800, 600) ; creates window GUISetBkColor($GUI_BGC) Opt("GuiOnEventMode", 1) $BuyerV = GUICtrlCreateButton("Buyers", 50, 50, 100, 30) ;creates buttons $BEvent = GUICtrlSetOnEvent($BuyerV, "Buyers") ;assigns event to button $SellerV = GUICtrlCreateButton("Sellers", 50, 100, 100, 30) $SEvent = GUICtrlSetOnEvent($SellerV, "Sellers") $RenterV = GUICtrlCreateButton("Renters", 50, 150, 100, 30) $REvent = GuiCtrlSetOnEvent($RenterV, "Renters") $list = GUICtrlCreateList("", 200, 50, 300, 290) GUISetState() While 1 Sleep(1000) ;less cpu WEnd Func Buyers() GUICtrlSetData($list, "") Opt("GUICoordMode", 3) GUISetFont(9, 1000, 0, $font) Sleep(10) $FileList = _FileListToArray("C:DropboxCentury21Client DatabaseBuyers", "*", 2) ; get only folders with the quoted string _ArrayDelete($FileList, 0) ; Throwing out the total folder count from the 0 index For $folder In $FileList ; Loop over folders found. GUICtrlSetData($list, $folder) Next EndFunc Func Sellers() GUICtrlSetData($list, "") Opt("GUICoordMode", 3) GUISetFont(9, 1000, 0, $font) Sleep(10) $FileList = _FileListToArray("C:DropboxCentury21Client DatabaseSellers", "*", 2) ; get only folders with the quoted string _ArrayDelete($FileList, 0) ; Throwing out the total folder count from the 0 index For $folder In $FileList ; Loop over folders found. GUICtrlSetData($list, $folder) Next EndFunc Func Renters() GUICtrlSetData($list, "") Opt("GUICoordMode", 3) GUISetFont(9, 1000, 0, $font) Sleep(10) $FileList = _FileListToArray("C:DropboxCentury21Client DatabaseRentals", "*", 2) ; get only folders with the quoted string _ArrayDelete($FileList, 0) ; Throwing out the total folder count from the 0 index For $folder In $FileList ; Loop over folders found. GUICtrlSetData($list, $folder) Next EndFunc GUISetState() While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd I'm having problems getting my script to close, it worked before (I hadn't had much of the code in there as I do now), and ever since I've been updating the script - it suddenly stopped allowing me to exit. I now have to end task through the task manager.
-
Having problems with If/Then Statements...
enigmaforceiv replied to enigmaforceiv's topic in AutoIt General Help and Support
Wow, that loop saved up so much cpu! Thanks for all your help guys, everything is working as expected now! -
Having problems with If/Then Statements...
enigmaforceiv replied to enigmaforceiv's topic in AutoIt General Help and Support
Do you think a loop will be necessary? $BuyerV = GUICtrlCreateButton("Buyers", 50, 50, 100, 30) ;creates buttons $BEvent = GUICtrlSetOnEvent($BuyerV, "Buyers") ;assigns event to button $list = GUICtrlCreateList("", 200, 50, 300, 290) ;creates a universal list window - however all files are displayed here instead of erased. GUICtrlSetData($list, "") GUISetState(@SW_SHOW) Func Buyers() Opt("GUICoordMode", 3) GUISetFont(9, 1000, 0, $font) Sleep(10) $FileList = _FileListToArray("C:DropboxCentury21Client DatabaseBuyers", "*", 2) ; get only folders with the quoted string _ArrayDelete($FileList, 0) ; Throwing out the total folder count from the 0 index For $folder In $FileList ; Loop over folders found. GUICtrlSetData($list, $folder) Next EndFunc -
Having problems with If/Then Statements...
enigmaforceiv replied to enigmaforceiv's topic in AutoIt General Help and Support
I'm guessing that my problem isn't an If/then statement, but more of a question on how can I turn "on and off" a command in my script. Generally, what I'm trying to do is have the button call a function that lists files in a specific directory. However, instead of listing files in each directory separately, it adds to the list of already found files. What I'm trying to do is have that list "refresh" into the new list. -
Having problems with If/Then Statements...
enigmaforceiv replied to enigmaforceiv's topic in AutoIt General Help and Support
Then the IF/Then statements aren't needed, correct? -
Having problems with If/Then Statements...
enigmaforceiv replied to enigmaforceiv's topic in AutoIt General Help and Support
Thanks all! Also, $BEvent is tied to a button, however, even though I don't press the button to call the function, the function is already executed - even though I didn't click any buttons. How can I tell the script to not execute a function unless it's called on? -
If $BEvent = 1 Then Func Buyers() Opt("GUICoordMode", 3) GUISetFont(9, 1000, 0, $font) Sleep(10) $FileList = _FileListToArray("C:\Dropbox\Century21\Client Database\Buyers", "*", 2) ; get only folders with the quoted string _ArrayDelete($FileList, 0) ; Throwing out the total folder count from the 0 index For $folder In $FileList ; Loop over folders found. GUICtrlSetData($list, $folder) Next EndIf EndFunc I keep getting this error: "Func Buyers() Error: "If" statement has no matching "EndIf" statement." What am I doing wrong?
-
how to delet file from listview
enigmaforceiv replied to aness07's topic in AutoIt General Help and Support
Can one of you explain how this works on the user's side? Do they click to choose the file that they want to delete? I'm looking to do something similar, but would like the event to open the directory and its contents within. -
Buttons+List! What am I doing wrong?
enigmaforceiv posted a topic in AutoIt General Help and Support
I'm trying to get my buttons to call up their functions and list them. However, it wont return any information to the list. #region #AutoIt3Wrapper_Run_Tidy=y #AutoIt3Wrapper_Tidy_Stop_OnError=n #endregion #include #include #include #include #include #include #include "RecFileListToArray.au3" Global $font = "Arial" Global $GUI_BGC = "0xf0ffff" $GUI = GUICreate("C21 Chicago's Finest", 800, 600) ; creates window GUISetBkColor($GUI_BGC) $BuyerV = GUICtrlCreateButton("Buyers", 50, 50, 100, 30) GUICtrlSetOnEvent($BuyerV, "Buyers") $SellerV = GUICtrlCreateButton("Sellers", 50, 100, 100, 30) GUICtrlSetOnEvent($SellerV, "Sellers") $RenterV = GUICtrlCreateButton("Renters", 50, 150, 100, 30) GUICtrlSetOnEvent($RenterV, "Renters") $list = GUICtrlCreateList("", 200, 50, 300, 290);WANT EVERYTHING TO BE SHOWN IN THIS LIST ;BASED ON BUTTON CLICKED / WANT TO CALL THE FUNCTION BASED ON THE BUTTONS CLICKED GUISetState(@SW_SHOW) Func Buyers() Opt("GUICoordMode", 3) GUISetFont(9, 1000, 0, $font) Sleep(1000) $FileList = _FileListToArray("C:\Dropbox\Century21\Client Database\Buyers", "*", 2) ; get only folders with the quoted string _ArrayDelete($FileList, 0) ; Throwing out the total folder count from the 0 index For $folder In $FileList ; Loop over folders found. GUICtrlSetData($list, $folder) Next EndFunc Func Sellers() Opt("GUICoordMode", 3) GUISetFont(9, 1000, 0, $font) Sleep(1000) $FileList = _FileListToArray("C:\Dropbox\Century21\Client Database\Sellers", "*", 2) ; get only folders with the quoted string _ArrayDelete($FileList, 0) ; Throwing out the total folder count from the 0 index For $folder In $FileList ; Loop over folders found. GUICtrlSetData($list, $folder) Next EndFunc Func Renters() Opt("GUICoordMode", 3) GUISetFont(9, 1000, 0, $font) Sleep(1000) $FileList = _FileListToArray("C:\Dropbox\Century21\Client Database\Rentals", "*", 2) ; get only folders with the quoted string _ArrayDelete($FileList, 0) ; Throwing out the total folder count from the 0 index For $folder In $FileList ; Loop over folders found. GUICtrlSetData($list, $folder) Next EndFunc GUISetState() While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd If I decided to add the functions: "Buyers(), Seller(), Renter()" it would display the files in one who chunk - what am I doing wrong? -
Automate (Functional) Button Creation
enigmaforceiv replied to Obviator's topic in AutoIt General Help and Support
May I ask why only 1 and 3 show in your coding, Melba? -
I'm going on day 2 trying to figure this out, deciding to ask for some help. I'm trying to list files (that are clickable) within a directory in the GUI tab object, but haven't been successful. I am able to get the list of files, which show up before the GUI is launched. I am currently using Array.au3 and File.au3 to do this. What I want is the files to appear within the tab windows of the tabbed items... if that makes sense. Any advice? Here is my code: #include <GUIConstantsEx.au3> #include <Array.au3> #include <File.au3> #include "RecFileListToArray.au3" _Main() Func _Main() Local $Buyers = _ArrayDisplay("C:DropboxCentury21Client DatabaseBuyers") ; Variable is assigned to list the files and folders GUICreate("C21 Chicago's Finest", 800, 600) ; creates window GUICtrlCreateTab(50, 50, 700, 300) GUICtrlCreateTabItem("Buyers") GUICtrlCreateList((_FileListToArray($Buyers)), 50, 70, 699, 313) EndFunc GUISetState () While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd