Vorheriges Thema anzeigen :: Nächstes Thema anzeigen |
Autor |
Nachricht |
macmacpapa •->

Anmeldedatum: 14.03.2011 Beiträge: 3
|
Verfasst am: 14.03.2011 - 12:35 Titel: 2 Instanzen starten |
|
|
Hallo , ich bin ganz neu im Thema Applescript unterwegs und komme mit meinem Script nicht weiter.
Also es soll der VLC 2x gestartet werden mit unterschiedlicher Stream -URL.
Im Scripteditor funktioniert es wenn ich auf ausführen gehe, nur wenn ich es als Programm ab speichere geht es nicht und in Zeile 1 steht plötzlich immer der gleiche Programmname.
Wenn ich es einzeln ab speichere geht es, aber ich ich möchte dies halt in einem Script lösen. Die URL`s sind unterschiedlich.
-------------------------
Hier der Code:
tell application "VLC1"
activate
OPENURL "utp://@XXX.XXX.XXX.XXX:XXXX"
play
end tell
tell application "VLC2"
activate
OPENURL "utp://@XXX.XXX.XXX.XXX:XXXX"
play
end tell
-------------------
Ich hoffe Ihr könnte mir helfen.
Macmacpapa |
|
Nach oben |
|
 |
hubionmac •--->


Anmeldedatum: 26.02.2004 Beiträge: 245 Wohnort: Münster
|
Verfasst am: 14.03.2011 - 14:26 Titel: |
|
|
Du passt den Aufruf in AppleScript an und anstelle des reinen Namens gibst Du den ganzen Pfad zum Programm an. Also wenn VLC1 und VLC2 in Programme-Ordner liegen:
Zitat: | set vlc1 to POSIX file "/Applications/VLC1.app" as alias as text
set vlc2 to POSIX file "/Applications/VLC2.app" as alias as text
tell application vlc1 to activate
tell application vlc2 to activate |
_________________ hubionmac.com akzeptiere Paypal und Pizza |
|
Nach oben |
|
 |
macmacpapa •->

Anmeldedatum: 14.03.2011 Beiträge: 3
|
Verfasst am: 14.03.2011 - 14:58 Titel: |
|
|
Hallo hubionmac,
danke für die Antwort.
Also das Programm starten geht jetzt.
Wenn ich die URL mit einfüge geht es nicht mehr.
Es kommt ein Syntaxfehler. |
|
Nach oben |
|
 |
hubionmac •--->


Anmeldedatum: 26.02.2004 Beiträge: 245 Wohnort: Münster
|
Verfasst am: 14.03.2011 - 15:04 Titel: |
|
|
dann....
Zitat: | tell application vlc1
using terms from application "VLC"
OpenURL "utp://@XXX.XXX.XXX.XXX:XXXX"
end using terms from
end tell
|
_________________ hubionmac.com akzeptiere Paypal und Pizza |
|
Nach oben |
|
 |
macmacpapa •->

Anmeldedatum: 14.03.2011 Beiträge: 3
|
Verfasst am: 14.03.2011 - 15:20 Titel: |
|
|
Hallo nochmals,
also für einen Stream funktioniert es.
Hier mal der jetzige Code ohne die Oberen Zeilen:
---------------
tell application "VLC1"
using terms from application "VLC1"
OpenURL "udp://@xxx.xxx......"
play
end using terms from
end tell
tell application "VLC2"
using terms from application "VLC2"
OpenURL "udp://@xxx.xxx......."
play
end using terms from
end tell
------------------
Wenn ich das Script ausführe wird im 2ten Aufruf aus VLC2 --> VLC1
Warum? |
|
Nach oben |
|
 |
|