Skocz do zawartości
  • 👋 Witaj na MPCForum!

    Przeglądasz forum jako gość, co oznacza, że wiele świetnych funkcji jest jeszcze przed Tobą! 😎

    • Pełny dostęp do działów i ukrytych treści
    • Możliwość pisania i odpowiadania w tematach
    • System prywatnych wiadomości
    • Zbieranie reputacji i rozwijanie swojego profilu
    • Członkostwo w jednej z największych społeczności graczy

    👉 Dołączenie zajmie Ci mniej niż minutę – a zyskasz znacznie więcej!

    Zarejestruj się teraz

[problem] Pętla pozycja myszy


Rekomendowane odpowiedzi

Opublikowano

Z tutka zrobiłem ten mały programik pozycja myszy i chciałem zrobić by weszło to w pętlę lecz coś nie działa, sam program chodzi lecz pokazuje tylko jedna startową pozycję, gdy naciskam enter i ruszam myszką w tym samym czasie nic to nie daje, zapewne coś źle zrobiłem albo nie dodałem do kodu.

 

MsgBox(0, "Pozycja Myszy", "Moja pierwsza aplikacja która pokaze nam pozycję myszki ")
Local $x, $y, $title
$title = "Info"
$x = MouseGetPos(0)
$y = MouseGetPos(1)
Sleep(1000)
For $i = 0 To 5
MsgBox(64, $title, "Wykonanie nr " & $i & "." & @CRLF & "Pozycja myszy to: " & $x &", "& $y & "!")
Next

Weteran
Opublikowano

Powinno wyglądać tak.

MsgBox(0, "Pozycja Myszy", "Moja pierwsza aplikacja która pokaze nam pozycję myszki ")
Local $x, $y, $title
$title = "Info"
For $i = 0 To 5
$x = MouseGetPos(0)
$y = MouseGetPos(1)
MsgBox(64, $title, "Wykonanie nr " & $i & "." & @CRLF & "Pozycja myszy to: " & $x &", "& $y & "!")
Next

 

 

Ja proponował bym ci coś takiego.

MsgBox(0, "Pozycja Myszy", "Moja pierwsza aplikacja która pokaze nam pozycję myszki ")
Local $x, $y, $title, $i
$title = "Info"
While 1
Sleep(100)
$i +=1
$x = MouseGetPos(0)
$y = MouseGetPos(1)
ToolTip("Wykonanie nr " & $i & "." & @CRLF & "Pozycja myszy to: " & $x & " " & $y & "!",0,0,$title)
WEnd

1329036830-U154499.png
Opublikowano

Dzięki pomogło, teraz zrobiłem coś takiego i chciałbym aby to wyświetlał w labelu.

 

#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 221, 401, 192, 124)
$Button1 = GUICtrlCreateButton("PUSH", 0, 0, 219, 81)
GUICtrlCreateLabel("", 0, 80, 4, 4)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
 Case $GUI_EVENT_CLOSE
  Exit
 Case $Form1
 Case $Button1
  MsgBox(0, "Pozycja Myszy", "Moja pierwsza aplikacja która pokaze nam pozycję myszki ")
  Local $x, $y, $i, $title
  $title = "Info"
  While 1
  Sleep(100)
  $i +=1
  $x = MouseGetPos(0)
  $y = MouseGetPos(1)
  ToolTip("Wykonanie nr " & $i & "." & @CRLF & "Pozycja myszy to: " & $x & " " & $y & "!",0,0,$title)
  WEnd
EndSwitch
WEnd

 

Dobra pozycje już wiem jak.

Weteran
Opublikowano

#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 221, 401, 192, 124)
$Button1 = GUICtrlCreateButton("PUSH", 0, 0, 219, 81)
$label = GUICtrlCreateLabel("", 0, 150, 100, 40)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
 Case $GUI_EVENT_CLOSE
  Exit
 Case $Form1
 Case $Button1
  MsgBox(0, "Pozycja Myszy", "Moja pierwsza aplikacja która pokaze nam pozycję myszki ")
  Local $x, $y, $i, $title
  $title = "Info"
  While 1
  Sleep(100)
  $i +=1
  $x = MouseGetPos(0)
  $y = MouseGetPos(1)
  GUICtrlSetData($label,"Wykonanie nr " & $i & "." & @CRLF & "Pozycja myszy to: " & $x & " " & $y & "!")
  WEnd
