
langthang084
Active Members-
Posts
140 -
Joined
-
Last visited
Everything posted by langthang084
-
I want to wait the website in 10s, if after 10s the website dont load complete then do some script. Here's my code but it dont run correct. Could anyone help me to solve this problem #include <ie.au3> $IE = _IECreate("google.com", 0, 1, 0) $wait = _IELoadWait($IE, 0, 10000) if $wait = @error Then ... EndIf $Read = _IEBodyReadText($IE)
-
Here my code with IE, but why I dont use Filter with these link? and dont add $link[$i] to array? #include <IE.au3> #include <Array.au3> #include <File.au3> Local $oIE = _IECreate("http://www.youtube.com/results?search_query=ABCDE") Local $oLinks = _IELinkGetCollection($oIE) Local $iNumLinks = @extended $link = 0 $linkend = 0 Local $sTxt = $iNumLinks & " links found" & @CRLF & @CRLF For $oLink In $oLinks $sTxt &= $oLink.href & @CRLF Next $Finish = FileOpen("C:\temp.txt", $FO_APPEND + $FO_UTF8) FileWrite($Finish, $sTxt) _FileReadToArray("C:\temp.txt", $link) for $i = 0 to $link[0] if $link[$i] = "http://www.youtube.com/watch?v=" Then _ArrayAdd($linkend, $link[$i]) EndIf Next _ArrayDisplay($linkend, "")
-
How to delete all the same files name?
langthang084 replied to langthang084's topic in AutoIt General Help and Support
Yeah! All because of the "Tooltip" -
I have 2 folders, Folder 1 contain 15000 files, Folder 2 contain 2000 files. I want to delete all the files in Folder 1 which has the same name with Folder 2. And here's my code #include <file.au3> $path = "D:\datadic\FOLDER2\" $path2 = "D:\datadic\FOLDER1\" $listLD = _FileListToArray($path, "*.doc", 1, False) $listFull = _FileListToArray($path2, "*.doc", 1, False) for $i = 1 to $listFull[0] for $f = 1 to $listLD[0] ToolTip("Full " & $i & " LD " & $f, 600, 100) if $listLD[$i] = $listFull[$f] Then FileDelete($path2 & $ListFull[$f]) ContinueLoop EndIf Next Next Exit But it tooks so long because of 15000 files in Folder 1 Is there an other way to do this? Thanks all!
-
Thanks guinness for this code: AU3_Example.txt file: MsgBox(0, "It Works", "Hello World") AutoIt Script: _RunAU3("AU3_Example.txt") _RunAU3("AU3_Example.txt") _RunAU3("AU3_Example.txt") _RunAU3("AU3_Example.txt") _RunAU3("AU3_Example.txt") Func _RunAU3($sFilePath, $sWorkingDir = "", $iShowFlag = @SW_SHOW, $iOptFlag = 0) Return Run('"' & @AutoItExe & '" /AutoIt3ExecuteScript "' & $sFilePath & '"', $sWorkingDir, $iShowFlag, $iOptFlag) EndFunc ;==>_RunAU3 But It runs 5 au3 script at the same time, but I want to run it step by step. What could I do? (I dont want to make 5 script in one, because after one finishes, I must change it code (like the folder and the file path) and run again, So I want to change it first to 5 new script, and run step by step)
-
How to clear all the Office Clipboard?
langthang084 replied to langthang084's topic in AutoIt General Help and Support
#include <Clipboard.au3> Opt("WinTitleMatchMode", 2) WinWaitActive("Word") send("^a") sleep(300) send("^c") $win = WinGetHandle("Word") _ClipBoard_Open($win) sleep(300) _ClipBoard_Empty() here's my code, but it dont work -
Question about _Word_DocFindReplace()
langthang084 replied to langthang084's topic in AutoIt General Help and Support
Ex: My document has 20 words to replace. First, it replaces 12 words. After that, it replaces 8 words (so it needs 2 command lines). I only need to replace in body section. I use Microsoft Word 2003 -
Question about _Word_DocFindReplace()
langthang084 posted a topic in AutoIt General Help and Support
_Word_DocFindReplace($oDoc,"AA" ,"BB" , $WdReplaceAll, 0, True ) When my document have many word to replace, this command line above only replace a part of them, so I must repeat this _Word_DocFindReplace(). Is the another way to replace all in one command line? -
here's my code: HotKeySet("^!1", "test") for $i = 1 to 10 Then if $i = 5 Then send("^!1") sleep(300) Else MsgBox(0, "", $i) EndIf Next Func test() ContinueLoop EndFunc But It has error:"ExitLoop/ContinueLoop" statements only valid from inside a For/Do/While loop.: How to use contineuloop in func? (I dont want to put Contineuloop in for ...to ) thanks!
-
Run in XP normanly but not in win 7
langthang084 replied to langthang084's topic in AutoIt General Help and Support
I've tested this but the result is "D%3A%5CDATA1%5CA+B+C.htm". I want the result is "D:/DATA1/A%20B%20C.htm" -
Run in XP normanly but not in win 7
langthang084 replied to langthang084's topic in AutoIt General Help and Support
I dont know why it disappear. It's File.au3 and Chrome.au3 (Chrome UDF from our forum). -
#include <File.au3> #include <Chrome.au3> $l = "D:\DATA1\A B C.htm" $UnicodeBinary = StringToBinary ($l, 4) $UnicodeBinary2 = StringReplace($UnicodeBinary, '0x', '', 1) $UnicodeBinaryLength = StringLen($UnicodeBinary2) Local $EncodedString For $i = 1 To $UnicodeBinaryLength Step 2 $UnicodeBinaryChar = StringMid($UnicodeBinary2, $i, 2) If StringInStr("$-_.+!*'(),;\?:@=&abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890", BinaryToString ('0x' & $UnicodeBinaryChar, 4)) Then $EncodedString &= BinaryToString ('0x' & $UnicodeBinaryChar) Else $EncodedString &= '%' & $UnicodeBinaryChar EndIf Next ;Return $EncodedString $URL = $EncodedString _ChromeStartup($URL) MsgBox(0, "", $URL, "") Chrome ver 33, Chrome UDF from our forum. In Windows XP, it run normanly but in Win 7, the link in Chrome is "file:///D:/DATA1/A%2520B%2520C.htm" (the "%" is converted to "%25") but the MsgBox is "D:/DATA1/A%20B%20C.htm", So in Chrome this htm dont load What should I do now? THanks all!
-
Here's my code: Opt("WinTitleMatchMode", 2) For $i = 0 to 100 WinActive("SciTE-Lite") WinWaitActive("SciTE-Lite") sleep(150) if WinActive("AAA.au3") = @error Then ControlSend("SciTE-Lite", "", "[CLASS:Scintilla; INSTANCE:1]", "^o") sleep(150) WinWaitActive("Open File") ControlSetText("Open File", "","[CLASS:Edit; INSTANCE:1]", "D:\Auto_New\MM\AAA.au3") ControlSend("Open File", "","[CLASS:Edit; INSTANCE:1]","{enter}") sleep(150) endif WinWaitActive("AAA.au3") sleep(150) ControlSend("SciTE-Lite", "", "[CLASS:Scintilla; INSTANCE:1]","^g") WinWaitActive("Go To") ControlSend("Go To", "", "[CLASS:Edit; INSTANCE:1]", 22) sleep(150) ControlSend("Go To", "", "[CLASS:Edit; INSTANCE:1]","{enter}") WinWaitActive("SciTE-Lite") ControlSend("SciTE-Lite", "", "[CLASS:Scintilla; INSTANCE:1]","+{end}") sleep(150) ControlSend("SciTE-Lite", "", "[CLASS:Scintilla; INSTANCE:1]","{delete 2}") sleep(150) ControlSend("SciTE-Lite", "", "[CLASS:Scintilla; INSTANCE:1]","^s") sleep(150) ControlSend("SciTE-Lite", "", "[CLASS:Scintilla; INSTANCE:1]","!{f4}") sleep(150) Next exit But SOMETIME it dont run correctly. Ex: Dont active SciTE-Lite in the next loop, or with CTRL + O, only O is Pressed; DELETE twice times but its pressed three times. How do I solve it?
-
Sorry, My internet was off until now. I dont want to delete all enter. I want to connect all the number lines to the alphabet line abovet it. Like this: "AAAAAAA 111 222 333 BBBB 444 555" ===> "AAAAAAA: 111,222,333 BBBB: 444,555" the total alphabet and number lines are random, and there're many paragraphs like this. So I want to stop the script at "5" (End of paragraph or end of word like you understand) to run again with the new paragraph
-
send problem on slow computer
langthang084 replied to langthang084's topic in AutoIt General Help and Support
i want to use with "Find and Replace" in Word. send("aaaaaaaaaaaaaaaaaaaaaaaaaaa") sleep(1000) send("{tab}") sleep(300) send("bbbbbbbbbbbbbbbbbbbbbbbbb") sleep(1000) send("!a") sleep(300) then the result is "aaaaaaaaaaaaabbbb" and i dont know how to use ControlSetText with "find and replace" :|