Jump to content

cherrylatte

Members
  • Posts

    13
  • Joined

  • Last visited

Everything posted by cherrylatte

  1. Tried to google it by "autoit tag" and couldn't found satisfying result. But now that you mention UDFs I'll try to look it up. Thanks!
  2. Hi I'm trying to get tags from a random website by using autoit. so i looked up for some functions and found _IETagNameGetCollection but that function seemed to only work for IE... are there any function that collects tags from a browser other than IE? Thank you in advance
  3. Hi guys , I found out the reason why the second loop wasn't working. It's because I miss placed below statement. Local $aSaltList = _FileListToArrayRec($sFilePath2,  "file db",1, -2 , 1, 2) ; get the whole path of files named ' file db' under 2 depth of userdata  folder that statement has to be right after the end of first for_loop because the files supposed to be in aSaltList is not yet in complete state until the first for_loop finishes anyways I appreciate for the help!
  4. yeah,, I soon found out that I had to use ExitLoop I can just replace Return 0 to exitloop right?
  5. hey guys I have a question I am trying to make a while-loop that goes on for 5 minutes until the process ($pid) disappears but I am getting a "invalid keyword at the start of this line" error on "Return 0" statement. can somebody figure this out for me? Global $wait_time = 300 Local $hTimer = TimerInit() Local $time_diff =0 While ProcessExists($pid) $time_diff = TimerDiff($hTimer) If ($time_diff > $wait_time) Then Return 0 WEnd
  6. Hi guys I am trying to execute each version of a browser (first for loop) and get a version of each of the file database by using SQLite tool. (second loop) The first for loop seems to work fine. But when it goes into a second loop, the second for loop seems to stop after like 1~2 times of looping. I could not find the reason for it. If I separate those loops into each au3 files,,then it seems to work fine...I'll show you guys the code..I'd appreciate it if anybody finds a solution #include <Array.au3> #include <File.au3> ;#include <MsgBoxConstants.au3> Opt("WinTitleMatchMode", 2) Global $result_file1 = "C:\Users\hello\Desktop\result.txt" Local $sFilePath1 = "C:\test" Local $sFilePath2 = "C:\test\User Data" Local $aFileList = _FileListToArray($sFilePath1 , "test*", Default, True) ;get the whole path of files starting with 'test' under C;test  and put it in array Local $aSaltList = _FileListToArrayRec($sFilePath2,  "file db",1, -2 , 1, 2) ; get the whole path of files named ' file db' under 2 depth of userdata  folder For $i=1 to UBound($aFileList)-1    Sleep(3000)    ShellExecute($aFileList[$i])    Local $hWnd = WinWait("chrome"," ",10)    WinActivate($hWnd)    Sleep(6500)    WinClose($hWnd)    Sleep(100)    ProcessClose ("chrome.exe")    Sleep(4000) Next For $j=2 to UBound($aSaltList)-1    Sleep(3000)    ShellExecute($aSaltList[$j]) ;;PROBLEM    Sleep(2000)    ;sqlite    Open()    Sleep(3000)   ;run sql    RunSql() Next Func Open() ;open sqlitespy Sleep(3000) Send("s") Sleep(1500) Send("{ENTER}") EndFunc Func RunSql() ;run a sql sentence and save the result in a result.txt file    ControlClick("[CLASS:TfrmMain]","","[CLASS:TDISynEdit]")    Send("select * from version {F9}")    ControlClick("[CLASS:TfrmMain]","","[CLASS:TMemo]","left",2)    Sleep(1500)    Send("^c")    Local $string1 = ClipGet()    FileWrite($result_file1, $aSaltList[$j])    FileWrite($result_file1, "    ")    FileWriteLine($result_file1, $string1)    ProcessClose ("SQLiteSpy.exe") EndFunc
  7. wow I never thought of that. Thank you!!
  8. hi I'm trying to execute files I want it to run in order. for instance, if there's folder like below, I want to run 1.exe > 2.exe > 3.exe root folder |___folder 1 > 1.exe |___folder2 > 2.exe |___folder3 > 3.exe What I did to do the above, was to make a text file that contains the path to each of those files and put those in array form. but copying and pasting every path of those files into a text file is very exhausting thing to do when there's like hundreds of files to execute. So I was wondering if there is a simple way to run those files. I'd be thankful if anybody answers it.
  9. hi I'm trying to make a script that runs different functions depending on the local time of the computer I tried to do if _NowCalcDate < 2016/04/12 Then functionA() Else functionB() Endif and that doesn't seem to work. I am assuming that value returned from _NowCalcDate doesn't match with the date type I wrote What should I do? I'd appreciate for any help that's given.
  10. Thank you! I am happy now
  11. Hello, I would like to make a script like the below open the browser > copy the url in the browser's address bar > save it in a text file I have no clue on how to make this I'd appreciate for any help
  12. Hi I just started studying Autoit and I am having trouble in understanding while loop statement. I'm trying to make a script that is intended to go to another site when Image 'a.bmp' is exposed. The image 'a.bmp' will be a favicon of a certain site. So the script below is made to perceive favicon 'a.bmp' $search = _ImageSearch('a.bmp',0,0,0,0) While $search = _ImageSearch('a.bmp',0,0,0,0) Sleep(10) WEnd This script actually works fine. It exits the loop and do the next action when 'a.bmp' appears. But the problem is that I've realized later on that the while loop is executed when the expression ( $search = _ImageSearch('a.bmp',0,0,0,0) is 'true'. if the definition of while loop I've mentioned is correct, isn't the loop above should go through an infinite loop when the 'a.bmp' appears? I'm so confused. I'd appreciate it if anyone answers..
×
×
  • Create New...