Hallo zusammen,
ich habe mal eine Frage und hoffe mir kann jemand helfen.
Ich möchte gerne eine E-Mail erhalten wenn ein bestimmter Text in einer Alarmierung vorkommt. Diese soll dann von Clemail weitergeleitet werden. Alle anderen in denen das Wort nicht vorkommt, sollen ignoriert werden.
Ob dies machbar ist weiß ich selber nicht so genau, aber hier gibts ja Spezialisten die so etwas bestimmt schaffen.
Noch mal zur Vereinfachung:
Alarm kommt, und in diesem ist das Wort " Feuer XXXX " erhalten.
Dann weiterleitung per E-Mail.
Alarm kommt und das Wort " XXX " ist nicht enthalten.
Dann ignorieren.
Eine Vollversion von Clamail habe ich bereits.
Vielen Dank für eure Hilfe.
Gruß Thomas
04.03.2004, 12:16
Quietschphone
--> verschoben: AddOns
04.03.2004, 12:52
MiThoTyN
Also mit einer Batchdatei wird das schwierig glaub ich.
Da müsste man schon ein kleines Programm für schreiben, oder es gibt ein DOS Tool, das solche Sachen kann. Dafür kenn ich mich aber zu wenig aus mit DOS und Batch. In Linux ist das mit solch Befehlen wie grep und cat usw möglich. Weiß nicht ob es sowas halt auch für DOS gibt.
Gruß Joachim
04.03.2004, 14:39
Kalle
Na klar geht das.
Beispiel:
-----------------------------------------------------------------
ren "c:\alarmruf\rtw\*.txt" "%3 %4 %5 %6.txt"
c:\alarmruf\wait 1 /i /o
if exist "c:\alarmruf\rtw\*feuer*.txt" goto weiter
if exist "c:\alarmruf\rtw\*transport*.txt" goto ende
if exist "c:\alarmruf\rtw\*unfall*.txt" goto weiter
if exist "c:\alarmruf\rtw\*a-dorf*.txt" goto weiter
if exist "c:\alarmruf\rtw\*b-dorf*.txt" goto weiter
goto ende
Da ich nur 3-6 übetrage gibt es keine Schwierigkeiten.
05.03.2004, 09:12
MiThoTyN
Wo kommen die Paramater her ?
Übergibst du einfach den Alarmtext ohne "" an die Batchdatei, d.h. bei einem Leerzeichen wird der Text ja automatisch in mehrere Parameter aufgedröselt ?
Gruß Joachim
05.03.2004, 15:01
Kalle
Mit %1 und %2 übergebe ich den Fahrzeugnamen und den Text von FMS32-Pro an die Batch-Datei. Die Batch-Datei benutzt aber nur die genannten Parameter und nennt die Text-Datei um. Und wenn die Kriterien erfüllt sind wird eine SMS mit dem vollständigem Text geschickt.
05.03.2004, 18:48
Tometz1
Puh ist das kompliziert
Hallo,
danke erst mal für eure Hilfe. Jedoch versteh ich das nich nicht so ganz.
Jeder Alarm in dem das Wort " Stahl Union " vorkommt soll mir per SMS gesendet werden.
Das kann sein das es ein RTW, ein Löschzug oder auch andere Fahrzeuge sein können.
Wie sag ich dem denn jetzt das das er wenn das Wort " Stahl Union " nicht vorkommt das er zum ende gehen soll und nichts unternimmt??
Hoffe ihr versteht wie ich das meine.
Danke
Gruß Thomas
05.03.2004, 19:17
Kalle
Ren (rename) benennt die Txt-Datei um.
Die Batch-Datei einfach bei den Globale Aktionen für FMS und Pocsag eintragen.
Hallo,
also bei mir klappt das nicht richtig.
Folgende Infos hatte ich nicht erwähnt:
1.) Ich komme aus dem Bereich NRW
2.) Die Parameter %4,%5,%6, gibt es bei uns nicht
3.) Bei uns ist Parameter :
%1 = Ric
%2 = Funktion
%3 = Alarmtext ( darin enthalten : Uhrzeit ; Einsatznummer ;
Stichwort ; Objekt und Anschrift ( alles mit leerzeichen
getrennt ) )
Also hab ich mir die ganze Aktion mit dem Parameter 3 versucht. Das ganze klappt auch soweit. Das einzige Problem ist jetzt das er mir die Datei zwar umbenennt, jedoch nicht díe ganze Aktion 3 dazu nimmt, sondern das Einstzstichwort nimmt, und davon nur soviel bis die erste leerstelle kommt.
Wer kann mir helfen wo der fehler liegt. Uhrzeit und Nummer brauch ich eh nicht, aber aus dem ganzen rest soll er das Wort raus suchen.
Habe schon mit Gänsefüsschen versucht, Mit Stern und so. Aber wenn er sie umbenennt, dann nie komplett.
... dann wird in wirklichkeit die Batchdatei so gestartet ...
C:\Programme\Heirue-Soft\FMS32-PRO\Batch\Alu.bat 23:44 Einsatz FEU3 Blaweg BlaStadt
... Das bedeutet JEDES einzelne Wort wird als ein EIGENER Paramater an die Batchdatei übergeben. Das bedeutet IN der Batchdatei hast du folgende Parameter mit folgenden Werten :
%1 = 23:44
%2 = FEU3
%3 = Einsatz
%4 = Blaweg
%5 = BlaStadt
Damit kannst du nun deine Datei umbenennen, wenn z.B. die Einsatzart das gesuchte Kriterium ist. Die Batchdatei sieht dann so aus :
So jetzt klappt es langsam. Man muß nur in der Batch die PArameter ohne leerstelle setzen. Also ... %3%4 usw.
Aber jetzt das nächste Problem!!!
Habe FMS eine Aktion eingerichtet bei der
RIC 12????? Funktion ?
soll er diese Batch ausführen die nach dem Wort sucht.
Gleizeitig habe ich eine Aktion eingerichtet bei der
Ric 1248851 Funktion ?
soll er eine andere Batch ausführen. Das macht er jedoch nicht weil vermutlich die zweite Ric in der 12???? inbegriffen ist.
Gibt es dafür auch noch ne Lösung??
Danke
Thomas
03.07.2006, 15:57
Carsten Gösch
Ich muss gestehen, daß ich diese Parametergeschichte nicht ganz verstehe....leider!
Ich rufe bei Ric 1234567 die Funktion ric1234567.bat auf:
c:\testbatch\ric1234567.bat %3
Dann lautet der verarbeitete Aufruf:
c:\testbatch\ric1234567.bat Dies ist ein Test
Jetzt habe ich in der Batch-Datei vier Variabelen??
%1= Dies
%2= ist
%3= ein
%4= Test
Kann ich dann in der Batch ein Programm aufrufen und %* übergeben? (Alle Variabelen übergeben, aber wohl ohne Leerzeichen)
Was passiert dann beim Aufruf von:
c:\testbatch\ric1234567.bat "%3"
Wird dann alles in einem Parameter übergeben (mit Leerzeichen) oder wird dann nur der Text %3 übergeben??
04.07.2006, 08:19
Tometz1
Ich kann deine Ausführung nicht so ganz nachvollziehen.
Funktion 1234567 gibt es nicht. Es gibt nur Funktion 1 oder 2 oder...
Du mußt bei der entsprechenden Ric im FMS folgende Aktion eintragen:
Laufwerk:\Verzeichnis\Datei.bat %1 %3
Dann in der Batch Datei folgendes reinschreiben:
ren "c:\Datei\Verzeichnis\*.txt" %1%3%4%5%6%7%8%9.txt
und dann halt noch was passieren soll !!!
Wenn du nicht weißt wie ich das jetzt meine, dann meld dich noch mal.
Gruß TM
04.07.2006, 08:43
Carsten Gösch
Es ging mir jetzt nur um die eigentliche Parameterübergabe. Ich möchte keine Dateien umbenennen.
Wenn das FMS-Programm in %3 den Text "Dies ist ein TEST" übergibt, habe ich dann innerhalb meiner Batchdatei eine Variable %1, die den ganzen text enthält, oder habe ich vier Variabelen, in denen jeweils ein Wort steht.
Ich vermute im Augenblick das zweite. Kann ich also innerhalb der Batch den Aufruf %* verwenden um alle zu erhalten? Sind dann alle Leerzeichen verschwunden?
Was passiert wenn ich beim Aufruf der Batch "%3" statt %3 übergebe? Habe ich dann den gesamten Text in einer Variabele mit dem Namen %1 oder habe ich dann den Text %3 in meiner Variabelen.
Fragen über Fragen....
04.07.2006, 09:05
Tometz1
Du mußt dann %1%2%3 ... eingeben. Dann bekommste alles.
Und mit dem Anführungszeichen das mußt du testen. Habe da damals auch ne ganze Zeit testen müßen.
Bei einem gehts mit bei anderen ohne. Das scheint unterschiedlich zu sein.
Blicke da auch nicht so ganz durch !!!
04.07.2006, 09:23
Carsten Gösch
okay.
zum glück habe ich zur Zeit einen DME-Testsender zur Verfügung. Ich muss nur aufpassen, dass ich nicht aus Versehen eine SMS an 30 Leute rausjage.....