Search the Community
Showing results for tags 'enter'.
-
Hi, I'm trying to replace line breaks. But when there are two or more of them keep them. At the end it should reformat copied text with unwanted line breaks. This is my code: #include <MsgBoxConstants.au3> ;~ Local $sText = ClipGet() Local $sText = "asd" & @CRLF & "asd" & @CRLF & "asd" & @CRLF & "asd" & @CRLF & "asd" & @CRLF & @CRLF & "asd" & @CRLF & "asd" & @CRLF & "asd" & @CRLF & "asd" & @CRLF & "asd" & @CRLF & @CRLF & "asd" MsgBox($MB_TOPMOST, "Original", $sText) Local $sRegexKillEnters = "(?m)(?<=\V)\v(?!\v|\h\h|\t)" ; (first all but Enter)Enter(but not if Enter or 2 Spaces or a Tab - if one wrote a list) $sText = StringRegExpReplace($sText, $sRegexKillEnters, " ") MsgBox($MB_TOPMOST, "Kill Enters", $sText & @CRLF & @CRLF & "Extended: " & @extended) I would expect: asd asd asd asd asd asd asd asd asd asd asd but get no error code and this: asd asd asd asd asd asd asd asd asd asd asd It works at regex101.com with flavour pcre: https://regex101.com/r/aTmV2T/1 but @AZJIO RegExp-Tester gives @Extended = 11. What is my mistake? Simpel
-
Hi there, not sure if this is the right place, but I'm building a script for using premade answers in chat. It works and outputs the answers (stored in an ini file based on: answer name = answer it also works with a new line if there is a tag <enter> in the answer text in the ini file. Now the problem is, that after the answer is pasted in the chat (you bring up the interface with ctrl+1) it gives an enter, thus sending the output straight away. I would like to be able to review the answer before sending it. can anyone help me by telling what's wrong in the script, I tried replacing the @crlf in the script with other options, no luck. Thanks in advance! antwoorden.au3 antwoorden.ini
-
Hi again, i have one question ! , how we can use a "inetread" without any changes in doc, it's meant : for example in this address we have this source : (Address : http://example.com) <!doctype html> <!-- i have <br/> ( Enter ) --> <html> <!-- i have enter too --> <head> <!-- i have too --> <title>i am in autoit :) </title> <meta charset="utf-8"> </head> <body> <p> i want to go in autoit :( </p> <a href="http://autoitscript.com">autoit</a> </body> </html>in this source you see many "Enter", now how we can have this (source) by "inetread" or "inetget" or something like that, i try to use that with "inetread" but it have not any "enter"! thanks alot *sorry for my many questions,
- 12 replies
-
- auto use enter with inetread
- auto
-
(and 2 more)
Tagged with:
-
There are two areas where I need my GUI to default to the "Enter/Submit/Total" buttons on their respective GUI's. I haven't found a way to make that happen. If I've missed something obvious, like a help file, please point me that direction. I've been stuck on this for a few days now and its the LAST feature request before I can lunch this. I tried to use _IsPressed to Cue the same commands, which is nasty looking and sloppy, but if that's the final answer and I've just done something wrong then that's fine too. I do plan on posting the full code on the example scripts for general use/review when I'm done. Thanks in advance for your time/help with this. #region ### START Koda GUI section ### ;Form=C:\Documents and Settings\Administrator\Desktop\Doug's AutoIT\Dev\TigerTool\TimeDateAdjust.kxf Local $TmpDate = _NowDate() Local $Hour = @HOUR If $Hour < 10 Then $Hour = String($Hour) $Hour = StringMid($Hour, "2", "1") EndIf Local $Minute = @MIN Local $AMorPM = "PM" $Form1 = GUICreate("Time", 275, 280, 192, 114) $MonthCal1 = GUICtrlCreateMonthCal($TmpDate, 24, 64, 225, 175) $HourInput = GUICtrlCreateCombo($Hour, 24, 24, 57, 21, BitOR($CBS_DROPDOWN, $CBS_AUTOHSCROLL)) GUICtrlSetData(-1, "1|2|3|4|5|6|7|8|9|10|11|12") $Label1 = GUICtrlCreateLabel("Hours", 24, 8, 32, 17) $MinuteInput = GUICtrlCreateCombo($Minute, 104, 24, 57, 21, BitOR($CBS_DROPDOWN, $CBS_AUTOHSCROLL)) GUICtrlSetData(-1, "00|05|10|15|20|25|30|35|40|45|50|55") $Label2 = GUICtrlCreateLabel("Minutes", 104, 8, 41, 17) $Label3 = GUICtrlCreateLabel("AM/PM", 184, 8, 41, 17) $Combo9 = GUICtrlCreateCombo("AM", 184, 24, 65, 25, BitOR($CBS_DROPDOWN, $CBS_AUTOHSCROLL)) GUICtrlSetData(-1, "PM") $UpDown1 = GUICtrlCreateUpdown($HourInput) $UpDown2 = GUICtrlCreateUpdown($MinuteInput) $Button17 = GUICtrlCreateButton("Submit", 24, 245, 225, 25) GUISetState(@SW_SHOW) #endregion ### END Koda GUI section ### Local $hDLL = DllOpen("user32.dll") While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE GUIDelete($Form1) ExitLoop Case $Button17 GUISetState(@SW_HIDE) $CapsLockTest = _GetCapsLock() If $CapsLockTest = 1 Then Send("{CAPSLOCK OFF}") $CapsLockReSet = 1 EndIf $TmpHour = GUICtrlRead($HourInput) $TmpMinute = GUICtrlRead($MinuteInput) $TmpAMorPM = GUICtrlRead($Combo9) $TmpDate = GUICtrlRead($MonthCal1) $TmpDate = StringMid($TmpDate, "6", "2") & "-" & StringMid($TmpDate, "9", "2") & "-" & StringMid($TmpDate, "1", "4") If $TmpHour < 10 Then $TmpHour = "0" & $TmpHour EndIf Sleep(50) Send($TmpDate & "---" & $TmpHour & ":" & $TmpMinute & " " & $TmpAMorPM & "--" & $TechName & "{ENTER}{ENTER}Hrs- {ENTER}{ENTER}{ENTER}{ENTER}{UP}{UP}{UP}{UP}{UP}") GUIDelete($Form1) If $CapsLockReSet = 1 Then Send("{CAPSLOCK ON}") $CapsLockReSet = 0 EndIf ExitLoop If _IsPressed("0D", $hDLL) Then ConsoleWrite("test test test test" & @CRLF) GUISetState(@SW_HIDE) $CapsLockTest = _GetCapsLock() If $CapsLockTest = 1 Then Send("{CAPSLOCK OFF}") $CapsLockReSet = 1 EndIf $TmpHour = GUICtrlRead($HourInput) $TmpMinute = GUICtrlRead($MinuteInput) $TmpAMorPM = GUICtrlRead($Combo9) $TmpDate = GUICtrlRead($MonthCal1) $TmpDate = StringMid($TmpDate, "6", "2") & "-" & StringMid($TmpDate, "9", "2") & "-" & StringMid($TmpDate, "1", "4") If $TmpHour < 10 Then $TmpHour = "0" & $TmpHour EndIf Sleep(50) Send($TmpDate & "---" & $TmpHour & ":" & $TmpMinute & " " & $TmpAMorPM & "--" & $TechName & "{ENTER}{ENTER}Hrs- {ENTER}{ENTER}{ENTER}{ENTER}{UP}{UP}{UP}{UP}{UP}") GUIDelete($Form1) If $CapsLockReSet = 1 Then Send("{CAPSLOCK ON}") $CapsLockReSet = 0 EndIf EndIf ExitLoop EndSwitch WEnd