EndSwitch
WEnd

 

Tak wystarczy zrobić.

1329036830-U154499.png
Opublikowano

Dzięki ci za pomoc ;) Zrobiłem teraz coś takiego i jest problem z zamykaniem bo wcale nie reaguje.

 

#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Pozycja Myszy", 221, 401, 192, 124)
$Button1 = GUICtrlCreateButton("PUSH", 0, 0, 220, 81)
$Button2 = GUICtrlCreateButton("EXIT", 0, 350, 220, 50)
$label1 = GUICtrlCreateLabel("", 10, 125, 200, 40)
$label2 = GUICtrlCreateLabel("Moja pierwsza aplikacja która pokaze nam pozycję myszki ", 10, 85, 200, 26)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
 Case $GUI_EVENT_CLOSE
  Exit
 Case $Form1
 Case $Button1
  Local $x, $y, $title
  $title = "Info"
  While 1
  Sleep(100)
  $x = MouseGetPos(0)
  $y = MouseGetPos(1)
  GUICtrlSetData($label1, "Pozycja myszy to: " & $x & " " & $y & "!")
  WEnd
  Case $Button2
   Exit
EndSwitch
WEnd

Opublikowano

Dzięki pomogło ;) Coś takiego mam:

 

#AutoIt3Wrapper_Res_Field=ProductVersion|1.0.0.1
#AutoIt3Wrapper_Res_Field=ProductName|Pozycja Myszy
#AutoIt3Wrapper_Res_Field=OriginalFileName|setup.exe
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Pozycja Myszy", 221, 401, 192, 124)
$Button1 = GUICtrlCreateButton("PUSH", 0, 0, 220, 81)
$label1 = GUICtrlCreateLabel("", 10, 125, 200, 40)
$label2 = GUICtrlCreateLabel("Moja pierwsza aplikacja która pokaze nam pozycję myszki ", 10, 85, 200, 26)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
HotKeySet("{ESC}", "Off")
  Func Off()
Exit 0
EndFunc
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
 Case $GUI_EVENT_CLOSE
  Exit
 Case $Form1
 Case $Button1
  Local $x, $y, $title
  $title = "Info"
  While 1
  Sleep(100)
  $x = MouseGetPos(0)
  $y = MouseGetPos(1)
  GUICtrlSetData($label1, "Pozycja myszy to: " & $x & " " & $y & "!")
  WEnd
EndSwitch
WEnd

 

Mam jeszcze takie pytanie chciałem zmodyfikować radio player który jest na forum AutoIt tak aby stacje radiowe można było dodawać poprzez plik .xml lub .ini mógłbyś jakoś nakierować co zrobić?

Opublikowano

Tu masz kod trochę go odchudziłem:

 

 

