
gobsor
Active Members-
Posts
42 -
Joined
-
Last visited
gobsor's Achievements

Seeker (1/7)
0
Reputation
-
Focus/Highlight a certain item in a ListView?
gobsor replied to gobsor's topic in AutoIt GUI Help and Support
Thanks you! Its just as fine as a 'normal' highlight. At least it does its job and prevents the user from getting confused in what row he currently is. Will use your code and put it into my little tool when I find some time the upcoming days. Greetings -
Focus/Highlight a certain item in a ListView?
gobsor replied to gobsor's topic in AutoIt GUI Help and Support
That's almost what I've been looking for, its just as fine though.. But, tbh, its pretty much code for such a little effect. I still might use it though since it enhances the oversight when the user is editing the ListView (using inputs below it in combination with a button to change the values of each row). Each time the user clicks the input field the focus on the ListView is lost and therefore the highlight, too. Your little work-around posted above might be very useful though, let's hope there'll be some function for it coming up in 2011 -
Focus/Highlight a certain item in a ListView?
gobsor replied to gobsor's topic in AutoIt GUI Help and Support
Oh, I was fiddling with GUICtrlSetBkColor(), though I couldn't work out to change the last _GUICtrlListView_ClickItem() 'clicked' row's colour. I rather keep my hands off those functions you just hooked me up with, at least until I got used to AU3 better Thanks for your help -
Focus/Highlight a certain item in a ListView?
gobsor replied to gobsor's topic in AutoIt GUI Help and Support
Ah, okay. Would be easier to just change the default LisstView-Highlighted color. Not possible, is it? And how do I change the color for the '_ClickItem($h, $index)' $index'th row? -
Focus/Highlight a certain item in a ListView?
gobsor replied to gobsor's topic in AutoIt GUI Help and Support
Thanks, works fine like this. Just everytime I click on a button or input or just elsewhere, the focus/highlight gets lost. Is it possible to have at least one item focused/highlighted all the time? (Always I press 'Move UP' or 'Move DN' the selection/highlight disappears for a millisec, when I press some other button ([bROWSE]) then it disappears at all.) greets -
Hello, Why doesn't this code select/highlight (in blue 'this-row-is-selected'-colour) the first row in the ListView after loading files to it, using the 'LOAD' button? (As far as I understood it, _GUICtrlListView_SetItemSelected() and _GUICtrlListView_SetItemFocused() should do the job) #include <GuiConstants.au3> #include <GuiListView.au3> #include <File.au3> GUICreate("test", 500, 500) $hListView = GUICtrlCreateListView("", 5, 5, 490, 400, $LVS_SINGLESEL, $LVS_EX_GRIDLINES + $LVS_EX_FULLROWSELECT) _GUICtrlListView_AddColumn($hListView, "#", 30) _GUICtrlListView_AddColumn($hListView, "A", 170) _GUICtrlListView_AddColumn($hListView, "B", 170) $idLoad = GUICtrlCreateButton("LOAD", 295, 410, 200, 80) GUISetState(@SW_SHOW) While 1 $msg = GUIGetMsg() If $msg == $GUI_EVENT_CLOSE Then ExitLoop If $msg == $idLoad Then _load() WEnd Func _load() $path = FileSelectFolder("Browse Folder", @DesktopDir, 4) If Not @error Then $ar = _FileListToArray($path, "*.*") For $i = 0 To UBound($ar)-1 Step 1 GUICtrlCreateListViewItem($i & "|" & $ar[$i] & "|" & "test", $hListView) Next $bTest_1 = _GUICtrlListView_SetItemSelected($hListView, 0, True, True) ; Tested both of these functions, in combination or each alone with different values, no effects still MsgBox(0, "SetItemSelected() returned:", $bTest_1) ; $bTest_2 = _GUICtrlListView_SetItemFocused($hListView, 0, True) MsgBox(0, "SetItemFocused() returned:", $bTest_2) EndIf EndFunc ;==> _load() In my actual project I want to highlight rows after a button is pressed or if one clicks a certain row. Not that much of a problem if I, somehow, get those functions working. Or am I failing basically here, ie. using the wrong functions? Any help appreciated. rgrds
-
Hey, I wrote a little tool to edit ID3 tags for audiofiles in a certain folder. Though, when I press "Tag ALL" button, it starts tagging each *.mp3 file with the certain specified tags. I made a GUICtrlCreateEdit() that is $ES_READONLY, though, when the au3 script tags the MP3 files (using AudioGenie3.dll), each function for the specific tag (_setID3Artist() etc) returns @error == 0 on success, @error > 0 depending on what error occured. I thought to make it more visual I put it all to a debug field (my GUICtrlCreateEdit()). The piece of code looks like that: Note: this is just example/dummy code to explain my issue, not supposed to be working For $i = 0 to $iAmountMP3Files Step 1 _setID3Artist($hFile[$i], "cool name") If Not @error Then GUICtrlSetData($hDebug, $filename[$i] & " tagging [OK]", "keep") Else GUICtrlSetData($hDebug, $filename[$i] & " failed to tag [ERROR]", "keep") EndIf Next With just a few MP3 files it works, but if I tag like 1000 the same time GUICtrlSetData($hDebug, ...) seems to be failing, somehow it just doesn't write into the GUICtrlCreateEdit() ($hDebug) anymore, just stops at a certain position. Is there a limit of characters the $hDebug can hold at a time? If so, how to increase this? Or is there a similiar GUI instance that can contain more characters at one time? rgrds g0b
-
ID3.au3 UDF - Problem writing Tag
gobsor replied to gobsor's topic in AutoIt General Help and Support
Thanks, already found this AudioGenie3 UDF. The MemoryDLL looks pretty interesting though. rgrds -
ID3.au3 UDF - Problem writing Tag
gobsor replied to gobsor's topic in AutoIt General Help and Support
Opened it in WinAMP and viewed the fields there. Yeh, I came across other forum posts on that UDF. Seems its pretty glitched. If one who knows AU3 better than me could fix the UDF - *thumbs up*. If not, probably gonna use some DLL (found AudioGenie3.dll on Google which apparently supports most functions that I need). Though I thought without some external file (*.dll/*.exe/*.w/e) it would be sexier. @sleepy: If you're going to do the job keep us pasted please :-) regards -
ID3.au3 UDF - Problem writing Tag
gobsor replied to gobsor's topic in AutoIt General Help and Support
I lied.. It was pretty late yesterday and the example-test-code provided in my last code doesn't work. I commented out the old code when writing it and accidently set a comment for _ID3WrtieTag(), too, I didn't check if the tags were written I just checked for the length of the MP3-file displayed in WinAMP... I added _ID3WriteTag() and used NULL-termination when I noticed I accidently commented it out.. and guess what.. failed again! Though, even adding a NULL-termination to the strings doesn't work. Still screws the shown playtime. If anyone has further ideas.. I'm open for any suggestions. I'll keep on trying to get this working and keep you pasted if i find some workaround or any solution to this matter. -
ID3.au3 UDF - Problem writing Tag
gobsor replied to gobsor's topic in AutoIt General Help and Support
Ah, thanks. When reading tags, it gives you a NULL terminated string. Fields ('TPE1', 'TIT2') are apparently 30 chars in length, if artist name is less than 30 chars rest is filled with 0's. I guess I have to fill up my AutoIT strings with 0's then to get it working properly. I'll try when I find a few spare minutes and let you know the result. rgrds EDIT: Found some spare time right now.. Made this test code and 'null-terminate' my strings with it before using them on _ID3SetTag() provided by ID3 UDF. Works for me now. Not sure though if all fields have same length, but that's basically what to do to avoid the tag function screwing up MP3 length (playtime). Apparently the length of a track is the total size of headers or summat, too lazy to look it up right now but I'm sure one can find it on the official ID3vX website in the RFC. #include <File.au3> _strAddNULLTerm("yo this is test aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") Func _strAddNULLTerm($sString) $sStr = "" $aAsc = StringToASCIIArray($sString) $size = UBound($aAsc)-1 If $size > 29 Then For $i = 0 To 29 $sStr &= Chr($aAsc[$i]) Next Return $sStr Else $left = 29 - $size For $i = 0 To $size $sStr &= Chr($aAsc[$i]) Next For $i = 0 To $left-1 $sStr &= Chr(0) Next Return $sStr EndIf EndFunc ;==> _strAddNULLTerm($sString) -
ID3.au3 UDF - Problem writing Tag
gobsor replied to gobsor's topic in AutoIt General Help and Support
That's weird, because when I use this code on any *.MP3 file it screws the length ('playtime') of the file. When i add the file to my winamp playlist BEFORE tagging, it shows 3:14 length. When I tag it and re-drag&drop it into my playlist it suddently shows some wrong mm:ss length. Some MP3 files with ie. 3:25 length suddently show 23:46 or 22:16 or just 00:00. Any suggestions? -
ID3.au3 UDF - Problem writing Tag
gobsor replied to gobsor's topic in AutoIt General Help and Support
What MP3 path? _ID3WriteTag("a.mp3") a.mp3 in same path like script? -
Hello once again! I've experianced another problem with I'm using the latest UDF version: http://www.autoitscript.com/forum/index.php?app=core&module=attach§ion=attach&attach_id=31144 Here is my example code: #include <GUIConstantsEx.au3> #include "ID3.au3" GUICreate("test", 100, 100) $b = GUICtrlCreateButton("a", 40, 40, 20, 20) GUISetState(@SW_SHOW) While(1) $msg = GUIGetMsg() If $msg == $GUI_EVENT_CLOSE Then ExitLoop EndIf If $msg == $b Then _ID3SetTagField("TIT2", "title") _ID3SetTagField("TPE1", "artist") _ID3WriteTag("a.mp3") EndIf WEnd When pressing button 'a' the file actually gets tagged, artist is set to 'artist', title is set to 'title', just somehow this messes up the length (playtime) shown in WinAMP. What am I doing wrong? Using the ID3_Example_GUI.au3 provided with the UDF it just works fine, apparently. Though, when I tag the 'a.mp3' using my example code (I tried different *.MP3 files though) one file that has usually 3:45 playtime is after tagging, shown as 00:00. Another that should be 4:17 was after tagging showing '23:27' in WinAMP. Thanks in advance, gob