Jump to content

iNFERiON

Members
  • Posts

    10
  • Joined

  • Last visited

Everything posted by iNFERiON

  1. Have you included Constants.au3?
  2. That form does not have a name. As you can see in the source below "<!-- login form -->", it only has action, method and onsubmit values. If you are the owner of that bulletin board, or know the owner of that bulletin board, you should change the login template through the vB Admin CP and include a name with the form. Alternatively you could count how much times you need to press the TAB key to get to the the username field. Then use the Send command to send that amount of tabs. Then also use that command to enter the username and password for you and press the enter key to submit the form. Edit: I just noticed that the username field has accesskey "u" set. So if you send a ALT+U keystroke simulation, the cursor will automatically jump to the username field. This should do the trick then: Send("!uusername{TAB}password{ENTER}")
  3. Hey all, I am creating a script to automate a repetitive process on a website. I need to read a variable value from the site in order for the script to work ultimately. I want to read a variable in the sentence "Total: xx", where xx is a variable value that changes depending on the total amount of items. I know substring could get the "xx" part for me, but how do I just get the "Total: xx" part in a string and not the whole page text?
  4. Yes, there is a sleep in the do, it actually starts with it, since it has to execute the Do with a 1 second delay each time, being a timer and all. Here is the code: $time_hrs = Int(ControlGetText("","",$hrs)) $time_min = Int(ControlGetText("","",$min)) $time_sec = Int(ControlGetText("","",$sec)) Do Sleep(1000) If $time_hrs > 0 And $time_min = 0 And $time_sec = 0 Then $time_hrs = $time_hrs-1 $time_min = 59 $time_sec = 60 EndIf If $time_min > 0 And $time_sec = 0 Then $time_min = $time_min-1 $time_sec = 60 EndIf $time_sec = $time_sec-1 ControlSetText("","",$stopwatch,$time_hrs & ":" & $time_min & ":" & $time_sec) Until $time_hrs = 0 And $time_min = 0 And $time_sec = 0
  5. My Do..Until loop is updating a counter every second. So it has plenty to do if the counter is set to like an hour or so. I just found out that the GUI signal is coming through, but it's just being processed if the Do...Until loop is finished, not earlier.
  6. Hmm, this seems to work. But I just have a feeling there has got to be an easier way. $search_hrs = _ArraySearch($int_time,$time_hrs) If $search_hrs = 0 Or $search_hrs = 1 Or $search_hrs = 2 Or $search_hrs = 3 Or $search_hrs = 4 Or $search_hrs = 5 Or $search_hrs = 6 Or $search_hrs = 7 Or $search_hrs = 8 Or $search_hrs = 9 Then $show_hrs = String("0" & $search_hrs) EndIf $search_min = _ArraySearch($int_time,$time_min) If $search_min = 0 Or $search_min = 1 Or $search_min = 2 Or $search_min = 3 Or $search_min = 4 Or $search_min = 5 Or $search_min = 6 Or $search_min = 7 Or $search_min = 8 Or $search_min = 9 Then $show_min = String("0" & $search_min) EndIf $search_sec = _ArraySearch($int_time,$time_sec) If $search_sec = 0 Or $search_sec = 1 Or $search_sec = 2 Or $search_sec = 3 Or $search_sec = 4 Or $search_sec = 5 Or $search_sec = 6 Or $search_sec = 7 Or $search_sec = 8 Or $search_sec = 9 Then $show_sec = String("0" & $search_sec) EndIf
  7. Hey everybody, I'm having a problem with a counter script I'm creating. It's a counter that counts down a given time. Now, it works OK, except for 1 small annoying thing. If a number gets below 10, it doesn't have a leading zero, which I would like. For example, a counter I would like for 10 minutes (and 0 hours): 00:00:00 What it gives me: 0:0:0 I've tried using an array search and paste a "0" as a string in front of it (after conversion) but to no avail... Any clues ? Here's my code so far. $time_hrs = Int(ControlGetText("","",$hrs)) $time_min = Int(ControlGetText("","",$min)) $time_sec = Int(ControlGetText("","",$sec)) Dim $int_time[10] $int_time[0] = "0" $int_time[1] = "1" $int_time[2] = "2" $int_time[3] = "3" $int_time[4] = "4" $int_time[5] = "5" $int_time[6] = "6" $int_time[7] = "7" $int_time[8] = "8" $int_time[9] = "9" (...) $show_hrs = String($time_hrs) $show_min = String($time_min) $show_sec = String($time_sec) $search_hrs = _ArraySearch($int_time,$time_hrs) If Not $search_hrs = -1 Then $show_hrs = String("0" & $search_hrs) EndIf $search_min = _ArraySearch($int_time,$time_min) If Not $search_min = -1 Then $show_min = String("0" & $search_min) EndIf $search_sec = _ArraySearch($int_time,$time_sec) If Not $search_sec = -1 Then $show_sec = String("0" & $search_sec) EndIf
  8. Hey all, I'm having a problem. My script is not responding to GUI Events, during a Do...Until method is doing it's work. The GUI starts responding again after the Do is finished. Is there any way to have it listen for events while it's in the Do ? Oh yeah, I'm using GUIOnEventMode, so GuiGetMsg() is not an option and putting an additional GuiSetOnEvent in the Do also does not seem to work.
  9. Hey all, I'm pretty new to AutoIt, but I'm really liking the ease of learning it so far. I am creating a GUI installation script for a program and it's for 90% done. The last thing I want to add is a Progressbar that keeps track of the progress of extraction, so the user can see that something is acutally happening, since this is a long process. I have the progressbar added to my GUI, but what I can't figure out is if and how it's possible to have the progressbar get it's value from an external process. I am running the DOS version of RAR to extract a set of rar files. Now this is how I call the RAR application: $extract = RunWait(@TempDir & "\rar.exe x stpdta.001 " & ControlGetText("", "", $path)) Everytime a volume is done extracting the DOS application ($extract) says "Extracting from file2 ... Extracting from file3" and so on... Is there a way I can can "catch" those messages so I can set the progressbar to move on a little bit? This will give the user the idea that something is actually happening.
×
×
  • Create New...