#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_Icon=1.ico
#AutoIt3Wrapper_Outfile=Radio-MetiS_x64.exe
#AutoIt3Wrapper_UseX64=n
#AutoIt3Wrapper_Res_Comment=MetiS WebSite - <!-- m --><a class="postlink" href="http://www.metis.myshell.pl">http://www.metis.myshell.pl</a><!-- m -->
#AutoIt3Wrapper_Res_Description=Radio-MetiS
#AutoIt3Wrapper_Res_Fileversion=1.3.0.1
#AutoIt3Wrapper_Res_Fileversion_AutoIncrement=p
#AutoIt3Wrapper_Res_LegalCopyright=MetiS
#AutoIt3Wrapper_Res_Language=1045
#AutoIt3Wrapper_Run_AU3Check=n
#AutoIt3Wrapper_Tidy_Stop_OnError=n
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
TraySetIcon(@ScriptFullPath, -5)
TrayTip("Radio Net By MetiS. ", "Kliknij aby wybrać stację", 2, 1)
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <ProgressConstants.au3>
#include <WindowsConstants.au3>
Global $u
Global $oWMP
Global $return
Global $chanel
Global $nazwa
Global $chanela
Global $nazwaa
Global $1
Global $2
Global $4
Global $3
Global $5
Global $stacja
#include <Array.au3>
#include <String.au3>
AutoItSetOption("TrayMenuMode", 1 + 2)
#region ### START Koda GUI section ### Form=
Opt("GUIOnEventMode", 1)
$Form2 = GUICreate("Radio Net By Metis", 320, 69, 5, 5)
GUISetOnEvent($GUI_EVENT_CLOSE, "ex")
GUISetBkColor(0x0054E3)
$Label1 = GUICtrlCreateLabel("Twórca  :", 8, 8, 48, 17)
GUICtrlSetColor(-1, 0xFFFF00)
$Label2 = GUICtrlCreateLabel("MetiS", 56, 8, 127, 17)
GUICtrlSetColor(-1, 0x00008B)
$Label3 = GUICtrlCreateLabel("Website :", 8, 25, 48, 17)
GUICtrlSetColor(-1, 0xFFFF00)
$Label4 = GUICtrlCreateLabel("www.metis.myshell.pl", 56, 25, 127, 17)
GUICtrlSetColor(-1, 0x00008B)
$Label5 = GUICtrlCreateLabel("Aktualne Radio :", 8, 42, 80, 17)
GUICtrlSetColor(-1, 0xFFFF00)
$Label6 = GUICtrlCreateLabel("Radio Wyłączone", 90, 42, 227, 17)
GUICtrlSetColor(-1, 0x00008B)
GUISetState(@SW_HIDE)
#endregion ### END Koda GUI section ###
;menu
$play_S = TrayCreateItem("Sterowanie")
TrayCreateItem("") ;pasek
;RMF/Polskie-Radio
$ezpr = TrayCreateMenu("RMF/Polskie Radio")
$rmffm = TrayCreateItem("RMF FM", $ezpr)
$rmfmax = TrayCreateItem("RMF MAXXX", $ezpr)
$hot311 = TrayCreateItem("Jedynka - Polskie Radio", $ezpr)
$hot312 = TrayCreateItem("Dwójka - Polskie Radio", $ezpr)
$hot313 = TrayCreateItem("Trójka - Polskie Radio", $ezpr)
$hot314 = TrayCreateItem("Zagranica - Polskie Radio", $ezpr)
TrayCreateItem("")
;.977 The Hitz Channel
$ezpr = TrayCreateMenu("977 Music")
$977thc = TrayCreateItem(".977 The Hitz Channel", $ezpr)
TrayCreateItem("")
$info = TrayCreateItem("INFO")
$exititem = TrayCreateItem("Wyjście")
TraySetState()
While 1
$msg = TrayGetMsg()
Select
 Case $msg = 0
  ContinueLoop
 Case $msg = $info
  GUISetState(@SW_SHOW, $Form2)
 Case $msg = $play_S
  If TrayItemGetText($play_S) = "GRAJ" Then
   If $u = 1 Then
 $oWMP.controls.play()
 TraySetIcon(@ScriptFullPath, -6)
 TrayItemSetText($play_S, "STOP")
 GUICtrlSetData($Label6, StringTrimRight(GUICtrlRead($Label6), 8))
 $u = 1
   Else
 MsgBox(16, "Error", "Nie wybrano stacji")
   EndIf
  ElseIf TrayItemGetText($play_S) = "STOP" Then
   If $u = 1 Then
 $oWMP.controls.stop()
 TraySetIcon(@ScriptFullPath, -5)
 TrayItemSetText($play_S, "GRAJ")
 GUICtrlSetData($Label6, GUICtrlRead($Label6) & " - STOP")
 ;$u = 0
   Else
 MsgBox(16, "Error", "Nie wybrano stacji")
   EndIf
  ElseIf TrayItemGetText($play_S) = "STOP" Then
   If $u = 1 Then
 $oWMP.controls.pause()
 TrayItemSetText($play_S, "GRAJ")
 TraySetIcon(@ScriptFullPath, -6)
   Else
 MsgBox(16, "Error", "Nie wybrano stacji")
   EndIf
  Else
   MsgBox(16, "Error", "Brak Zadań. Proszę włączyć Radio.")
  EndIf
 Case $msg = $rmffm
  If $u = 1 Then
   $oWMP.URL = "http://www.miastomuzyki.pl/rmffm.asx"
   $chanela = "test"
   $nazwaa = "test"
   GUICtrlSetData($Label6, TrayItemGetText($rmffm))
   TSET()
   $URL = "http://www.miastomuzyki.pl/rmffm.asx"
  Else
   SETE()
   $oWMP.URL = "http://www.miastomuzyki.pl/rmffm.asx"
   $chanela = "-"
   $nazwaa = "-"
   GUICtrlSetData($Label6, TrayItemGetText($rmffm))
   $URL = "http://www.miastomuzyki.pl/rmffm.asx"
  EndIf
 Case $msg = $rmfmax
  If $u = 1 Then
   $oWMP.URL = "http://www.miastomuzyki.pl/rmfmaxxx.asx"
   $chanela = "-"
   $nazwaa = "-"
   GUICtrlSetData($Label6, TrayItemGetText($rmfmax))
   TSET()
   $URL = "http://www.miastomuzyki.pl/rmfmaxxx.asx"
  Else
   SETE()
   $oWMP.URL = "http://www.miastomuzyki.pl/rmfmaxxx.asx"
   $chanela = "-"
   $nazwaa = "-"
   GUICtrlSetData($Label6, TrayItemGetText($rmfmax))
   $URL = "http://www.miastomuzyki.pl/rmfmaxxx.asx"
  EndIf
 Case $msg = $977thc
  If $u = 1 Then
   $oWMP.URL = "http://205.188.215.230:8002"
   $chanela = "-"
   $nazwaa = "-"
   GUICtrlSetData($Label6, TrayItemGetText($977thc))
   TSET()
   $URL = "http://205.188.215.230:8002"
  Else
   SETE()
   $oWMP.URL = "http://205.188.215.230:8002"
   $chanela = "-"
   $nazwaa = "-"
   GUICtrlSetData($Label6, TrayItemGetText($977thc))
   $URL = "http://205.188.215.230:8002"
  EndIf
  ;koniec radja
 Case $msg = $exititem
  ExitLoop
