(^_^) Posted July 15, 2006 Posted July 15, 2006 ok heres whats up i have this $List = GuiCtrlCreateList("", 3, 70, 165, 115) $prop = _GetExtProperty($song,10) GUICtrlSetData($list, $prop & " " & $song) i need to get $song out of the list when that one is selected and im not sure how to. [center][font="Arial Black"] DESEAN[/font][/center] [center]<<<WOW Fi$her>>>[/center][center]<<<mp3 player>>>[/center]
PsaltyDS Posted July 15, 2006 Posted July 15, 2006 )" data-cid="207921" data-date="Jul 15 2006, 06:40 PM">ok heres whats up i have this $List = GuiCtrlCreateList("", 3, 70, 165, 115) $prop = _GetExtProperty($song,10) GUICtrlSetData($list, $prop & " " & $song) i need to get $song out of the list when that one is selected and im not sure how to. You can read the current selection in the list with GuiCtrlRead(): $Selection = GuiCtrlRead($List) Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
(^_^) Posted July 16, 2006 Author Posted July 16, 2006 ok yea it worked at gettin the selection how ever i just need to get the file path... GUICtrlSetData($list, $prop & " " & $song) so what i have written on the line is the title a few spaces and then the file path ... how would i single out just the file path? [center][font="Arial Black"] DESEAN[/font][/center] [center]<<<WOW Fi$her>>>[/center][center]<<<mp3 player>>>[/center]
(^_^) Posted July 16, 2006 Author Posted July 16, 2006 i think i might have it ... with stringtrimleft thx [center][font="Arial Black"] DESEAN[/font][/center] [center]<<<WOW Fi$her>>>[/center][center]<<<mp3 player>>>[/center]
PsaltyDS Posted July 16, 2006 Posted July 16, 2006 )" data-cid="207982" data-date="Jul 15 2006, 09:16 PM">i think i might have it ... with stringtrimleft thx The problem with StringTrimLeft() in that application is that you have to know how many characters to trim. Assuming the titles will be of different lengths, that could present a problem. How about using a ListView instead, which gives you columns for the title and the path? You could also sort of simulate a ListView with your list, since you are inserting a fixed seperator between the title and path, you could do a StringSplit on it. Say the seperator was {space}......{space} (an ellipsis of six dots with a space on each end). You could split it like this: GUICtrlSetData($list, $prop & " ...... " & $song) ; more code... $Selection = GuiCtrlRead($List) $SelSplit = StringSplit($Selection, " ...... ", 1) ; 1 = entire string for delim $Selection = $SelSplit[2] Another possibility is not store the path there in the first place (if the user doesn't need it to make the selection). Just keep the paths in a seperate array and get the one you need after the user picks a title. Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
(^_^) Posted July 16, 2006 Author Posted July 16, 2006 no i got it... if you have the script do a bit of math it figures out how many it will need to trim now im just having a problem with opening multipule files at once ill email u my script if ud like to help me figure it out [center][font="Arial Black"] DESEAN[/font][/center] [center]<<<WOW Fi$her>>>[/center][center]<<<mp3 player>>>[/center]
PsaltyDS Posted July 16, 2006 Posted July 16, 2006 )" data-cid="208019" data-date="Jul 15 2006, 10:58 PM">no i got it... if you have the script do a bit of math it figures out how many it will need to trim now im just having a problem with opening multipule files at once ill email u my script if ud like to help me figure it out Sounds like a New Topic to me... Let this thread die and start a new one with your current conundrum. Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now