| 
	
		| 
 
	
		| Vorheriges Thema anzeigen :: Nächstes Thema anzeigen |  
		| Autor | Nachricht |  
		| indy27 •->
 
  
 
 Anmeldedatum: 09.04.2001
 Beiträge: 8
 Wohnort: Austria
 
 | 
			
				|  Verfasst am: 25.05.2001 - 12:57    Titel: umschalten zwischen umgebungen - appleskript und umgebundsas |   |  
				| 
 |  
				| hallo 
 ich habe auf meinem powerbook 2 umgebunden, "intranet" für die firma (ethernet") und "kpnqwest" für unterhwegs/zuhause (modem). gibt es eine möglichkeit, mit applescript zwischen den umgebunden umzuschalten? ich brauche dies für eine bestimmte funktion als applescript, deswegen reicht es nicht, händisch mittels kontrolleiste umzuschalten.
 danke!
 mfg
 ferdinand
 (ps.: im grunde würde es aber sogar reichen, wenn ich mittels applescript zwischen konfigurationen im tcp/ip kontrollfeld umschalten könnte)
 _________________
 ferdinand fuchs
 indy27@mac.com
 |  |  
		| Nach oben |  |  
		|  |  
		| Folker •---->
 
  
  
 Anmeldedatum: 11.12.2000
 Beiträge: 649
 Wohnort: Holsteinische Schweiz
 
 | 
			
				|  Verfasst am: 25.05.2001 - 13:20    Titel: umschalten zwischen umgebungen |   |  
				| 
 |  
				| Hallo indy, 
 in Ermangelung von Zeit nur ein Script, welches ich vor einiger Zeit zu einer ähnlichen Problematik geschrieben habe. Mit ein bißchen Bastelei sollte das helfen.
 
 Folker Brandt
 
 Achso, das ist nur umschalten v. TCP
 
 --SCRIPTANFANG
 try
 set the_result to list_Config()
 if not (class of the_result = boolean) then set_aktive(item 1 of the_result)
 on error error_message number num
 beep
 if num != -128 then display dialog error_message buttons {"Ooh!"} default button 1 with icon 1
 end try
 
 on list_Config()
 try
 tell application "Network Setup Scripting"
 open database
 set the config_list to the name of every TCPIP v4 configuration
 close database
 end tell
 tell application (path to the frontmost application as text)
 choose from list the config_list with prompt "TCPIP v4 configuration:"
 end tell
 on error error_message number num
 try
 tell application "Network Setup Scripting" to close database
 end try
 error error_message number num
 end try
 end list_Config
 
 on set_aktive(the_name)
 tell application "Network Setup Scripting"
 set the transaction_ID to ""
 try
 open database
 begin transaction
 set active of TCPIP v4 configuration the_name to true
 end transaction
 close database
 set the dialog_msg to ¨
 ("TCP/IP configuration: " & the_name & " is now active.")
 on error error_msg
 try
 if the transaction_ID is not "" then abort transaction
 close database
 end try
 set the dialog_msg to the error_msg
 end try
 end tell
 tell application (path to frontmost application as text)
 display dialog dialog_msg buttons {"OK"} ¨
 default button 1 giving up after 10
 end tell
 end set_aktive
 --SCRIPTENDE
 _________________
 Gruß,
 Folker Brandt
 =============================
 Systemberatung · Datenbanken · Webdesign
 |  |  
		| Nach oben |  |  
		|  |  
		|  |  
  
	| 
 
 | Du kannst keine Beiträge in dieses Forum schreiben. Du kannst auf Beiträge in diesem Forum nicht antworten.
 Du kannst deine Beiträge in diesem Forum nicht bearbeiten.
 Du kannst deine Beiträge in diesem Forum nicht löschen.
 Du kannst an Umfragen in diesem Forum nicht mitmachen.
 
 |  
 Powered by phpBB  © 2001, 2002 phpBB Group
 Deutsche Übersetzung von phpBB.de
 |  | 
 |