EndSelect
WEnd
Exit
Func SET()
TrayItemSetText($play_S, "STOP")
TraySetIcon(@ScriptFullPath, -6)
EndFunc   ;==>SET
Func TSET()
SET()
EndFunc   ;==>TSET
Func SETE()
$u = 1
$oWMP = ObjCreate("WMPLayer.ocx")
TrayItemSetText($play_S, "STOP")
TraySetIcon(@ScriptFullPath, -6)
EndFunc   ;==>SETE

 

 

a tu dam ci orginał:

 

http://pastebin.com/Cb4P4Tp7

 

Co do tego radia nie chce działać w nim funkcja Aktualnie Gra wyskakuje MsgBox że funkcja wyłączona, a nie wiem jak ja włączyć :D Właśnie chciałbym też zrobić tak aby w ToolTip pokazywał aktualnie grany utwór z możliwością wyłączenia tego ;) Gdybym został jakoś nakierowany jak to zrobić to może udałoby mi się bo tak serio bawię się AutoIt od dwóch dni ;)

Opublikowano

zrób to na tablicach, a wszystkie stringi, które ustawiasz po wybraniu stacji zapisuj w pliku txt. Zamiast 14 linijek * ilosc stacji, będziesz miał 14 i dodanie kolejnej będize polegało na dopisaniu paru stringów w txt

 

Właśnie chciałbym też zrobić tak aby w ToolTip pokazywał aktualnie grany utwór z możliwością

raczej nie wyciągniesz tego

Opublikowano

Tak serio dużo mi to nie mówi, jak byś mógł dać coś na przykładzie bo jak pisałem dopiero zacząłem się bawić tym programem.

A i sory za brak prefiksu [problem] znów mi się zapomniało.

Opublikowano

ogarnij sobie funkcje

FileOpen

FileReadLine

FileClose

 

tablice i pętle for to next

 

 

#include <file.au3>
#include <array.au3> ;dla _arrayDisplay
$file = fileopen("sciezka do pliku, np z linkami do radiów (lol?)")
global $tablica[_FileCountLines($file)]
for $i = 0 to UBound($tablica) - 1 ;ubound zwraca ilosć elementów tablicy
$tablica[$i] = filereadline($file, $i+1)
next
_ArrayDisplay($tablica)
FileClose($file)

 

oganij se plik i daj ścieżke do niego i obczaj jak to działa

Opublikowano

Coś takiego mam tylko jak to wgrać do programu:

 

