| Vorheriges Thema anzeigen :: Nächstes Thema anzeigen   | 
	
	
	
		| Autor | 
		Nachricht | 
	
	
		till •--->
  
  
  Anmeldedatum: 21.04.2005 Beiträge: 187 Wohnort: q-town (R-P)
  | 
		
			
				 Verfasst am: 22.05.2006 - 16:56    Titel: MAIL REMOTE | 
				     | 
			 
			
				
  | 
			 
			
				wie der name schon sagt es handelt sich um eine vernbedienung für den mac über e-mail mittels dem app "Mail".
 
 
Wenn ich in die betreff zeile meinen zuvor festgelegten pin eingebe
 
kann man  folgende befehle ausführen lassen indem man sie in das nachrichten feld schreibt:
 
 	  | Zitat: | 	 		  
 
mail:prozesse  = liste der aktiven programme
 
quit:system    = fährt ihren Appel herunter" 
 
mail:desk
 
 | 	  
 
 
man bekommt natürlich eine antwortbestätigung (eventuelle mit anhang -screen) kommt doch super in unserer überwachungsgesellschaft
 
nun verlange ich von euch eure eigenen ideen mit einbringt.
 
das das ganze ding mal nützlich wird!
 
außerdem könnte man das dann ganz einfach sallingcklickermäßig aufziehen wenn man das alles mit einzelnen handlern machen würde
 
 
 
 	  | Zitat: | 	 		  
 
-- hi leute hab grad was ausgekramt is scho n ein halbes jahr
 
-- alt habs fast schon vergessen: wäre aber ein toll zum erweitern im forum
 
-- vol 3// Befehle : quit all ; aktive apps ; screenie  
 
 
property eingabepin : "" -- ihr pin diesen pin müssen sie auch als betreff in den e-mails angeben
 
property absender : "" -- ihre e-mail addresse
 
property screenordner : ""
 
global inhalt, report_text, anhang
 
 
 
