-
Posts
340 -
Joined
-
Last visited
Digisoul's Achievements

Universalist (7/7)
1
Reputation
-
Digisoul reacted to a post in a topic: Au3toCmd -- Avoid false virus positives. (Version: 2022.09.01)
-
Digisoul reacted to a post in a topic: MetroGUI UDF v5.1 - Windows 10 style buttons, toggles, radios, menu etc.
-
Digisoul reacted to a post in a topic: Using C# and VB Code in AutoIt through .NET Framework
-
Digisoul reacted to a post in a topic: Using C# and VB Code in AutoIt through .NET Framework
-
Digisoul reacted to a post in a topic: TV-Show-Manager v5 - Modern and easy to use manager for your tv shows.
-
Digisoul reacted to a post in a topic: .NET Common Language Runtime (CLR) Framework
-
Digisoul reacted to a post in a topic: Differentiate between Mouseclick and Touch-Click
-
Digisoul reacted to a post in a topic: Microsoft Access database Third version
-
Incremental search in owner and custom drawn ListViews
Digisoul replied to LarsJ's topic in AutoIt Example Scripts
Awesome. Thanks for sharing. -
this can extract the last href #include <Array.au3> Local $data = '<td class="F13" colspan="4" align="right">' & @CRLF & _ '<B>1</B> <a href="/IT/Postal_Codes/?page=2&c=AD&n=2&r0=00&r1=04&r2=00&r3=00&r4=00&o=&L=0">2</a> <a href="/IT/Postal_Codes/?page=3&c=AD&n=2&r0=00&r1=04&r2=00&r3=00&r4=00&o=&L=0">3</a> <a href="/IT/Postal_Codes/?page=2&c=AD&n=2&r0=00&r1=04&r2=00&r3=00&r4=00&o=&L=0">Successiva</a> ' & @CRLF & _ '</td>' Local $aRet = StringRegExp($data,'(?i)(?!href).*href="(.*?)">Successiva',3) _ArrayDisplay($aRet)
-
in : '(?s)<a href="Postal_Codes/\?C=(.*?)" itemprop="url">(.*?)</a></span></td></tr>'there are 2 capturing groups, 1: C=(.*?) 2: >(.*?)</a> and the in: 'itemprop="url">(.*?)</a>'there is only 1 capturing group. Also Internet Explorer can change HTML format, but InetRead will return exact Html received from server.
-
Thanks jchd
-
Hello, I am trying to create a regExp for following HTML text: <a href="link=1">1</a> <b>2</b> <a href="link=3">3</a> | <a href="link=2">Previous</a> | <a href="link=3">Next</a>My intention is to extract href from last <a> tag. Here is my attempt: Local $reg = '(?i)\|\s?<a href="(.*?)">Next</a>' Local $text = '<a href="link=1">1</a> <b>2</b> <a href="link=3">3</a> | <a href="link=2">Previous</a> | <a href="link=3">Next</a>' $aData = StringRegExp($text,$reg,3) ConsoleWrite($aData[0]&@LF)Now problem is i am unable to extract exact href from the last <a> tag. Here is the output: link=2">Previous</a> | <a href="link=3I know I can use other techniques, but i want to know, why my pattern is not working or what is the right pattern for such situation? Thanks in Advance.
-
More complete example of using Scintilla in AutoIt
Digisoul replied to lokster's topic in AutoIt Example Scripts
Sorry for bumping old topic. Can anyone tell why Code folding is not working anymore ? any right direction ? -
Hello, I am trying to create a Spell Checker with help of Aspell.exe, my intention is to communicate with Aspell.exe through _NamedPipes_CreatePipe , after reading the following articles & discussions: http://aspell.net/man-html/Through-A-Pipe.html https://www.autoitscript.com/forum/topic/120575-createprocess-with-stdio-solved/ https://msdn.microsoft.com/en-us/library/windows/desktop/ms682499(v=vs.85).aspx I wrote this script: #include <AutoItConstants.au3> #include <WinAPI.au3> #include <NamedPipes.au3> Global $hOutRead, $hOutWrite, $hInRead, $hInWrite Global $hSTD_OUT_ReadPipe, $hSTD_OUT_WritePipe Global $hSTD_IN_ReadPipe, $hSTD_IN_WritePipe $iPID = _Run("C:\Program Files (x86)\Aspell\bin\aspell.exe", " -a", "C:\Program Files (x86)\Aspell\bin") ConsoleWrite("pid:" & $iPID & @LF) ;read 1st msg _ReadMsg() ; try to check spell Local $iData,$nBytes,$tBuffer $iData = "Thq Quick Brown Fox Jumps ovzr tha lezy dog." $tBuffer = DllStructCreate("byte["&StringLen($iData)&"]") $res = _WinAPI_WriteFile($hSTD_IN_WritePipe, DllStructGetPtr($tBuffer), StringLen($iData), $nBytes) ConsoleWrite(">WriteResult:"&$res&":"&$nBytes&@LF) ; totally stuck _ReadMsg() _WinAPI_CloseHandle($hSTD_OUT_ReadPipe) Exit Func _ReadMsg() Local $tBuffer,$nBytes,$rData,$return While True ToolTip("i am stuck") $tBuffer = DllStructCreate("byte[4096]") $sOutput = _WinAPI_ReadFile($hSTD_OUT_ReadPipe, DllStructGetPtr($tBuffer), 4096, $nBytes,0) If $nBytes > 0 Then ; Exit the loop if the process closes or StdoutRead returns an error. $rData = BinaryToString(DllStructGetData($tBuffer, 1)) ConsoleWrite($rData) If StringInStr($rData, @LF) Then ConsoleWrite("msg complete" & @LF) ToolTip("") ExitLoop Else $return = $rData EndIf $tBuffer = 0 $nBytes = 0 Else ExitLoop EndIf WEnd ;-------------- Return $return EndFunc ;==>_ReadMsg Func _Run($location, $sCmd, $sWorkingDir = "", $state = @SW_SHOW) Local $tProcess, $tSecurity, $tStartup Local Const $STARTF_USESHOWWINDOW = 0x1 Local Const $STARTF_USESTDHANDLES = 0x100 ; Set up security attributes $tSecurity = DllStructCreate($tagSECURITY_ATTRIBUTES) DllStructSetData($tSecurity, "Length", DllStructGetSize($tSecurity)) DllStructSetData($tSecurity, "InheritHandle", True) DllStructSetData($tSecurity, "Descriptor", Null) ; Create a pipe for the child process's STDOUT ;************** _NamedPipes_CreatePipe($hSTD_OUT_ReadPipe, $hSTD_OUT_WritePipe,DllStructGetPtr($tSecurity)) _WinAPI_SetHandleInformation($hSTD_OUT_ReadPipe, 1, 0) ; dont inherte it ;~ _WinAPI_SetHandleInformation($hSTD_OUT_WritePipe, 1, 1) _NamedPipes_CreatePipe($hSTD_IN_ReadPipe, $hSTD_IN_WritePipe,DllStructGetPtr($tSecurity)) _WinAPI_SetHandleInformation($hSTD_IN_WritePipe, 1, 0) ; here is the problem ;~ _WinAPI_SetHandleInformation($hSTD_IN_ReadPipe, 1, 1) ;************** ; Create child process $tProcess = DllStructCreate($tagPROCESS_INFORMATION) $tStartup = DllStructCreate($tagSTARTUPINFO) DllStructSetData($tStartup, "Size", DllStructGetSize($tStartup)) DllStructSetData($tStartup, "Flags", BitOR($STARTF_USESTDHANDLES, $STARTF_USESHOWWINDOW)) DllStructSetData($tStartup, "StdOutput", $hSTD_OUT_WritePipe) DllStructSetData($tStartup, "StdError", $hSTD_OUT_WritePipe) DllStructSetData($tStartup, "StdInput", $hSTD_IN_ReadPipe) DllStructSetData($tStartup, "ShowWindow", $state) _WinAPI_CreateProcess($location, $sCmd, 0, 0, True, 0, 0, $sWorkingDir, DllStructGetPtr($tStartup), DllStructGetPtr($tProcess)) Return DllStructGetData($tProcess, "ProcessID") EndFunc ;==>_Run but I am only able to read the 1st introduction line of the Aspell.exe: after that autoit process just stop responding, I am not sure where is the issue or what is the issue. Please help me here. Thanks in Advance.
-
- aspell
- createprocess
-
(and 1 more)
Tagged with:
-
Thank you very much, I only require it for English language. I slightly modified your pattern "(*UCP)(?:^|(\.|!|\?))(\s*\X)" and its working as expected. Thanks Again.
-
Hello, I want to capitalize 1st word of every sentence with StringRegExp, I am able to collect words by using this pattern: Local $reg = '(?:^|(?:[.!?]\s))(\w+)'now my problem is how can I exactly replace these words, e.g. In the following string: I only want to replace 1st "the" of the sentence with "The" but I have only words in array from RegExp, without its position in string. Thanks.
-
oh, understood. Thank you very much water.
-
Hi there, I am using _Word_DocFind to find some text in the .docx file, the search result is okay, but how can I get the page number of the found text ? Here is my rough attempt: $oWord = _Word_Create() $oDoc = _Word_DocOpen($oWord,"C:\test.docx",False,Default,True) $oRange = _Word_DocFind($oDoc,"SLR 1985 PRO 3",0,Default,True) If Not @error Then ConsoleWrite("> TXT Found"&@LF) $oRange2 = _Word_DocRangeSet($oDoc, $oRange) $oRange2.Select ;~ _GetActivePage($oRange2) ; failed ;~ _GetActivePage($oRange) ; failed ;~ ConsoleWrite($oWord.Selection.Information($wdActiveEndAdjustedPageNumber)&@LF); failed Else ConsoleWrite("!Not Found. Error:"&@error&@LF) EndIf Func _GetActivePage(ByRef $oWordApp) Local $iPage = $oWordApp.Selection.Information($wdActiveEndPageNumber) ConsoleWrite(">Active Page:"&$iPage&@LF) EndFuncThanks.
-
yes it is.
-
Thank you very much for the function & the link, I tried to find in MSDN, but I was not able to find anything related. Thanks again
-
Is there any way to get the final source of the email before sending it ?