
Reher
Members-
Posts
7 -
Joined
-
Last visited
Reher's Achievements

Seeker (1/7)
2
Reputation
-
I did and it worked like intendet, but since i have already used the method of hiding one gui item and showing the other one multiple times in my script before. I figured i wouldn't start switching it up towards the end of my project now to avoid confusion. Anyways i realy like your Method of deleting the gui item and creating another one with the same Name. Thanks for showing me i will probably use that from now on to avoid cluttering my code with dozen of hidden gui items with different names. Also thanks for showing me how to create a switch function i could realy have needet that when starting with my project. Also thanks for this, its so simple if someone tells you but the thought never even crossed my mind. So all in all i realy got more out of this question then i expected its my first time writing code and i never realy "learned" it from an professional. I already found lots of ways i could do things cleaner or simpler from my first project, but i cant be bothered to go through 500+ lines of code to clean my beginner mess up Tanks both of you for helping me to get a litte bit better at coding
-
Whoops, well i guess better late then never. $Combobox = GUICtrlCreateCombo($list[0], 160, 200, 265, 25, BitOR($CBS_DROPDOWN,$CBS_AUTOHSCROLL)) GuiCtrlSetData(-1, "|" & _ArrayToString($list,Default,1),$list[2]) GUICtrlSetFont(-1, 9, 400, 0, "Arial") GUICtrlSetState (-1, $GUI_SHOW) $iCombobox = GUICtrlCreateCombo($list[0], 160, 200, 265, 25, BitOR($CBS_DROPDOWNLIST,$CBS_AUTOHSCROLL)) GuiCtrlSetData(-1, "|" & _ArrayToString($list,Default,1),$list[2]) GUICtrlSetFont(-1, 9, 400, 0, "Arial") GUICtrlSetState (-1, $GUI_HIDE) $Checkbox1 = GUICtrlCreateCheckbox("Checkbox1", 160, 96, 105, 25) Case $Checkbox1 If GUICtrlRead($Checkbox1) = $GUI_CHECKED Then Call ("Read_only") Else Call ("Edit") Endif Func Read_only() GUICtrlSetState ($Combobox, $GUI_HIDE) GUICtrlSetState ($iCombobox, $GUI_SHOW) EndFunc Func Edit() GUICtrlSetState ($Combobox, $GUI_SHOW) GUICtrlSetState ($iCombobox, $GUI_HIDE) EndFunc untested, just quickly thrown together from my code. Keep in mind that it's not perfect, the combobox variants dropdown and dropdownlist differ slightly and you have to remember to read the correct combobox in your following code .
-
Reher reacted to a post in a topic: Changing Comboboxstyle from $CBS_DROPDOWN to $CBS_DROPDOWNLIST
-
Reher reacted to a post in a topic: Changing Comboboxstyle from $CBS_DROPDOWN to $CBS_DROPDOWNLIST
-
Reher reacted to a post in a topic: Changing Comboboxstyle from $CBS_DROPDOWN to $CBS_DROPDOWNLIST
-
Reher reacted to a post in a topic: Changing Comboboxstyle from $CBS_DROPDOWN to $CBS_DROPDOWNLIST
-
Oh i was sure it would only be my ignorance not a language restriction i was running into... i tought of that aswell, but was certain there would be a more elegant solution to this. Guess i have to play the old smoke and mirror trick and just change between 2 comboboxes. I will paste my workaround later thanks for your help anyways guys
-
Hi so i ran into a Problem i didn't expect to get stuck on. It sounds simple (and probably is) but i can't seem to get it to work So i created a Combobox and filled it with some things from an array which worked fine. $combobox = GUICtrlCreateCombo($list[0], 160, 200, 265, 25, BitOR($CBS_DROPDOWN,$CBS_AUTOHSCROLL)) GuiCtrlSetData($list, "|" & _ArrayToString($list,Default,1),$list[2]) GUICtrlSetFont(-1, 9, 400, 0, "Arial") Now i want to change the style of the combobox from $CBS_DROPDOWN to $CBS_DROPDOWNLIST via a checkbox. $Checkbox1 = GUICtrlCreateCheckbox("Checkbox1", 160, 96, 105, 25) Case $Checkbox1 If GUICtrlRead($Checkbox1) = $GUI_CHECKED Then Call ("Read_only") Else Call ("Edit") Endif Func Read_only() GUICtrlSetStyle ($Combobox1,something to change it to $CBS_DROPDOWNLIST) EndFunc Func Edit() GUICtrlSetStyle ($Combobox1,something to change it to $CBS_DROPDOW) EndFunc I tried using $CBS_DROPDOWN and $CBS_DROPDOWNLIST but it simply does nothing. I also tried $ES_READONLY which kinda worked, it changed the combobox so i couldn't change the input via dropdown anymore but i could still type in it via keyboard (which i dont want). It's essential that its Editable but once the checkbox is checked the combobox becomes readonly so you can't type in it anymore but you can still choose between the items in the list. (It does not have to save your current input if you write something in it and then check the Checkbox it would be best if it would simpy jump back to the first item in the list) Im sure this is a simple thing but after long google search im tired of my stupidity can someone give me a push in the right direction?
-
Danyfirex reacted to a post in a topic: Problem with _FileListToArrayRec while using a network path
-
Reher reacted to a post in a topic: Problem with _FileListToArrayRec while using a network path
-
Reher reacted to a post in a topic: Problem with _FileListToArrayRec while using a network path
-
Reher reacted to a post in a topic: Problem with _FileListToArrayRec while using a network path
-
Reher reacted to a post in a topic: Problem with _FileListToArrayRec while using a network path
-
Reher reacted to a post in a topic: Problem with _FileListToArrayRec while using a network path
-
Reher reacted to a post in a topic: Problem with _FileListToArrayRec while using a network path
-
mLipok reacted to a post in a topic: Problem with _FileListToArrayRec while using a network path
-
Problem with _FileListToArrayRec while using a network path
Reher replied to Reher's topic in AutoIt General Help and Support
Thanks everyone, that was the problem using this code i get my array correctly displayed #include <Array.au3> #include <File.au3> #include <MsgBoxConstants.au3> Example() Func Example() $Searchfor = "%21006051" $path = "\\?\T:\dir\dir\dir\dir\dir\dir" $aArray = _FileListToArrayRec($path, $Searchfor &"*" &"|", $FLTAR_FOLDERS, $FLTAR_RECUR, $FLTAR_SORT) _ArrayDisplay($aArray, "Sorted tree") EndFunc -
Problem with _FileListToArrayRec while using a network path
Reher replied to Reher's topic in AutoIt General Help and Support
@iamtheky Total path length to the subfolder is around 158 charakters nad may very by 5-15 charakters. Very long but less than 260 @BrewManNH Nope i dont use #Require Admin in my real script. @FrancescoDiMuro tried that and sorry i guess i dont quite understand the ConsoleWrite command where does it write to? -
Hi first up im pretty new to scripting and Programming in gerneral so please dont be mad if this is a stupid Question. Im trying to use _FileListToArrayRec to search for a specific Subfolder on an NAS Server Via GUIinputbox, but i cant seem to get an array output while i use the Path to the NAS Server. Sadly because company data is involved i cant share much of the code but here is an example what i am trying to use Error: #include <Array.au3> #include <File.au3> #include <MsgBoxConstants.au3> Example() Func Example() $Searchfor = "%21006051" $path = "T:\dir\dir\dir\dir\dir\dir" $aArray = _FileListToArrayRec($path, $Searchfor &"*" &"|", $FLTAR_FOLDERS, $FLTAR_RECUR, $FLTAR_SORT) _ArrayDisplay($aArray, "Sorted tree") EndFunc on the other hand if i copy the folder im trying to search to my desktop and change the path it works just fine. Returns an Array with the wanted Subfolder: #include <Array.au3> #include <File.au3> #include <MsgBoxConstants.au3> Example() Func Example() $Searchfor = "%21006051" $path = "C:\Users\privat\Desktop\autoit" $aArray = _FileListToArrayRec($path, $Searchfor &"*" &"|", $FLTAR_FOLDERS, $FLTAR_RECUR, $FLTAR_SORT) _ArrayDisplay($aArray, "Sorted tree") EndFunc Please Help