my festlegung()
 
 
tell application "Mail"
 
   --repeat (überwachungsmodus)
 
   set visible of every window of application "Mail" to false
 
   --end repeat
 
   activate
 
   repeat
 
      check for new mail
 
      
 
      set i to every message of inbox whose read status is false
 
      
 
      repeat with x in i
 
         set pin to subject of x
 
         set report_add to extract address from sender of x
 
         set report_name to extract name from sender of x
 
         set sign to "--automatischer antwortservice || " & return
 
         display dialog "absender: " & report_add
 
         if pin is equal to eingabepin then
 
            --display dialog "pin ist ok"
 
            set inhalt to content of x
 
            set report_txt to my diebefehle()
 
            set newMessage to make new outgoing message with properties {subject:"mail-remote-report", content:sign & "
 
         " & report_txt}
 
            tell newMessage
 
               set visible to false
 
               set sender to absender
 
               make new to recipient at end of to recipients with properties {name:report_name, address:report_add}
 
               
 
               --#1
 
               -- anhänge
 
               if anhang is not "" then
 
                  tell content
 
                     make new attachment with properties {file name:anhang} at after the last paragraph
 
                  end tell
 
               end if
 
               
 
               activate
 
               send newMessage
 
            end tell
 
            set read status of x to true
 
            
 
            --#2   
 
            --shut downer / teil von Handler
 
            if report_text is " Ihr Apple wird  Heruntergefahren " then
 
               tell application "System Events"
 
                  delay 10
 
                  shut down
 
               end tell
 
            end if
 
            
 
         else
 
            
 
            --display dialog "pin ist falsch"
 
            
 
         end if
 
      end repeat
 
      delay 100
 
   end repeat
 
   
 
end tell
 
end
 
 
 
 
 
--=====================Hands=======================
 
--BEFHLER
 
on diebefehle()
 
   --Aktive Programme--   
 
   if inhalt contains "mail:prozesse" then
 
      tell application "Finder"
 
         set appNames to name of application processes whose visible is true
 
         set dlgtext to ""
 
         repeat with appName in appNames
 
            set dlgtext to dlgtext & return & tab & appName & " ; "
 
         end repeat
 
         set anhang to ""
 
         set report_text to "
 
Geöffnet: " & return & dlgtext
 
         return report_text
 
      end tell
 
      
 
      -- quit all  +++benutzt #2
 
   else if inhalt contains "quit:system" then
 
      set report_text to " Ihr Apple wird  Heruntergefahren "
 
      set anhang to ""
 
      
 
      
 
      -- screenie  +++benutzt #1
 
   else if inhalt contains "mail:desk" then
 
      set thetime to word 5 of ((current date) as string) & "-" & word 6 of ((current date) as string) & "-" & word 7 of ((current date) as string) & "-" & word 1 of ((current date) as string)
 
      do shell script "screencapture " & quoted form of POSIX path of screenordner & thetime & ".jpg" -- ruft das für Screenshots zuständige Shellscript auf 
 
      (delay alias screenordner & thetime & ".jpg") exists
 
      set anhang to screenordner & thetime & ".jpg" as alias
 
      
 
      
 
      -- weitere befehle
 
   else
 
      set report_text to "
 
Es gibt keinen solchen befehl!" & return & return & "Befehliste:" & return & return & "mail:prozesse  = liste der aktiven programme" & return & "quit:system    = fährt ihren Appel herunter" & return & "mail:desk"
 
      
 
      set anhang to ""
 
      return report_text
 
   end if
 
end diebefehle
 
 
 
-- FESTLEGER
 
 
on festlegung()
 
   if eingabepin is "" then
 
      set eingabepin to text returned of (display dialog "Bitte Ihren Pin angeben:" & return & "Der Pin dient Zur indentifikation indem sie ihn als Betreff angeben" buttons {"OK"} default button 1 default answer "ihr mail-remote-pin/kennwort")
 
   end if
 
   if absender is "" then
 
      set absender to text returned of (display dialog "Bitte ihre in 'mail'  verwendete e-mail addresse angeben" buttons {"OK"} default button 1 default answer "till.pilot@gmx.de")
 
   end if
 
   if screenordner is "" then
 
      set screenordner to choose folder with prompt "  ...indem die Screenshots zusätzlich auf der Festplatte gespeichert werden:" without invisibles
 
   end if
 
end festlegung
 
 | 	  
 
 
 
gruß theOBSERVER _________________ ein berühmter Philosoph (<-Ich) sagte einmal:
 
" es ist nicht das Problem was uns Kopfzerbrechen macht,
 
es ist der Kopf selbst, der sich erdrückt" | 
			 
		  | 
	
	
		| Nach oben | 
		 | 
	
	
		  | 
	
	
		iScript •---->
  
  
  Anmeldedatum: 29.03.2001 Beiträge: 1116
 
  | 
		 | 
	
	
		| Nach oben | 
		 | 
	
	
		  | 
	
	
		till •--->
  
  
  Anmeldedatum: 21.04.2005 Beiträge: 187 Wohnort: q-town (R-P)
  | 
		
			
				 Verfasst am: 23.05.2006 - 18:54    Titel:  | 
				     | 
			 
			
				
  | 
			 
			
				natürlich funktioniert es!!!
 
 
danke schonmal werd mich gleich umsehen _________________ ein berühmter Philosoph (<-Ich) sagte einmal:
 
" es ist nicht das Problem was uns Kopfzerbrechen macht,
 
es ist der Kopf selbst, der sich erdrückt" | 
			 
		  | 
	
	
		| Nach oben | 
		 | 
	
	
		  | 
	
	
		iScript •---->
  
  
  Anmeldedatum: 29.03.2001 Beiträge: 1116
 
  | 
		
			
				 Verfasst am: 23.05.2006 - 23:07    Titel:  | 
				     | 
			 
			
				
  | 
			 
			
				hi till
 
bin jetzt mal dazu gekommen, dein script zu testen.
 
klappt prima. musste aber noch 2 fehler korrigieren:
 
 
      -- bei screenies 2 fehler
 
      set report_text to " Screenshot " -- zeile ergänzt, damit variable definiert ist
 
      set anhang to (screenordner & thetime & ".jpg") as alias -- die klammern müssen sein
 
 
nid schlecht   mütze ab   _________________ - anholn deit kriegen - | 
			 
		  | 
	
	
		| Nach oben | 
		 | 
	
	
		  | 
	
	
		till •--->
  
  
  Anmeldedatum: 21.04.2005 Beiträge: 187 Wohnort: q-town (R-P)
  | 
		
			
				 Verfasst am: 24.05.2006 - 16:08    Titel:  | 
				     | 
			 
			
				
  | 
			 
			
				danke .. komishc bei mir gings au ohne wie gesagt is scho länger her
 
 
ich hab gedaccht wenn mabnn noch zbg file:macHD/user/desktop/fileX.doc
 
zb schreibt dass er es sendet da mach ich mich mal rann!
 
über lange weekend
 
 
gruß till _________________ ein berühmter Philosoph (<-Ich) sagte einmal:
 
" es ist nicht das Problem was uns Kopfzerbrechen macht,
 
es ist der Kopf selbst, der sich erdrückt" | 
			 
		  | 
	
	
		| Nach oben | 
		 | 
	
	
		  | 
	
	
		till •--->
  
  
  Anmeldedatum: 21.04.2005 Beiträge: 187 Wohnort: q-town (R-P)
  | 
		
			
				 Verfasst am: 25.05.2006 - 03:38    Titel:  | 
				     | 
			 
			
				
  | 
			 
			
				so man kann sich jetzt jegliche datei -sofern man den pfad kennt-  per enail
 
senden lassen!
 
 
BEFEHl = mail:file:PFAD-end
 
(achtung zwischen Pfad und mail:file: sowie -end darf kein Leerzeichen sein!)
 
BSPL = mail:file:MEINE Platte:User:ich:Desktop:die datei.doc-end
 
[ist im Handler auch nochmal aufgeführt!]
 
 
so hier einfach den HANDLER: - diebefehle() - ersetzen! 
 
 
 	  | Zitat: | 	 		  --=====================Hands=======================
 
--BEFHLER
 
on diebefehle()
 
   --Aktive Programme--   
 
   if inhalt contains "mail:prozesse" then
 
      tell application "Finder"
 
         set appNames to name of application processes whose visible is true
 
         set dlgtext to ""
 
         repeat with appName in appNames
 
            set dlgtext to dlgtext & return & tab & appName & " ; "
 
         end repeat
 
         set anhang to ""
 
         set report_text to "
 
Geöffnet: " & return & dlgtext
 
         return report_text
 
      end tell
 
      
 
      -- quit all  +++benutzt #2
 
   else if inhalt contains "quit:system" then
 
      set report_text to " Ihr Apple wird  Heruntergefahren "
 
      set anhang to ""
 
      
 
      
 
      -- screenie  +++benutzt #1
 
   else if inhalt contains "mail:desk" then
 
      set thetime to word 5 of ((current date) as string) & "-" & word 6 of ((current date) as string) & "-" & word 7 of ((current date) as string) & "-" & word 1 of ((current date) as string)
 
      do shell script "screencapture " & quoted form of POSIX path of screenordner & thetime & ".jpg" -- ruft das für Screenshots zuständige Shellscript auf 
 
      (delay alias screenordner & thetime & ".jpg") exists
 
      set anhang to screenordner & thetime & ".jpg" as alias
 
      set report_text to "screen anbei... as .jpg"
 
 
      
 
      
 
      
 
      --====== ADD #1 vom 25.5.2006 v. till ====================== 
 
      -- FILE-MAILER 
 
      -- BEFEHl = mail:file:PFAD-end (achtung zwischen Pfad und mail:file: sowie -end darf kein Leerzeichen sein!)
 
      -- mail:file:MEINE Platte:User:ich:Desktop:die datei.doc-end
 
      
 
   else if inhalt contains "mail:file:" then
 
      set inhalt to text of inhalt
 
      set anhang to ""
 
      set i to 1
 
      repeat with bstabe in inhalt
 
         
 
         if text of bstabe is "m" then
 
            set abfrage to bstabe & item (i + 1) of inhalt & item (i + 2) of inhalt & item (i + 4) of inhalt & item (i + 5) of inhalt & item (i + 6) of inhalt & item (i + 8) of inhalt & item (i + 9) of inhalt
 
            if text of abfrage is "mai:fie:" then
 
               set inhalt to items (i + 10) thru -1 of inhalt
 
               set i to 1
 
               
 
               repeat with bs in inhalt
 
                  if text of bs is "-" then
 
                     --return text of item (i + 1) of inhalt & item (i + 2) of inhalt & item (i + 3) of inhalt
 
                     if text of item (i + 1) of inhalt & item (i + 2) of inhalt & item (i + 3) of inhalt is "end" then
 
                        exit repeat
 
                     end if
 
                  end if
 
                  set anhang to anhang & bs
 
                  set i to i + 1
 
               end repeat
 
               exit repeat
 
            end if
 
         end if
 
         set i to i + 1
 
      end repeat
 
      set anhang to anhang as alias
 
      set report_text to "file-report anbei :   -> " & anhang as text
 
      
 
      --=== HIER ADDS einbringen
 
      -- weitere befehle....to be continued   
 
      
 
      -- wenn keine attachs verwendet werden muss gelten :  set anhang to ""
 
      -- die Rückmail muss einen text enthalten bzw die VAR repeort_text muss def sein! 
 
      
 
      
 
      -- DEFAULT ANSWER MIT UPDATEN -> BEFEHLLISTE
 
      -- Latest mit ADD #1 am 25.5.2006
 
   else
 
      set report_text to "
 
Es gibt keinen solchen befehl!" & return & return & "Befehliste:" & return & return & "mail:prozesse  = liste der aktiven programme" & return & "mail:file:PFAD-end  = mailt Datei    |FORM!| Bspltext: mail:file:MEINE Platte:User:ich:Desktop:die datei.doc-end   " & return & "mail:desk = macht und mailt Screenshot" & return & "quit:system    = fährt ihren Appel herunter"
 
      
 
      set anhang to ""
 
      return report_text
 
   end if
 
   
 
end diebefehle
 
 | 	  
 
 
gruß till
 
 
ach ja hab noch ein bug entdeckt! 
 
 
ziemlich oben im HP steht einmal display dialog "absender"  ...
 
das hatte ich damals um zu gucken ob er die mail erkennt
 
wenn ichs ber als remote benutzen will musss ich da nutürlich des weg machen oder halt mit giving  up 
 
(desswegen wollt ich aber nimmer das ganze script posten) _________________ ein berühmter Philosoph (<-Ich) sagte einmal:
 
" es ist nicht das Problem was uns Kopfzerbrechen macht,
 
es ist der Kopf selbst, der sich erdrückt" | 
			 
		  | 
	
	
		| Nach oben | 
		 | 
	
	
		  | 
	
	
		till •--->
  
  
  Anmeldedatum: 21.04.2005 Beiträge: 187 Wohnort: q-town (R-P)
  | 
		
			
				 Verfasst am: 25.05.2006 - 04:12    Titel:  | 
				     | 
			 
			
				
  | 
			 
			
				meine nächste idee wäre - weil man weiß ja nich immer den Pfad auswendig-
 
ein shell script das zu einem dateinamen den pfad sucht oder pfade sucht!
 
 
ich hab da an mdfind(spotlight) gedacht nur ich will erstens keine 1000 ergebnisse für zb "Bild 1" und 2 kenn ich mich so wenig aus mit shellscripten dass ich garnich weiß wie ich an des ergebnis von dem mdfind komm!
 
 
also ZIEL:
 
-ein shell script
 
-die PFADE zu den 5 top treffern einer dateinamenssuche
 
-mit möglichkeit diese auf eine var im script festzusetzen
 
 
danke till _________________ ein berühmter Philosoph (<-Ich) sagte einmal:
 
" es ist nicht das Problem was uns Kopfzerbrechen macht,
 
es ist der Kopf selbst, der sich erdrückt" | 
			 
		  | 
	
	
		| Nach oben | 
		 | 
	
	
		  | 
	
	
		till •--->
  
  
  Anmeldedatum: 21.04.2005 Beiträge: 187 Wohnort: q-town (R-P)
  | 
		
			
				 Verfasst am: 25.05.2006 - 15:58    Titel:  | 
				     | 
			 
			
				
  | 
			 
			
				habs!
 
 
mail:pfad:SUCHBEGRIFF/DATEINAME-end
 
sucht mittels shellscript (mdfind) passende dateien  bzw deren pfade
 
 
zudem ist noch ein mail:file: -  und ein Befehlliste -update gemacht worden desshalb wieder der ganze handler  - diebefehle()-  hier :
 
 
 	  | Zitat: | 	 		  on diebefehle()
 
   --Aktive Programme--   
 
   if inhalt contains "mail:prozesse" then
 
      tell application "Finder"
 
         set appNames to name of application processes whose visible is true
 
         set dlgtext to ""
 
         repeat with appName in appNames
 
            set dlgtext to dlgtext & return & tab & appName & " ; "
 
         end repeat
 
         set anhang to ""
 
         set report_text to "
 
Geöffnet: " & return & dlgtext
 
         return report_text
 
      end tell
 
      
 
      -- quit all  +++benutzt #2
 
   else if inhalt contains "quit:system" then
 
      set report_text to " Ihr Apple wird  Heruntergefahren "
 
      set anhang to ""
 
      return report_text
 
      
 
      -- screenie  +++benutzt #1
 
   else if inhalt contains "mail:desk" then
 
      set thetime to word 5 of ((current date) as string) & "-" & word 6 of ((current date) as string) & "-" & word 7 of ((current date) as string) & "-" & word 1 of ((current date) as string)
 
      do shell script "screencapture " & quoted form of POSIX path of screenordner & thetime & ".jpg" -- ruft das für Screenshots zuständige Shellscript auf 
 
      (delay alias screenordner & thetime & ".jpg") exists
 
      set anhang to screenordner & thetime & ".jpg" as alias
 
      set report_text to "screen anbei... as .jpg"
 
      return report_text
 
      
 
      
 
      
 
      --====== ADD #1 vom 25.5.2006 v. till ====================== 
 
      -- FILE-MAILER 
 
      -- BEFEHl = mail:file:PFAD-end (achtung zwischen Pfad und mail:file: sowie -end darf kein Leerzeichen sein!)
 
      -- mail:file:MEINE Platte:User:ich:Desktop:die datei.doc-end
 
      -- mail:file:/Users/ich/Desktop/diedatei.doc-end
 
      
 
   else if inhalt contains "mail:file:" then
 
      set inhalt to text of inhalt
 
      set anhang to ""
 
      set i to 1
 
      repeat with bstabe in inhalt
 
         if text of bstabe is "m" then
 
            set abfrage to bstabe & item (i + 1) of inhalt & item (i + 2) of inhalt & item (i + 4) of inhalt & item (i + 5) of inhalt & item (i + 6) of inhalt & item (i + 8) of inhalt & item (i + 9) of inhalt
 
            if text of abfrage is "mai:fie:" then
 
               set inhalt to items (i + 10) thru -1 of inhalt
 
               set i to 1
 
               
 
               repeat with bs in inhalt
 
                  if text of bs is "/" then
 
                     set bs to ":"
 
                  end if
 
                  if text of bs is "-" then
 
                     --return text of item (i + 1) of inhalt & item (i + 2) of inhalt & item (i + 3) of inhalt
 
                     if text of item (i + 1) of inhalt & item (i + 2) of inhalt & item (i + 3) of inhalt is "end" then
 
                        exit repeat
 
                     end if
 
                  end if
 
                  set anhang to anhang & bs
 
                  set i to i + 1
 
               end repeat
 
               exit repeat
 
            end if
 
         end if
 
         set i to i + 1
 
      end repeat
 
      set anhang to anhang as alias
 
      set report_text to "file-report anbei :   -> " & anhang as text
 
      return report_text
 
      
 
      --====== ADD #2 vom 25.5.2006 v. till ====================== 
 
      -- PFADE-MAILER 
 
      -- BEFEHl = mail:pfad:DATEINAME-end (achtung zwischen DATEINAME und mail:file: sowie -end darf kein Leerzeichen sein!)
 
      -- mail:pfad:hausaufgaben.doc-end
 
      
 
   else if inhalt contains "mail:pfad:" then
 
      set suche to ""
 
      set i to 1
 
      repeat with bstabe in inhalt
 
         if text of bstabe is "m" then
 
            set abfrage to bstabe & item (i + 1) of inhalt & item (i + 2) of inhalt & item (i + 4) of inhalt & item (i + 5) of inhalt & item (i + 6) of inhalt & item (i + 8) of inhalt & item (i + 9) of inhalt
 
            if text of abfrage is "mai:pfd:" then
 
               set inhalt to items (i + 10) thru -1 of inhalt
 
               set i to 1
 
               
 
               repeat with bs in inhalt
 
                  if text of bs is "/" then
 
                     set bs to ":"
 
                  end if
 
                  if text of bs is "-" then
 
                     --return text of item (i + 1) of inhalt & item (i + 2) of inhalt & item (i + 3) of inhalt
 
                     if text of item (i + 1) of inhalt & item (i + 2) of inhalt & item (i + 3) of inhalt is "end" then
 
                        exit repeat
 
                     end if
 
                  end if
 
                  set suche to suche & bs
 
                  set i to i + 1
 
               end repeat
 
               exit repeat
 
            end if
 
         end if
 
         set i to i + 1
 
      end repeat
 
      set anhang to ""
 
      set report_text to do shell script "mdfind " & suche
 
      set report_text to return & return & "mögliche Pfade für Datei ->" & suche & "<- :" & return & return & report_text & return & return & "weitere optionen:" & return & "Datei senden =  mail:file:PFAD AUS LISTE-end"
 
      return report_text
 
      
 
      
 
      --=== HIER ADDS einbringen
 
      -- else if inhalt contains "Befehl:irgendwas:"then
 
      -- weitere befehle....to be continued   
 
      
 
      -- wenn keine attachs verwendet werden muss gelten :  set anhang to ""
 
      -- die Rückmail muss einen text enthalten bzw die VAR repeort_text muss def sein! 
 
      
 
      
 
      -- DEFAULT ANSWER MIT UPDATEN -> BEFEHLLISTE
 
      -- Latest mit ADD #1 am 25.5.2006
 
   else
 
      set report_text to "
 
      Es gibt keinen solchen befehl!" & return & return & "Befehliste:" & return & return & "mail:prozesse  " & return & tab & "= liste der aktiven programme" & return & return & "mail:pfad:DATEINAME-end  " & return & tab & "= mailt Pfadliste der Suchtreffer    |FORM!| Bspltext: mail:pfad:hausaufgaben.doc-end   " & return & return & "mail:file:PFAD-end  " & return & tab & "= mailt Datei    |FORM!| Bspltext: mail:file:MEINE Platte:User:ich:Desktop:die datei.doc-end   " & return & return & "mail:desk " & return & tab & "= macht und mailt Screenshot" & return & return & "quit:system    " & return & tab & "= fährt ihren Appel herunter"
 
      set anhang to ""
 
      return report_text
 
   end if
 
   
 
end diebefehle | 	  
 
 
 
gruß till _________________ ein berühmter Philosoph (<-Ich) sagte einmal:
 
" es ist nicht das Problem was uns Kopfzerbrechen macht,
 
es ist der Kopf selbst, der sich erdrückt" | 
			 
		  | 
	
	
		| Nach oben | 
		 | 
	
	
		  | 
	
	
		till •--->
  
  
  Anmeldedatum: 21.04.2005 Beiträge: 187 Wohnort: q-town (R-P)
  | 
		
			
				 Verfasst am: 26.05.2006 - 03:30    Titel:  | 
				     | 
			 
			
				
  | 
			 
			
				2 weitere adds
 
 
ADD #3  Programm-Beender
 
- kann einzelne Programme beenden
 
- BEFEHl = quit:app:PROGRAMMNAME-end (achtung zwischen PROGRAMMNAME und quit:app: sowie -end darf kein Leerzeichen sein)
 
 
----BSPL--- 
 
quit:app:Safari-end
 
 
 
 
ADD #4 "shell"-APPEL SCRIPT  
 
-führt AS aus indem man den entsprechenden syntax  in die e-mail schreibt!
 
-BEFEHl = do:as:APPLE SCRIPT SYNTAX-end 
 
 
-----BSPL----	
 
do:as:
 
tell app "Finder"
 
say "holla die waldfee"
 
end tell
 
-end
 
 
 
Hier wieder der ganze - diebefehle()- handler zum ersetzten, da ich mal wieder die andern befehle und die Befehlliste aktualiesiert hab :
 
 
 	  | Zitat: | 	 		  --=====================Hands=======================
 
--BEFHLER
 
on diebefehle()
 
   --Aktive Programme--   
 
   if inhalt contains "mail:prozesse" then
 
      tell application "Finder"
 
         set appNames to name of application processes whose visible is true
 
         set dlgtext to ""
 
         repeat with appName in appNames
 
            set dlgtext to dlgtext & return & tab & appName & " ; "
 
         end repeat
 
         set anhang to ""
 
         set report_text to "
 
Geöffnet: " & return & dlgtext & retur & return & "weitere optionen: " & return & "Programm beenden = quit:app:PROGRAMMNAME-end"
 
         return report_text
 
      end tell
 
      
 
      -- quit 
 
      --all  +++benutzt #2
 
   else if inhalt contains "quit:system" then
 
      set report_text to " Ihr Apple wird  Heruntergefahren "
 
      set anhang to ""
 
      return report_text
 
      
 
      
 
      -- screenie  +++benutzt #1
 
   else if inhalt contains "mail:desk" then
 
      set thetime to word 5 of ((current date) as string) & "-" & word 6 of ((current date) as string) & "-" & word 7 of ((current date) as string) & "-" & word 1 of ((current date) as string)
 
      do shell script "screencapture " & quoted form of POSIX path of screenordner & thetime & ".jpg" -- ruft das für Screenshots zuständige Shellscript auf 
 
      (delay alias screenordner & thetime & ".jpg") exists
 
      set anhang to screenordner & thetime & ".jpg" as alias
 
      set report_text to "screen anbei... as .jpg"
 
      return report_text
 
      
 
      
 
      
 
      --====== ADD #1 vom 25.5.2006 v. till ====================== 
 
      -- FILE-MAILER 
 
      -- BEFEHl = mail:file:PFAD-end (achtung zwischen Pfad und mail:file: sowie -end darf kein Leerzeichen sein!)
 
      -- mail:file:MEINE Platte:User:ich:Desktop:die datei.doc-end
 
      -- mail:file:/Users/ich/Desktop/diedatei.doc-end
 
      
 
   else if inhalt contains "mail:file:" then
 
      set inhalt to text of inhalt
 
      set anhang to ""
 
      set i to 1
 
      repeat with bstabe in inhalt
 
         if text of bstabe is "m" then
 
            set abfrage to bstabe & item (i + 1) of inhalt & item (i + 2) of inhalt & item (i + 4) of inhalt & item (i + 5) of inhalt & item (i + 6) of inhalt & item (i + 8) of inhalt & item (i + 9) of inhalt
 
            if text of abfrage is "mai:fie:" then
 
               set inhalt to items (i + 10) thru -1 of inhalt
 
               set i to 1
 
               
 
               repeat with bs in inhalt
 
                  if text of bs is "/" then
 
                     set bs to ":"
 
                  end if
 
                  if text of bs is "-" then
 
                     --return text of item (i + 1) of inhalt & item (i + 2) of inhalt & item (i + 3) of inhalt
 
                     if text of item (i + 1) of inhalt & item (i + 2) of inhalt & item (i + 3) of inhalt is "end" then
 
                        exit repeat
 
                     end if
 
                  end if
 
                  set anhang to anhang & bs
 
                  set i to i + 1
 
               end repeat
 
               exit repeat
 
            end if
 
         end if
 
         set i to i + 1
 
      end repeat
 
      set anhang to anhang as alias
 
      set inf to info for anhang
 
      
 
      set inf to "Name = " & name of inf & return & "Art = " & kind of inf & return & "Größe = " & (round (size of inf) / 1000) & " KB" & return & "Bearbeitet = " & modification date of inf & return & "Pfad = " & anhang as text
 
      set report_text to "
 
Mail beinhaltet folgenden Datei - Anhang : " & return & return & inf
 
      return report_text
 
      
 
      --====== ADD #2 vom 25.5.2006 v. till ====================== 
 
      -- PFADE-MAILER 
 
      -- BEFEHl = mail:pfad:DATEINAME-end (achtung zwischen DATEINAME und mail:file: sowie -end darf kein Leerzeichen sein!)
 
      -- mail:pfad:hausaufgaben.doc-end
 
      
 
   else if inhalt contains "mail:pfad:" then
 
      set suche to ""
 
      set i to 1
 
      repeat with bstabe in inhalt
 
         if text of bstabe is "m" then
 
            set abfrage to bstabe & item (i + 1) of inhalt & item (i + 2) of inhalt & item (i + 4) of inhalt & item (i + 5) of inhalt & item (i + 6) of inhalt & item (i + 8) of inhalt & item (i + 9) of inhalt
 
            if text of abfrage is "mai:pfd:" then
 
               set inhalt to items (i + 10) thru -1 of inhalt
 
               set i to 1
 
               
 
               repeat with bs in inhalt
 
                  if text of bs is "/" then
 
                     set bs to ":"
 
                  end if
 
                  if text of bs is "-" then
 
                     --return text of item (i + 1) of inhalt & item (i + 2) of inhalt & item (i + 3) of inhalt
 
                     if text of item (i + 1) of inhalt & item (i + 2) of inhalt & item (i + 3) of inhalt is "end" then
 
                        exit repeat
 
                     end if
 
                  end if
 
                  set suche to suche & bs
 
                  set i to i + 1
 
               end repeat
 
               exit repeat
 
            end if
 
         end if
 
         set i to i + 1
 
      end repeat
 
      set anhang to ""
 
      set report_text to do shell script "mdfind " & suche
 
      set report_text to return & return & "mögliche Pfade für Datei ->" & suche & "<- :" & return & return & report_text & return & return & "weitere optionen:" & return & "Datei senden =  mail:file:PFAD AUS LISTE-end"
 
      return report_text
 
      
 
      
 
      --====== ADD #3 vom 25.5.2006 v. till ====================== 
 
      -- Programm-BEENDER      
 
      -- BEFEHl = quit:app:PROGRAMMNAME-end (achtung zwischen PROGRAMMNAME und quit:app: sowie -end darf kein Leerzeichen sein!)
 
      -- quit:app:Safari-end
 
      
 
   else if inhalt contains "quit:app:" then
 
      set appName to ""
 
      set i to 1
 
      repeat with bstabe in inhalt
 
         if text of bstabe is "q" then
 
            set abfrage to bstabe & item (i + 1) of inhalt & item (i + 2) of inhalt & item (i + 4) of inhalt & item (i + 5) of inhalt & item (i + 6) of inhalt & item (i + 7) of inhalt & item (i + 8) of inhalt
 
            
 
            if text of abfrage is "qui:app:" then
 
               set inhalt to items (i + 9) thru -1 of inhalt
 
               set i to 1
 
               
 
               repeat with bs in inhalt
 
                  if text of bs is "-" then
 
                     --return text of item (i + 1) of inhalt & item (i + 2) of inhalt & item (i + 3) of inhalt
 
                     if text of item (i + 1) of inhalt & item (i + 2) of inhalt & item (i + 3) of inhalt is "end" then
 
                        exit repeat
 
                     end if
 
                  end if
 
                  set appName to appName & bs
 
                  set i to i + 1
 
               end repeat
 
               exit repeat
 
            end if
 
         end if
 
         set i to i + 1
 
      end repeat
 
      -- befehl
 
      tell application appName
 
         quit
 
      end tell
 
      set anhang to ""
 
      set report_text to return & return & "Programm->" & appName & "<- wurde beendet"
 
      return report_text
 
      
 
      
 
      --====== ADD #4 vom 26.5.2006 v. till ====================== 
 
      -- SHELL APPLE SCRIPT   
 
      -- BEFEHl = do:as:APPLE SCRIPT SYNTAX-end 
 
      (*-----BSPL----   
 
      do:as:
 
      tell app "Finder"
 
      say "holla die waldfee"
 
      end tell
 
      -end
 
      *)
 
      
 
   else if inhalt contains "do:as:" then
 
      set anhang to ""
 
      set astext to ""
 
      set i to 1
 
      repeat with bstabe in inhalt
 
         if text of bstabe is "d" then
 
            set abfrage to bstabe & item (i + 1) of inhalt & item (i + 2) of inhalt & item (i + 3) of inhalt & item (i + 4) of inhalt & item (i + 5) of inhalt
 
            if text of abfrage is "do:as:" then
 
               set inhalt to items (i + 6) thru -1 of inhalt
 
               set i to 1
 
               repeat with bs in inhalt
 
                  if text of bs is "-" then
 
                     --return text of item (i + 1) of inhalt & item (i + 2) of inhalt & item (i + 3) of inhalt
 
                     if text of item (i + 1) of inhalt & item (i + 2) of inhalt & item (i + 3) of inhalt is "end" then
 
                        exit repeat
 
                     end if
 
                  end if
 
                  set astext to astext & bs
 
                  set i to i + 1
 
               end repeat
 
               exit repeat
 
            end if
 
         end if
 
         set i to i + 1
 
      end repeat
 
      set i to "1"
 
      tell application "Script Editor"
 
         make new document with properties {name:"gemailed"}
 
         set text of document "gemailed" to astext
 
         try
 
            set i to compile document "gemailed"
 
         end try
 
         if i is true then
 
            set i to ""
 
            try
 
               set i to execute of document "gemailed"
 
            end try
 
         end if
 
      end tell
 
      if i is "" then
 
         set report_text to "
 
Fehler beim Ausführen von" & return & return & text of document "gemailed" of application "Script Editor"
 
      else if i is "1" then
 
         set report_text to "
 
Fehler beim Compilieren von" & return & return & text of document "gemailed" of application "Script Editor"
 
      else
 
         try
 
            set report_text to return & "Ergebnis des Scripts: " & (i as text)
 
         end try
 
      end if
 
      return report_text
 
      
 
      
 
      --=== HIER ADDS einbringen
 
      -- else if inhalt contains "Befehl:irgendwas:"then
 
      -- weitere befehle....to be continued   
 
      
 
      -- wenn keine attachs verwendet werden muss gelten :  set anhang to ""
 
      -- die Rückmail muss einen text enthalten bzw die VAR repeort_text muss def sein! 
 
      
 
      
 
      -- DEFAULT ANSWER MIT UPDATEN -> BEFEHLLISTE
 
      -- Latest mit ADD #1 am 25.5.2006
 
   else
 
      set report_text to "do:as:" & return & tab & "tell app ''Finder'' " & return & tab & "say ''holla die waldfee''" & return & tab & "1+2" & return & tab & "end tell" & return & tab[/color: _________________ ein berühmter Philosoph (<-Ich) sagte einmal:
 
" es ist nicht das Problem was uns Kopfzerbrechen macht,
 
es ist der Kopf selbst, der sich erdrückt" | 
			 
		
  | 
	 
	
		| Nach oben | 
		 | 
	 
	
		  | 
	 
	
		till •--->
  
  
  Anmeldedatum: 21.04.2005 Beiträge: 187 Wohnort: q-town (R-P)
  | 
		
			
				 Verfasst am: 26.05.2006 - 03:33    Titel:  | 
				     | 
			 
			
				
  | 
			 
			
				.. da war wohl wieder der platz zu ende ! 
 
 
 	  | Zitat: | 	 		     -- DEFAULT ANSWER MIT UPDATEN -> BEFEHLLISTE
 
      -- Latest mit ADD #1 am 25.5.2006
 
   else
 
      set report_text to "do:as:" & return & tab & "tell app ''Finder'' " & return & tab & "say ''holla die waldfee''" & return & tab & "1+2" & return & tab & "end tell" & return & tab & "-end" as text
 
      set report_text to return & "Es gibt keinen solchen befehl!" & return & return & "Befehliste:" & return & return & "mail:prozesse  " & return & tab & "= liste der aktiven programme" & return & return & "mail:pfad:DATEINAME-end  " & return & tab & "= mailt Pfadliste der Suchtreffer    |FORM!| Bspltext: mail:pfad:hausaufgaben.doc-end   " & return & return & "mail:file:PFAD-end  " & return & tab & "= mailt Datei    |FORM!| Bspltext: mail:file:MEINE Platte:User:ich:Desktop:die datei.doc-end   " & return & return & "mail:desk " & return & tab & "= macht und mailt Screenshot" & return & return & "quit:system    " & return & tab & "= fährt ihren Appel herunter" & return & return & "quit:app:PROGRAMMNAME-end    " & return & tab & "beendet Program  |FORM!| Bspltext: quit:app:Safari-end " & return & return & "do:as:APPLE SCRIPT SYNTAX-end" & return & tab & "= AS-syntax senden ->ausführen lassen ->Ergebnis report" & return & "BSPL:" & return & tab & report_text
 
      set anhang to ""
 
      return report_text
 
   end if
 
   
 
end diebefehle
 
 
 | 	 
  _________________ ein berühmter Philosoph (<-Ich) sagte einmal:
 
" es ist nicht das Problem was uns Kopfzerbrechen macht,
 
es ist der Kopf selbst, der sich erdrückt" | 
			 
		  | 
	 
	
		| 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 
		 |