
birdofprey
Active Members-
Posts
83 -
Joined
-
Last visited
Everything posted by birdofprey
-
$soundvolpb = GuiCtrlCreateProgress(390, $soundvolpbstart, 20, $soundvolpbheight, $PBS_VERTICAL) GuiCtrlSetdata($soundvolpb, $vol) where $vol is just a number from 0 to 100. And when it's a 0, the progressbar is full, and when it's 30, it's filled 70%... and so on, but just on a different system... not on mine. [Edit] It seems that my friend and I had some communicational problems. What I wrote here is perfectly valid, but the title of this topic is wrong. The vertical progress bar, fills up from bottom to top after all. Sorry... But, the problem is, still there. I get an empty progressbar when the $vol is 100 and you can hear the volume is up to maximum.
-
Thank you very much Larry. Finally !
-
The helpfiles are really thin on this topic. I tried to figure out what I was doing wrong on my own, but I now have to stop wasting my time cause I have no clue. Hopefully all I ask for here is one minute from your time to spot the problem. Except the comments regarding the script, I'd like to ask a few other questions related to this How do I close a port ? Or a connection ? Can I send data backwards ( to the initiator of an incoming connection) ? Comments regarding security issues are also more than welcome. ; SERVER - LISTENING - RECEIVES AND EXECUTES COMMANDS #region Global $myip = "127.0.0.1" Global $myport = 1117 ; server's coordinates Global $remoteip = "127.0.0.1" Global $remoteport = 1000 ;remote's coordinates Global $passkey = "#32342345#32f" Global $markstart = "~!2!" Global $markend = "@#$SEEE3112" ;general variables (temporary values) Global $handshake Global $listeningsocket Global $ConnectedlisteningSocket Global $rm ; received message Global $sm ; sent message #endregion Listen() While 1 ;~ $rm = _TCPRecieveText ($ConnectedlisteningSocket) $rm = TCPRecv ($ConnectedlisteningSocket, 1024) If $rm <> "" Then ConsoleWrite ( $rm & " <" & @LF ) Msgbox ( 0, "", $rm & " <") EndIf Sleep ("500") Wend Func Listen() TCPStartup () $listeningsocket = TCPListen ($myip, $myport, 100) ; define socket $ConnectedlisteningSocket = TCPAccept($listeningsocket) ;permit incoming EndFunc Func msg($message) ;~ if $myip = "" then $myip = _GetMyIP() $mssg = $passkey & "|" & $message & "|" & $myip & "|" & $myport & "|" & $markend ;passkey will be generated randomly... Return $mssg EndFunc Func demsg($message) Local $m $m = StringSplit($message, '|') If $m[0] = 5 And $m[1] = $passkey And $m[3] = $myip And $m[4] = $myport And $m[5] = $markend Then ; I could use this to change port randomly Return $m[2] Else ConsoleWrite ( "-- CHECK THIS OUT: " & $message ) EndIf EndFunc Func _TCPRecieveText ($iSocket) Local $vBuffer = "" Local $iBytes = -1 While 1 $vBuffer &= TCPRecv ($iSocket, 1024) If $iBytes = -1 And StringInStr ($vBuffer, $markstart) Then $iBytes = StringLeft ($vBuffer, StringInStr ($vBuffer, ",")-1) $vBuffer = StringTrimLeft ($vBuffer, StringInStr ($vBuffer, ",")) Else If StringLen ($vBuffer) = $iBytes Then $vBuffer = demsg ($vBuffer) ExitLoop EndIf EndIf WEnd Return $vBuffer EndFunc Func _TCPSendText ($iSocket, $vData) Local $vBuffer = "" $vData = msg ($vData) $vBuffer = StringLen ($vData) & $markstart & $vData TCPSend ($iSocket, $vBuffer) EndFunc Func Checkip(Byref $iptocheck) Local $t_ip $t_ip = StringSplit($iptocheck, '.') If $t_ip[0] = 4 And StringIsDigit($t_ip[1]) And StringIsDigit($t_ip[2]) And StringIsDigit($t_ip[3]) And StringIsDigit($t_ip[4]) Then Return $iptocheck Else MsgBox (0, "RSDC", "Invalid IP Address" ) EndIf EndFuncoÝ÷ Ù«¢+Ø(ì±¥¹ÐÍ¥´ÅÕ½Ðí½¹Ñɽ°Á¹°ÅÕ½Ðì)±½°ÀÌØí¡¹Í¡()±½°ÀÌØíÁÍÍäôÅÕ½ÐìÌÈÌÐÈÌÐÔÌÉÅÕ½Ðì)±½°ÀÌØíµÉÍÑÉÐôÅÕ½ÐíøÌÌìÈÌÌìÅÕ½Ðì)±½°ÀÌØíµÉ¹ôÅÕ½ÐíÀÌØíMÌÄÄÈÅÕ½Ðì()±½°ÀÌØíɵ½Ñ¥ÀôÅÕ½ÐìÄÈܸÀ¸À¸ÄÅÕ½Ðì)±½°ÀÌØíɵ½ÑÁ½ÉÐôÄÄÄÜ)±½°ÀÌØíµå¥ÀôÅÕ½ÐìÄÈܸÀ¸À¸ÄÅÕ½Ðì)±½°ÀÌØíµåÁ½ÉÐôÄÀÀÀ()±½°ÀÌØí±¥Íѹ¥¹Í½Ð)±½°ÀÌØí ½¹¹Ñ±¥Íѹ¥¹M½Ð()±½°ÀÌØí½¹¹Ñ¥½¹ÍÑÑÕÌ()±½°ÀÌØíÉ´ìÉ¥ÙµÍÍ)±½°ÀÌØíÍ´ì͹еÍÍ((¥¹±Õ±ÐíU% ½¹ÍѹÑ̹ÔÌÐì((ÀÌØí½É´Å|ÄôU% ÉÑ ÅÕ½ÐíIMÅÕ½Ðì°ÈÌȰÈÀܰÄàØ°ÄÄÔ¤((ÀÌØí1°ÄôU% Ñɱ ÉÑ1° ÅÕ½ÐíIµ½Ñ%@ÅÕ½Ðì°Äذà°ÔаÄܤ(ÀÌØí¥Á¥¹ÁÕÐôU% Ñɱ ÉÑ%¹ÁÕÐ ÀÌØíɵ½Ñ¥À°ÄØ°ÈØ°ÄÈİÈĤ((ÀÌØí±½±Ñ¥µ±ôU% Ñɱ ÉÑ1° ÅÕ½Ðí1½°Ñ¥µÅÕ½Ðì°ÄØ°ÔØ°ÔȰÄܤ(ÀÌØíɵ½ÑÑ¥µ±ôU% Ñɱ ÉÑ1° ÅÕ½ÐíIµ½ÑÑ¥µÅÕ½Ðì°ÄذṴ̈ØÌ°Äܤ((ÀÌØíÍÑÑÕͱôU% Ñɱ ÉÑ1° ÅÕ½Ðí¥Í½¹¹ÑÅÕ½Ðì°ÄÐ԰ذÜܰĨ° ¥Ñ=H ÀÌØíMM} 9QH°ÀÌØíMM}MU9-8¤¤)U% ÑɱMÑ ½±½È ´Ä°ÁáÀÀÀÀ¤(íøU% ÑɱMÑ ½±½È ÀÌØíÍÑÑÕͱ°ÁàÀÁÀÀ¤(ÀÌØí½¹¹Ñ¸ôU% Ñɱ ÉÑ ÕÑѽ¸ ÅÕ½Ðí ½¹¹ÐÅÕ½Ðì°ÄÐ̰ÈÔ°àȰÈÔ°À¤((ÀÌØí͡ɥ¼ôU% Ñɱ ÉÑI¥¼ ÅÕ½ÐíM¡Õѽݸɵ½ÑAÅÕ½Ðì°Ä̰ÄÀÀ°ÄÐÔ°Äܤ(ÀÌØí¡¥É¥¼ôU% Ñɱ ÉÑI¥¼ ÅÕ½Ðí!¥É¹Ñɵ½ÑAÅÕ½Ðì°Ä̰ÄÄà°ÄÐÔ°Äܤ((ÀÌØí1°ÔôU% Ñɱ ÉÑ1° ÅÕ½Ðí%¸èÅÕ½Ðì°ÄذÄÐÐ°ÄØ°Äܤ(ÀÌØí1°ØôU% Ñɱ ÉÑ1° ÅÕ½ÐíÐèÅÕ½Ðì°ÄØ°ÄØÜ°ÄܰÄܤ((ÀÌØíÑ¥µ¥¹ÁÕÐôU% Ñɱ ÉÑ%¹ÁÕÐ ÅÕ½ÐíÑ¥µ¥¹ÁÕÐÅÕ½Ðì°ÐÀ°ÄØà°ÔذÈĤ)U% ÑɱMÑ ÕÉÍ½È ÀÌØíÑ¥µ¥¹ÁÕаÄÔ¤((ÀÌØíÍѸôU% Ñɱ ÉÑ ÕÑѽ¸ ÅÕ½ÐíMÐÅÕ½Ðì°ÄÐܰÄÔä°ØÔ°Ḭ̀À¤(ÀÌØí%¹ÁÕÐÄôU% Ñɱ ÉÑ%¹ÁÕÐ ÅÕ½ÐìÀÅÕ½Ðì°ÐÀ°ÄÐÌ°ÔØ°ÈĤ((ÀÌØíUÁ½Ý¸ÄôU% Ñɱ ÉÑUÁ½Ý¸ ÀÌØí%¹ÁÕÐĤ)U% ÑɱMÑ1¥µ¥Ð ÀÌØíUÁ½Ý¸Ä°ÌØÀ°À¤)U% ÑɱMÑQ¥À ´Ä°ÅÕ½Ðí5¥¹ÕÑÌչѥ°Í¡Õѽݸ½¡¥É¹Ñ¥½¸ÅÕ½Ðì¤()U%MÑMÑÑ¡M]}M!=¤()]¡¥±Ä($ÀÌØí¹5ÍôU%Ñ5Í ¤(%MÝ¥Ñ ÀÌØí¹5Í($% ÍÀÌØíU%}Y9Q} 1=M($$%á¥Ð($$($% ÍÀÌØí½¹¹Ñ¸($$%¥ÀÌØí¡¹Í¡±ÐìÐìÅÕ½ÐíMÕÍÍÕ°ÅÕ½ÐìQ¡¸($$$$ÀÌØíɵ½Ñ¥ÀôU% ÑɱI ÀÌØí¥Á¥¹ÁÕФ콹¹ÐѼݡХÐÍåÌ¥¸Ñ¡½à($$$% ½¹Í½±ÝÉ¥Ñ ÅÕ½Ðì´´´´ÅÕ½ÐìµÀìÀÌØíɵ½Ñ¥ÀµÀì1¤($$$%} ½¹¹Ð ÀÌØíɵ½Ñ¥À¤($$%±Í($$$%}¥Í ½¹¹Ð ¤($$%¹%($% ÍÀÌØí%¹ÁÕÐÄ(¹MÝ¥Ñ (íø%MÝ¥Ñ ÀÌØí½¹¹Ñ¥½¹ÍÑÑÕÌ(íø$% ÍÅÕ½Ðí ½¹¹ÑÅÕ½Ðì(íø$$%1¥ÍѸ ¤(íø%¹MÝ¥Ñ )]¹()Õ¹} ½¹¹Ð ÀÌØíɵ½Ñ¥À¤($%Q AMÑÉÑÕÀ ¤($ÀÌØí¡¹Í¡ô!¹Í¡ ÀÌØíɵ½Ñ¥À¤(%%ÀÌØí¡¹Í¡ôÅÕ½ÐíMÕÍÍÕ°ÅÕ½ÐìQ¡¸($%U% ÑɱMÑ ½±½È ÀÌØíÍÑÑÕͱ°ÁàÀÁÀÀ¤($%U% ÑɱMÑÑ ÀÌØíÍÑÑÕͱ°ÅÕ½Ðí ½¹¹ÑÅÕ½Ðì¤($%U% ÑɱMÑÑ ÀÌØí½¹¹Ñ¸°ÅÕ½Ðí¥Í½¹¹ÐÅÕ½Ðì¤($% ½¹Í½±]É¥Ñ ÅÕ½Ðí!¹Í¡Ý¥Ñ ÅÕ½ÐìµÀìÀÌØíɵ½Ñ¥ÀµÀìÅÕ½Ðì¥ÌèÅÕ½ÐìµÀìÀÌØí¡¹Í¡¤(%±Í($%5Í ½à À°ÅÕ½ÐíIMÅÕ½Ðì°ÅÕ½Ðí ¹¹½Ð½¹¹ÐѼ±¥¹ÐÅÕ½Ðì¤(%¹%)¹Õ¹($)Õ¹}¥Í ½¹¹Ð ¤(%Q AM¡Õѽݸ ¤)¹Õ¹()Õ¹!¹Í¡ ÀÌØíɵ½Ñ¥À¤($ÀÌØí ½¹¹ÑM½ÐôQ A ½¹¹Ð ÀÌØíɵ½Ñ¥À°ÀÌØíɵ½ÑÁ½ÉФ($%%ÉɽÈQ¡¸(íø$$%5Í ½à À°ÅÕ½ÐíIMÅÕ½Ðì°ÅÕ½Ðí¥±Ñ¼ÉÐÍÉÙÈÌÌìÅÕ½Ðì¤($$%IÑÕɸÅÕ½Ðí¥±Ñ¼ÉÐÅÕ½Ðì($%±Í($$%}Q AM¹QáÐ ÀÌØí ½¹¹ÑM½Ð°ÅÕ½ÐíÉÑ¥¹ÌÅÕ½Ðì¤($$%%ÉɽÈQ¡¸($$$%5Í ½à À°ÅÕ½ÐíÉɽÈÅÕ½Ðì°ÅÕ½ÐíÉɽȥ¸Q AM¹èÅÕ½ÐìµÀíÉɽȤ($$%±ÍìݥйÍÝÈ($$$$ÀÌØí±¥Íѹ¥¹Í½ÐôQ A1¥ÍѸ ÀÌØíµå¥À°ÀÌØíµåÁ½ÉаÄÀÀ¤ì¥¹Í½Ð($$$$ÀÌØí ½¹¹Ñ±¥Íѹ¥¹M½ÐôQ AÁÐ ÀÌØí±¥Íѹ¥¹Í½Ð¤íÁɵ¥Ð¥¹½µ¥¹($$$$ÀÌØíÙ±¥¥¹½µ¥¹µÍÍô}Q AI¥ÙQáÐ ÀÌØí ½¹¹Ñ±¥Íѹ¥¹M½Ð¤íѵÍÌ($$$%MÝ¥Ñ ÀÌØíÙ±¥¥¹½µ¥¹µÍÍ($$$$%ÍÅÕ½ÐíÉÑ¥¹ÌÅÕ½Ðì($$$$$%IÑÕɸÅÕ½ÐíMÕÍÍÕ°ÅÕ½Ðì($$$$%ÍÅÕ½Ðí¹½±ÅÕ½Ðì($$$$$%IÑÕɸÅÕ½Ðí¹½±ÅÕ½Ðì($$$%¹MÝ¥Ñ $$($$%¹¥($%¹%)¹Õ¹()Õ¹µÍ ÀÌØíµÍͤ(íø%¥ÀÌØíµå¥ÀôÅÕ½ÐìÅÕ½ÐìÑ¡¸ÀÌØíµå¥Àô}Ñ5å%@ ¤($ÀÌØíµÍÍôÀÌØíÁÍÍäµÀìÅÕ½ÐíðÅÕ½ÐìµÀìÀÌØíµÍ͵ÀìÅÕ½ÐíðÅÕ½ÐìµÀìÀÌØíµå¥ÀµÀìÅÕ½ÐíðÅÕ½ÐìµÀìÀÌØíµåÁ½ÉеÀìÅÕ½ÐíðÅÕ½ÐìµÀìÀÌØíµÉ¹íÁÍÍäÝ¥±°¹Éѽɥ¹Ñ¼É¹½´¹ÉѸ¸¸(%IÑÕɸÀÌØíµÍÍ)¹Õ¹()Õ¹µÍ ÀÌØíµÍͤ(%1½°ÀÌØí´($ÀÌØí´ôMÑÉ¥¹MÁ±¥Ð ÀÌØíµÍͰÌäíðÌäì¤(%%ÀÌØíµlÁtôÔ¹ÀÌØíµlÅtôÀÌØíÁÍÍä¹ÀÌØíµlÍtôÀÌØíµå¥À¹ÀÌØíµlÑtôÀÌØíµåÁ½ÉйÀÌØíµlÕtôÀÌØíµÉ¹Q¡¸ì$½Õ±ÕÍÑ¡¥ÌѼ¡¹Á½ÉÐɹ½µ±ä($%IÑÕɸÀÌØíµlÉt(%¹%)¹Õ¹()Õ¹}Q AI¥ÙQáÐ ÀÌØí¥M½Ð¤(%1½°ÀÌØíÙ ÕÈôÅÕ½ÐìÅÕ½Ðì(%1½°ÀÌØí¥ åÑÌô´Ä($(%]¡¥±Ä($$ÀÌØíÙ ÕȵÀìôQ AIØ ÀÌØí¥M½Ð°ÄÀÈФ($%%ÀÌØí¥ åÑÌô´Ä¹MÑÉ¥¹%¹MÑÈ ÀÌØíÙ ÕȰÀÌØíµÉÍÑÉФQ¡¸($$$ÀÌØí¥ åÑÌôMÑÉ¥¹1Ð ÀÌØíÙ ÕȰMÑÉ¥¹%¹MÑÈ ÀÌØíÙ ÕȰÅÕ½Ðì°ÅÕ½Ð줴Ĥ($$$ÀÌØíÙ ÕÈôMÑÉ¥¹QÉ¥µ1Ð ÀÌØíÙ ÕȰMÑÉ¥¹%¹MÑÈ ÀÌØíÙ ÕȰÅÕ½Ðì°ÅÕ½Ð줤($%±Í($$%%MÑÉ¥¹1¸ ÀÌØíÙ ÕȤôÀÌØí¥ åÑÌQ¡¸($$$$ÀÌØíÙ ÕÈôµÍ ÀÌØíÙ ÕȤ($$$%á¥Ñ1½½À($$%¹%($%¹%(%]¹($(%IÑÕɸÀÌØíÙ ÕÈ)¹Õ¹()Õ¹}Q AM¹QáÐ ÀÌØí¥M½Ð°ÀÌØíÙѤ(%1½°ÀÌØíÙ ÕÈôÅÕ½ÐìÅÕ½Ðì($ÀÌØíÙÑôµÍ ÀÌØíÙѤ($ÀÌØíÙ ÕÈôMÑÉ¥¹1¸ ÀÌØíÙѤµÀìÀÌØíµÉÍÑÉеÀìÀÌØíÙÑ(%Q AM¹ ÀÌØí¥M½Ð°ÀÌØíÙ ÕȤ)¹Õ¹()Õ¹}Ñ5å%@ ¤(%1½°ÀÌØí¥À(%%%¹ÑÐ ÅÕ½Ðí¡ÑÑÀè¼½¡¥À¹å¹¹Ì¹½É¼ÅÕ½Ðì°QµÁ¥ÈµÀìÅÕ½ÐìÀäÈíù¥À¹ÑµÀÅÕ½Ðì¤Q¡¸($$ÀÌØí¥Àô¥±I¡QµÁ¥ÈµÀìÅÕ½ÐìÀäÈíù¥À¹ÑµÀÅÕ½Ðì°¥±ÑM¥é¡QµÁ¥ÈµÀìÅÕ½ÐìÀäÈíù¥À¹ÑµÀÅÕ½Ð줤($%¥±±Ñ¡QµÁ¥ÈµÀìÅÕ½ÐìÀäÈíù¥À¹ÑµÀÅÕ½Ðì¤($$ÀÌØí¥ÀôMÑÉ¥¹QÉ¥µ1Ð ÀÌØí¥À°MÑÉ¥¹%¹MÑÈ ÀÌØí¥À°ÅÕ½ÐìèÅÕ½Ð줬Ĥ($$ÀÌØí¥ÀôMÑÉ¥¹QÉ¥µI¥¡Ð ÀÌØí¥À°MÑÉ¥¹1¸ ÀÌØí¥À¤´MÑÉ¥¹%¹MÑÈ ÀÌØí¥À°ÅÕ½Ðì¼ÅÕ½Ð줬Ȥ($$ÀÌØí¥Àô ¡¥À ÀÌØí¥À¤($%IÑÕɸÀÌØí¥À(%¹%(%MÑÉÉ½È Ä¤(%IÑÕɸ´Ä)¹Õ¹ìôôÐí}Ñ%@()Õ¹ ¡¥À¡ åÉÀÌØí¥Áѽ¡¬¤(%1½°ÀÌØíÑ}¥À($ÀÌØíÑ}¥ÀôMÑÉ¥¹MÁ±¥Ð ÀÌØí¥Áѽ¡¬°Ìäì¸Ìäì¤(%%ÀÌØíÑ}¥ÁlÁtôйMÑÉ¥¹%Í¥¥Ð ÀÌØíÑ}¥ÁlÅt¤¹MÑÉ¥¹%Í¥¥Ð ÀÌØíÑ}¥ÁlÉt¤¹MÑÉ¥¹%Í¥¥Ð ÀÌØíÑ}¥ÁlÍt¤¹MÑÉ¥¹%Í¥¥Ð ÀÌØíÑ}¥ÁlÑt¤Q¡¸($%IÑÕɸÀÌØí¥Áѽ¡¬(%±Í($%5Í ½à À°ÅÕ½ÐíIMÅÕ½Ðì°ÅÕ½Ðí%¹Ù±¥%@ÉÍÌÅÕ½Ðì¤(%¹%)¹Õ¹($)Õ¹1¥ÍѸ ¤($ÀÌØí±¥Íѹ¥¹Í½ÐôQ A1¥ÍѸ ÀÌØíµå¥À°ÀÌØíµåÁ½ÉаÄÀÀ¤ì¥¹Í½Ð($ÀÌØí ½¹¹Ñ±¥Íѹ¥¹M½ÐôQ AÁÐ ÀÌØí±¥Íѹ¥¹Í½Ð¤íÁɵ¥Ð¥¹½µ¥¹($ÀÌØíÉ´ô}Q AI¥ÙQáÐ ÀÌØí ½¹¹Ñ±¥Íѹ¥¹M½Ð¤)¹Õ¹((Ì)¥Í½¹¹Ñ° ½¹¹Ñ¥¹¸¸¸¸¸¸ ½¹Ñ¸¸¸ ½Õ¹Ñ¥¹(ÅÕ½ÐíMÐÅÕ½Ðì½¹±äÑ¥Ù¥¸¸½¹¥Ñ¥½¹ÌɵÐ)Éå½ÔÍÕÉå½ÔݹÐѼ͡Õнݸ¹½Üüüü´±¥¹ÐÍ¡½Õ±Ýɹչ¥¹ÑÉÕͥٱ䡽ÈѼ¹°¤¹½ä¥¸µ¥¹ÕÑ¥¹¼¥¹ÁÕÐÉ¥Ù( Thanks in advance PS: what's the BB code for setting the hight of these codeboxes ?
-
Good idea. This will most probably stop people from doing what I did in the beginning (reseting the player object). Doing so, made my app take over more than 80 MB of memory at some point, and it didn't seem to plan to stop there, which is exactly the opposite of what I was trying to achieve by reseting that. So, I changed my script to do things "the right way", and I did that before posting... but, what I got was increasing memory, again... ...and I got fed up a bit. Maybe that's why I didn't notice that this time it wouldn't go beyond 11.9 MB anymore. It gets stuck around 11.5 MB. Thanks for mentioning that things leveled off in your experiments. I use , it's free and you can monitor more than memory, graphically with it. Right click your process, properties, performance graph tab. You might notice that those 600 KB are not necessarily 600 KB, cause what I get is very random. One more thing. What about media with variable bitrate ? Should I just poll WMGetBitrate($sObj) every now and then ? And how about a WMSetTitle(), WMSetAlbum(), WMSetGenre and so on ? Oh, and one more thing, Thanks !
-
Well, what can I say ? It beats me. Create an object. Load a song. Play the song. Close the object. Repeat. Then put your computer into hibernation. You'll see that even though you thought you closed the objects, before your system will hibernate, you'll get a number of messages, telling you something about your windows media object(s). About the memory increase. Compile your script. And monitor the private bytes allocated to the application in realtime. Still, I'll have a carefull second look at my script, but the amount of increase, 1-3 MB for every new song tells me ( I might be wrong ) that this is not something caused by one or two variables declared globally instead of locally or something like that. Cheers
-
This windows media object seems to be a resource hog... seeks for example are much more "difficult" now than with the Sound UDF. On top of this the application I created is eating up more and more memory after each song it plays. More exactly, when it starts playing those files. It might be that I did something wrong, but, I presume that a WMCloseMedia is really needed here. Setting $pObj = 0 is not working. Trying to close the object this way after a song has been played and recreating it for each new song, made me end up with dozens of such objects. I now only create a... $pObj once and reuse the object but, the private bytes allocated for the application are still increasing on every "songload".
-
It seems I found a bug ! You need to modify line nr. 203 to $iState = $pObj.playState() + 1 in order to get it work properly. It's just a workaround though, anyhow, the problem comes from StringSplit, that assigns to $array[0] the number of elements, and because of this the whole array is pushed one position... took me half a day to figure out why my script was "reporting" the currently playing script as being "paused" It took me that long, because I was rewriting my script, and... it was a lot to be rewritten. One more thing. I get an error described here: Link in the "Transitioning" faze... After I click on the msgbox, the song starts playing though.
-
"Internal" sound volume control
birdofprey replied to birdofprey's topic in AutoIt General Help and Support
Found a bug, posted it here: WMMedia UDF -
ActiveMovie Window: autoit3.exe - Unable To Locate Component (msgbox title) This application has failed to start because MSVCR71.dll was not found. Re-installing the application may fix this problem. I keep getting this message every time I start playing a song. It doesn't matter if I use _SoundPlay or CFire's WMMedia. It started happening after I played around with a ListViewEdit example, that I shaped to my needs, namely, to nothing more than a ...well... get_selected_item's_text_on_dbclick. I'm afraid I have unnecessary code in my script. And I guess the problem was caused by the lack of a DllClose($dll) or something. Reboot won't help. If I remember right, the only lines I added to my script are: Local $dll GUIRegisterMsg($WM_NOTIFY, "WM_Notify_Events") and I included the following from a file: Edit: Warning, code might be irrelevant, go to the bottom of the topic. Global Const $DebugIt = 1 Global Const $WM_NOTIFY = 0x004E Global Const $NM_FIRST = 0 Global Const $NM_CLICK = ($NM_FIRST - 2) Global Const $NM_DBLCLK = ($NM_FIRST - 3) Global $ListView = -999 Global $Gui, $editFlag Global $editCtrl = "Edit1";name of the Edit control that pops up when edit a listitem.... Func ListView_Click() ;---------------------------------------------------------------------------------------------- If $DebugIt Then _DebugPrint ("$NM_CLICK") ;~ _GUICtrlStatusBarSetText($StatusBar, "$NM_CLICK", $SB_SIMPLEID) EndIf ;---------------------------------------------------------------------------------------------- EndFunc ;==>ListView_Click Func ListView_DoubleClick() ;---------------------------------------------------------------------------------------------- If $DebugIt Then _DebugPrint ("$NM_DBLCLK") ;~ _GUICtrlStatusBarSetText($StatusBar, "$NM_DBLCLK", $SB_SIMPLEID) EndIf ;---------------------------------------------------------------------------------------------- ;~ MsgBox(0,"Double Clicked", _GUICtrlListViewGetItemText ($ListView, _GUICtrlListViewGetSelectedIndices($ListView))) MoveMedia ($pathlist[$index], $media) EndFunc ;==>ListView_DoubleClick ; ; WM_NOTIFY event handler Func WM_Notify_Events($hWndGUI, $MsgID, $wParam, $lParam) #forceref $hWndGUI, $MsgID, $wParam Local $tagNMHDR, $event, $hwndFrom, $code $tagNMHDR = DllStructCreate("int;int;int", $lParam) ;NMHDR (hwndFrom, idFrom, code) If @error Then Return $event = DllStructGetData($tagNMHDR, 3) Select Case $wParam = $ListView Select Case $event = $NM_CLICK ListView_Click () Case $event = $NM_DBLCLK ListView_DoubleClick () EndSelect EndSelect ; Proceed the default Autoit3 internal message commands. ; You also can complete let the line out. ; !!! But only 'Return' (without any value) will not proceed ; the default Autoit3-message in the future !!! Return $GUI_RUNDEFMSG EndFunc ;==>WM_Notify_Events Func _DebugPrint($s_text) $s_text = StringReplace($s_text, @LF, @LF & "-->") ConsoleWrite("!===========================================================" & @LF & _ "+===========================================================" & @LF & _ "-->" & $s_text & @LF & _ "+===========================================================" & @LF) EndFunc ;==>_DebugPrint Edit: There might be another cause, go here: http://www.autoitscript.com/forum/index.ph...mp;#entry329110 Oh, and restart does help after all.
-
"Internal" sound volume control
birdofprey replied to birdofprey's topic in AutoIt General Help and Support
Great ! Thank you ! But what do I use instead of _SoundClose() now ? -
"Internal" sound volume control
birdofprey replied to birdofprey's topic in AutoIt General Help and Support
Thanks, but that's not it. That UDF is manipulating the system volume. The master and the wave. I want to internally adjust the volume of what's currently played by my script. The idea is that I don't want to affect anything else's volume while doing that. -
Same question here 3 days ago. http://www.autoitscript.com/forum/index.php?showtopic=43835 Same reply. That's not what I'm looking for. Please send a note if you get any answers.
-
Great. So, GuiGetMsg() returns messages between -50 and 0 and -7 is the return value for a mouseclick ? But where are these values documented ? I can't see anything about this on the page with GuiGetMsg() in the helpfile... I'm currently working on the following code: While 1 $msg = GuiGetMsg() Select Case $msg = $GUI_EVENT_CLOSE Case $msg = ... Case $msg = ... Case Else ;;; EndSelect TrackTime($Media) WEnd oÝ÷ Ùh^äëiÉg¢±¶¬Æ¥+©u«b©®+zËj¶§u©Zmé^M4ÓôÓzjëh×6GUICtrlSetData ( $songprogresspb, _SoundPos ( $Media, 2 )/_SoundLength ( $Media, 2 )*100 ) GUICtrlSetData ( $timelb, _SoundPos ( $Media, 1 ) & "/" & _SoundLength ( $Media, 1 ) ) The code is working, but the label flickers because it's updated too frequently. Once a second would be enough. But if I put a sleep into this, the whole GUI will become unresponsive. Could I involve the Case Else into this ?
-
I don't want my program to mess with the master or wave volume of my system. I want the currently played file's volume to be manipulated internally (separately). Maybe I'll need to link to a library or something ? Edit: Am I asking for something impossible here ?
-
Excuse my ignorance, but, I don't get it. Case -50 ?
-
Just replace 0 with $i : $ShowFiles[$i] = GUICtrlCreateListViewItem($aListView[$i], $SourceEdit)
-
Wow. That's exactly what I tried to do myself. Your code is beautiful. It just fascinates me that... (well, I don't know how to explain this in a better way) there was a need for a $blist, but there is no need for a $clist and so on. I still don't get it completely :"> , but I'll work on that. Another thing that stopped me writing this before you is that I couldn't find the right place for that Return value. Thanks a lot ! I learned a lot.
-
Thank you abarth. It helped. I removed $x, $z, $q... made it output to an array instead of the console... and it works. I have no idea why but it works. I see a certain similarity here to my code... so the problem is not the recursive limit (if there's such a thing). But what's wrong with my script ??? Why does AutoIt crash ?
-
Ok, it wasn't simple but I figured out what the problem was. Well... at least partially. I initially thought that the variable isn't passed correctly or that Autoit doesn't like to call the functions inside the part where the function is declared. That wasn't true. The _FileListToArray returns an empty array instead of a nothing in case there are no files or folders. And it has no @error level for not finding any folders. I modified the code to (basically just changed the if criteria): Func GetFiles (ByRef $folder) $filelist =_FileListToArray ( $folder , "*.mp3" , 1 ) If UBound ($filelist) <> 1 ;<------------------------------------ $pathlist = cnv2path ($folder, $filelist) Global $pl = _ArrayMerge ( $pl, $pathlist) MsgBox (0, "$pl", $pl) EndIf EndFunc Func GetSubFolders (ByRef $folder) MsgBox (0, "111", $folder) $folderlist =_FileListToArray ( $folder , "*" , 2 ) _ArrayDisplay ($folderlist, "") If UBound ($folderlist) = 1 Then ;no subfolders <-------------- GetFiles ($folder) Else ;there are subfolders - get it's subs and files Global $pathlistf = cnv2path ($folder, $folderlist) _ArrayDisplay ($pathlistf, $pathlist[0]) For $p = 1 to $pathlistf[0] GetSubFolders ($pathlistf[$p]) Next EndIf EndFunc Problem is that AutoIt crashes after, I guess, trying to read the first subdirectory of the first directory in which it finds directories.
-
Something's wrong with my GetSubFolders() function. Even though the whole thing is fishy. I can't get rid of the feeling that there has to be a simpler way to do this. #include <File.au3> #include <Array.au3> Dim $pathlist[1] Global $pl[1] = [0] $f = FileSelectFolder ( "Choose a folder", "L:\E" , 2 ) ;~ GetFiles ($f) GetSubFolders ($f) _ArrayDisplay ($pl, "final array") Func GetFiles (ByRef $folder) $filelist =_FileListToArray ( $folder , "*.mp3" , 1 ) If $filelist <> "" Then $pathlist = cnv2path ($folder, $filelist) Global $pl = _ArrayMerge ( $pl, $pathlist) ;~ MsgBox (0, "$pl", $pl) EndIf EndFunc Func GetSubFolders (ByRef $folder) $folderlist =_FileListToArray ( $folder , "*" , 2 ) If $folderlist = "" then ;no subfolders GetFiles ($folder) Else ;there are subfolders - get it's subs and files $pathlistf = cnv2path ($folder, $folderlist) _ArrayDisplay ($pathlistf, $pathlist[0]) For $p = 1 to $pathlistf[0] msgbox (0, $p, $pathlistf[$p]) GetSubFolders ($pathlistf[$p]) ;<------- I get GetSubFolders($f) instead GetSubFolders($pathlist[$p]) I guess... _ArrayDisplay ($pathlistf[$p], $p) Next EndIf EndFunc Func cnv2path(Byref $folder, ByRef $flist) For $p = 1 to $flist[0] ReDim $pathlist[$p + 1] $pathlist[$p] = $folder & "\" & $flist[$p] ;~ MsgBox (0, $p, $pathlist[$p]) Next $pathlist[0] = UBound($pathlist) - 1 Return $pathlist EndFunc Func _ArrayMerge (ByRef $array1, ByRef $array2 ) If IsArray ($array1) then _ArrayDelete ( $array1, 0 ) _ArrayDelete ( $array2, 0 ) ReDim $array1[UBound($array1) + UBound($array2) ] For $x = 0 To UBound($array2) - 1 $array1[UBound($array1) - UBound($array2) + $x] = $array2[$x] Next ReDim $array1 [UBound($array1) + 1] For $x = UBound($array1) - 1 To 1 step -1 $array1[$x] = $array1[$x - 1] Next Else $array1 = $array2 EndIf $array1[0] = UBound($array1) - 1 ;~ _ArrayDisplay($array1, "test") Return $array1 EndFunc