MrDTeach Posted September 2, 2019 Share Posted September 2, 2019 (edited) Hello guys, I have two problems. At first I try to enter a new line, but it dosn't work and I try to enter a tab and it dosn't work, too. attatched my script. $vorname = InputBox ( "Vorame", "Bitte den Vorname eingeben.") ; Vorname eingeben $nachname = InputBox ( "Nachname", "Bitte den Nachname eingeben.") ; Nachname eingeben $kuerzel = InputBox ( "Kuerzel", "Bitte das Kuerzel eingeben.") ; Kuerzel eingeben $position = InputBox ( "Position", "Bitte die Position eingeben.") ; Position eingeben $durchwahl = InputBox ( "Durchwahl", "Bitte die Durchwahl eingeben.") ; Druchwahl eingeben $handy = InputBox ( "Handynummer", "Bitte die Handynummer, im Format +49 160 1234567 eingeben. Wenn keine Handynummer vorhanden ist, eine Nein eintragen.") ; Handynummer eingeben $email = $vorname&'.'&$nachname&'@test.de' $file = FileOpen("path\SignaturAntwort.htm", 0) ; Check if file opened for reading OK If $file = -1 Then MsgBox(0, "Error", "Unable to open file.") Exit EndIf ; Ersetze Suchstring durch Eingaben $chars = FileRead($file) $chars=stringreplace($chars,"#Vorname#",$vorname) $chars=stringreplace($chars,"#Nachname#",$nachname) $chars=stringreplace($chars,"#Position#",$position) If $handy = "Nein" Then $chars=stringreplace($chars,"#Durchwahl#",$durchwahl) $chars=stringreplace($chars,"#Handy#","") Else $chars=stringreplace($chars,"#Durchwahl#",$durchwahl@CRLF) $chars=stringreplace($chars,"#Handy#",'Mobil'@TAB&$handy) EndIf $chars=stringreplace($chars,"#Mail#",$email) filewrite('path\'&$kuerzel&'_Antwort.htm', $chars) FileClose($file) Best regards MrDTeach Edited September 2, 2019 by Jos Just put the code in the post in stead of attachment Link to comment Share on other sites More sharing options...
MrDTeach Posted September 2, 2019 Author Share Posted September 2, 2019 The problems are in line 26 and 27. Link to comment Share on other sites More sharing options...
Developers Jos Posted September 2, 2019 Developers Share Posted September 2, 2019 (edited) 12 minutes ago, MrDTeach said: $durchwahl@CRLF should be: $durchwahl & @CRLF ..and ... 12 minutes ago, MrDTeach said: 'Mobil'@TAB&$handy should be: 'Mobil' & @TAB & $handy Jos Edited September 2, 2019 by Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
MrDTeach Posted September 2, 2019 Author Share Posted September 2, 2019 Hello Jos, thanks for yout help. It don't work. " Telefon +49 69 / 123456-45 Mobil 123 Fax +49 69 / 123456-12 " Link to comment Share on other sites More sharing options...
Xenobiologist Posted September 2, 2019 Share Posted September 2, 2019 You mean there is a & @crlf missing after your Telefonnummer? Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times Link to comment Share on other sites More sharing options...
MrDTeach Posted September 2, 2019 Author Share Posted September 2, 2019 Yes. The @CRLF and the @TAB dosn't work. Link to comment Share on other sites More sharing options...
Xenobiologist Posted September 2, 2019 Share Posted September 2, 2019 Do you view your file in a browser? Maybe then you need to use html tags like <br> Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times Link to comment Share on other sites More sharing options...
Developers Jos Posted September 2, 2019 Developers Share Posted September 2, 2019 (edited) Like @Xenobiologist states: Those characters are there but won't be shown in any browser program as HTML doesn't support TAB en CRLF. Open the file in SciTE or Notepad and you will see they are there. Jos Edited September 2, 2019 by Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
MrDTeach Posted September 2, 2019 Author Share Posted September 2, 2019 I edit 3 files for the Outlook signature. .HTM, .RTF, and .TXT <br> works for HTM. Thanks Now I need a option for the other two Files. Do you know the characters for the tabulator? Link to comment Share on other sites More sharing options...
Developers Jos Posted September 2, 2019 Developers Share Posted September 2, 2019 3 minutes ago, MrDTeach said: Do you know the characters for the tabulator? There is no HTML alternative for TAB. Commonly they use <Table> when things need to be aligned. Just play with these files manually until you have the appropriate formatted text figured out and then you make the Logic in AutoIt3 to do that automatically. Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
MrDTeach Posted September 2, 2019 Author Share Posted September 2, 2019 So I solved the problem. @CRLF => &"<br> @TAB => &" "& (<- not nice, but it works.) Thanks all for help. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now