Local $file = FileOpen("test.txt", 0)
If $file = -1 Then
   MsgBox(0, "Error", "Błąd ładowania pliku.")
   Exit
EndIf
While 1
   Local $line = FileReadLine($file)
   If @error = -1 Then ExitLoop
   MsgBox(0, "Stacja Radiowa", $line)
WEnd
FileClose($file)

Opublikowano

 

 

#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_Icon=1.ico
#AutoIt3Wrapper_Outfile=Radio-MetiS_x64.exe
#AutoIt3Wrapper_UseX64=n
#AutoIt3Wrapper_Res_Comment=MetiS WebSite - <!-- m --><a class="postlink" href="http://www.metis.myshell.pl">http://www.metis.myshell.pl</a><!-- m -->
#AutoIt3Wrapper_Res_Description=Radio-MetiS
#AutoIt3Wrapper_Res_Fileversion=1.3.0.1
#AutoIt3Wrapper_Res_Fileversion_AutoIncrement=p
#AutoIt3Wrapper_Res_LegalCopyright=MetiS
#AutoIt3Wrapper_Res_Language=1045
#AutoIt3Wrapper_Run_AU3Check=n
#AutoIt3Wrapper_Tidy_Stop_OnError=n
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
TraySetIcon(@ScriptFullPath, -5)
TrayTip("Radio Net By MetiS. ", "Kliknij aby wybrać stację", 2, 1)
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <ProgressConstants.au3>
#include <WindowsConstants.au3>
Global $u
Global $oWMP
Global $return
Global $chanel
Global $nazwa
Global $chanela
Global $nazwaa
Global $1
Global $2
Global $4
Global $3
Global $5
Global $stacja
#include <Array.au3>
#include <String.au3>
#include <file.au3>
$iloscStacji = _FileCountLines($file)
;wczytanie z pliku nazw
$file = fileopen("sciezka do pliku, np z linkami do radiów (lol?)")
global $nazwy[iloscStacji]
for $i = 0 to iloscStacji - 1
$tablica[$i] = filereadline($file, $i+1)
next
FileClose($file)
;;end
AutoItSetOption("TrayMenuMode", 1 + 2)
#region ### START Koda GUI section ### Form=
Opt("GUIOnEventMode", 1)
$Form2 = GUICreate("Radio Net By Metis", 320, 69, 5, 5)
GUISetOnEvent($GUI_EVENT_CLOSE, "ex")
GUISetBkColor(0x0054E3)
$Label1 = GUICtrlCreateLabel("Twórca  :", 8, 8, 48, 17)
GUICtrlSetColor(-1, 0xFFFF00)
$Label2 = GUICtrlCreateLabel("MetiS", 56, 8, 127, 17)
GUICtrlSetColor(-1, 0x00008B)
$Label3 = GUICtrlCreateLabel("Website :", 8, 25, 48, 17)
GUICtrlSetColor(-1, 0xFFFF00)
$Label4 = GUICtrlCreateLabel("www.metis.myshell.pl", 56, 25, 127, 17)
GUICtrlSetColor(-1, 0x00008B)
$Label5 = GUICtrlCreateLabel("Aktualne Radio :", 8, 42, 80, 17)
GUICtrlSetColor(-1, 0xFFFF00)
$Label6 = GUICtrlCreateLabel("Radio Wyłączone", 90, 42, 227, 17)
GUICtrlSetColor(-1, 0x00008B)
GUISetState(@SW_HIDE)
#endregion ### END Koda GUI section ###

