AdmiralAlkex Posted September 29, 2010 Posted September 29, 2010 Sounds to me like you want:$find19 = '"Ans by +Machine"'$replace19 = "Message was delivered."Or:$find19 = """Ans by +Machine"""$replace19 = "Message was delivered."Have you read Language Reference - Datatypes in the helpfile? It explains quote usage in AutoIt. .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface
bb01 Posted September 29, 2010 Author Posted September 29, 2010 thats excatly what i need, however everytime i include that, it errors out, as it finds the Ans by +Machine as an error
GEOSoft Posted September 29, 2010 Posted September 29, 2010 StringReplace($somestring, '"', "") George Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number. Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else. "Old age and treachery will always overcome youth and skill!"
GEOSoft Posted September 29, 2010 Posted September 29, 2010 Dim $aFind[21] = ["Telco Message", "Not Selected", "Not Called Yet", "Not Accepted", "No Connect", "OGM Too Long", "Max No Answers", "Hung Up Early", _ "Learned Machine", "Fax or Modem", "Call Failed!", "Busy After Voice", "No Answer", "Blocked Number", "Ans by Person", "Ans by Pager", "Ans by Machine", _ "Ans by +Machine", "Telco Message", "9 Not Confirmed", "Busy"] $sFile = "C:\Some\Path\Somefile.csv" $sStr = FileRead($sFile) $iReplaced = 0 For $i = 0 To UBound($aFind) -1 $sFind = StringReplace($aFind[$i], "+", "\+") $sSRE = "(?i)\x22?" & $sFind & "\x22?" Switch $i Case 14 To 17 $sReplace = "Message was delivered." Case Else $sReplace = "Unable to deliver message." EndSwitch ;; Now you handle your search and replace code here. $sStr = StringRegExpReplace($sStr, $sSRE, $sReplace) $iReplaced += @Extended Next If $iReplaced Then $hFile = FileOpen($sFile, 2) FileWrite($hFile, $sStr) FileClose($hFile) EndIf Again I didn't test but it should be correct. George Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number. Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else. "Old age and treachery will always overcome youth and skill!"
bb01 Posted September 30, 2010 Author Posted September 30, 2010 ok got the whole script working fine.. however it keeps getting stuck in the memory, eg.. As got a lot of copying and pasting, & it seems to be getting stuck in the memory, is there a way of getting the script to free up the memory before it continues?
GEOSoft Posted September 30, 2010 Posted September 30, 2010 I don't know why that's happening but take a look at the memory functions in the UDFs George Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number. Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else. "Old age and treachery will always overcome youth and skill!"
bb01 Posted October 6, 2010 Author Posted October 6, 2010 ok, got another problem & not sure how to fix this.. If the script runs & enters everything in a Transparent window, & seems to be fine.. How do i get it to recognize this window & go back 1 stage >>>> Window <<<< Title: N-FOCUS - Warning - \\Remote, 128-bit SSL/TLS. Class: Transparent Windows Client as what i have is WinActivate("N-FOCUS - Search Narrative - \\Remote, 128-bit SSL/TLS.", "") WinWait("N-FOCUS - Search Narrative - \\Remote, 128-bit SSL/TLS.", "") Send("{RIGHT}") Send("{tab 4}") Send("{DOWN 4}") Send("{SPACE}") Send("{tab}") Send("{DOWN 3}") Send("{SPACE}") Send("!o") Sleep(100) ;if errors out go back to N-FOCUS - Search Narrative - \\Remote, 128-bit SSL/TLS. WinActivate("N-FOCUS - Warning - \\Remote, 128-bit SSL/TLS.", "") Send("{SPACE}") WinActivate("N-FOCUS - Search Narrative - \\Remote, 128-bit SSL/TLS.", "") WinWait("N-FOCUS - Search Narrative - \\Remote, 128-bit SSL/TLS.", "") Send("{RIGHT}") Send("{tab 4}") Send("{DOWN 4}") Send("{SPACE}") Send("{tab}") Send("{DOWN 3}") Send("{SPACE}") Send("!o") Sleep(100) However it doesnt seem to do that..
bb01 Posted October 8, 2010 Author Posted October 8, 2010 Well guys think i got round it.. If WinExists("N-FOCUS - Warning - \\Remote, 128-bit SSL/TLS.") Then Send("{SPACE}") Sleep(500) Send("{SPACE}") Sleep(100) Send("{tab 8}") Sleep(100) Send("{SPACE}") Sleep(100) Send("{SPACE}") Sleep(100) Sleep(100) Send("!o") EndIf
bb01 Posted October 11, 2010 Author Posted October 11, 2010 ok, that didnt work, anyone any idea why it didnt work, it went back to the last page & then just stopped..
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