;menu
$play_S = TrayCreateItem("Sterowanie")
TrayCreateItem("") ;pasek
;RMF/Polskie-Radio
for $i=1 to $iloscStacji
$stacje[$i-1] = TrayCreateMenu($nazwy[$i-1])
next
$info = TrayCreateItem("INFO")
$exititem = TrayCreateItem("Wyjście")
TraySetState()
While 1
$msg = TrayGetMsg()
Select
 Case $msg = 0
  ContinueLoop
 Case $msg = $info
  GUISetState(@SW_SHOW, $Form2)
 Case $msg = $play_S
  If TrayItemGetText($play_S) = "GRAJ" Then
	If $u = 1 Then
	 $oWMP.controls.play()
	 TraySetIcon(@ScriptFullPath, -6)
	 TrayItemSetText($play_S, "STOP")
	 GUICtrlSetData($Label6, StringTrimRight(GUICtrlRead($Label6), 8))
	 $u = 1
	Else
	 MsgBox(16, "Error", "Nie wybrano stacji")
	EndIf
  ElseIf TrayItemGetText($play_S) = "STOP" Then
	If $u = 1 Then
	 $oWMP.controls.stop()
	 TraySetIcon(@ScriptFullPath, -5)
	 TrayItemSetText($play_S, "GRAJ")
	 GUICtrlSetData($Label6, GUICtrlRead($Label6) & " - STOP")
	 ;$u = 0
	Else
	 MsgBox(16, "Error", "Nie wybrano stacji")
	EndIf
  ElseIf TrayItemGetText($play_S) = "STOP" Then
	If $u = 1 Then
	 $oWMP.controls.pause()
	 TrayItemSetText($play_S, "GRAJ")
	 TraySetIcon(@ScriptFullPath, -6)
	Else
	 MsgBox(16, "Error", "Nie wybrano stacji")
	EndIf
  Else
	MsgBox(16, "Error", "Brak Zadań. Proszę włączyć Radio.")
  EndIf
 Case $msg = $rmffm
  If $u = 1 Then
	$oWMP.URL = "http://www.miastomuzyki.pl/rmffm.asx"
	$chanela = "test"
	$nazwaa = "test"
	GUICtrlSetData($Label6, TrayItemGetText($rmffm))
	TSET()
	$URL = "http://www.miastomuzyki.pl/rmffm.asx"
  Else
	SETE()
	$oWMP.URL = "http://www.miastomuzyki.pl/rmffm.asx"
	$chanela = "-"
	$nazwaa = "-"
	GUICtrlSetData($Label6, TrayItemGetText($rmffm))
	$URL = "http://www.miastomuzyki.pl/rmffm.asx"
  EndIf
 Case $msg = $rmfmax
  If $u = 1 Then
	$oWMP.URL = "http://www.miastomuzyki.pl/rmfmaxxx.asx"
	$chanela = "-"
	$nazwaa = "-"
	GUICtrlSetData($Label6, TrayItemGetText($rmfmax))
	TSET()
	$URL = "http://www.miastomuzyki.pl/rmfmaxxx.asx"
  Else
	SETE()
	$oWMP.URL = "http://www.miastomuzyki.pl/rmfmaxxx.asx"
	$chanela = "-"
	$nazwaa = "-"
	GUICtrlSetData($Label6, TrayItemGetText($rmfmax))
	$URL = "http://www.miastomuzyki.pl/rmfmaxxx.asx"
  EndIf
 Case $msg = $977thc
  If $u = 1 Then
	$oWMP.URL = "http://205.188.215.230:8002"
	$chanela = "-"
	$nazwaa = "-"
	GUICtrlSetData($Label6, TrayItemGetText($977thc))
	TSET()
	$URL = "http://205.188.215.230:8002"
  Else
	SETE()
	$oWMP.URL = "http://205.188.215.230:8002"
	$chanela = "-"
	$nazwaa = "-"
	GUICtrlSetData($Label6, TrayItemGetText($977thc))
	$URL = "http://205.188.215.230:8002"
  EndIf
  ;koniec radja
 Case $msg = $exititem
  ExitLoop
EndSelect
WEnd
Exit
Func SET()
TrayItemSetText($play_S, "STOP")
TraySetIcon(@ScriptFullPath, -6)
EndFunc   ;==>SET
Func TSET()
SET()
EndFunc   ;==>TSET
Func SETE()
$u = 1
$oWMP = ObjCreate("WMPLayer.ocx")
TrayItemSetText($play_S, "STOP")
TraySetIcon(@ScriptFullPath, -6)
EndFunc   ;==>SETE

 

 

na początku masz ten mój poprzedni kod, uzupełnij sobie go. Dodaj plik z nazwami stacji (każda w osobnej linii) i odpal

Usuń tymaczasowo casy, żeby działało.

Reszty mi się nie chce robić ;d.

Casy sprawdzaj pętlą for, i wyszsstkie stringi wczytuj do tablicy z pliku

Zarchiwizowany

Ten temat przebywa obecnie w archiwum. Dodawanie nowych odpowiedzi zostało zablokowane.

×
×
  • Dodaj nową pozycję...