Jump to content

filet

Members
  • Posts

    14
  • Joined

  • Last visited

Everything posted by filet

  1. I think what I need is HotKeySet using the Esc key driving the ExitLoop function to terminate my loop. I could use a little help with the code. I'm trying to learn how to use this stuff, but it is still a bit of a mystery to me.
  2. My program is working now, thanks to everyones help. It is running a do...until loop and it checks for updates and sounds a beep when the number of available jobs increases. I need to turn it off if I leave my house or go to sleep, so I would like to know if there is a function I can use to stop the loop with a manual keystroke. It can be any/or all letter(s) or number(s) as long as it stops. Right now I have to shut the conputer off to stop it.
  3. Thank you. It was so small I didn't even notice it. I didn't type it . I'm not sure how it got there, but that was the problem.
  4. Here is the code for the loop portion: I changed the name of the website. Do Send("#r") ;WinWaitActive("Run") Send("http://www.website") ;open Demand Studios Electrical Send("{enter}") Sleep (3000) Send("{ALT}") ;opens source file Send("{RIGHT 2}") Send("{DOWN 12}") Send("{ENTER}") ; opens source file Sleep (3000) ; two second delay Send("{CTRLDOWN }") ; select all of source Send("{A}") Send("{A}") ; DUPLICATE NOT NEEDED Send("{C}") ; copy source code Send("{CTRLUP}") Send("{ENTER}") ; copy source code Sleep (4000) $handle = WinGetHandle ("") winclose ($handle) Sleep (4000) $handle = WinGetHandle ("") winclose ($handle) Sleep (4000) Send("{CTRLDOWN }") ;opens notepad Send("{ALTDOWN }") Send("{n}") Send("{CTRLUP }") Send("{ALTUP}") ;opens notepad Sleep (4000) Send("{CTRLDOWN}") ; pastes source to notepad Send("{V}") Send("{CTRLUP}") ; pastes source to notepad Sleep (5000) Send("{ALT}") Send("{DOWN 3}") Send("{ENTER}") Sleep (3000) Send("C:\Users\phil\Desktop\sourcetest.txt") ; saves source to notepad file Sleep (3000) Send("{ENTER}") Send("{LEFT}") Send("{ENTER}") ; saves source to notepad file Sleep (3000) $handle = WinGetHandle ("") winclose ($handle) #include<array.au3> ; finds total and puts in array $re = StringRegExp(FileRead('C:\Users\phil\Desktop\sourcetest.txt'), 'Total.*?\\d+)', 3) ;_ArrayDisplay($re) $secondtotal = $re[0] ;MsgBox (0, "", $firsttotal) ; displays total string in message box ~ until $secondtotal >= ($firsttotal + 25) Here are the declarations that are at the beginning of the code. dim $firsttotal dim $secondtotal dim $handle
  5. This is the way I wrote the line ~ until $secondtotal = ($firsttotal + 25) I get an error back that says unable to parse line. Both $secondtotal and $firsttotal are declared and the rest of the code works fine. I suspect the syntax is wrong, but I'm not sure how to change it. I tried several combinations and I keep getting the same error message. Obviously I'm very new at this, but the rest of the program works fine.
  6. I don't want a number loop. I just want to know the correct way to write = $string + 25 I want the loop to stop running when $string2 is a number that is 25 higher than $string1 Example $string 1 is 100 $string2 is 124 - loop still running $string2 is 125 - loop stops running
  7. Im trying to write a do until loop statement comparing one string to another string plus a number. For example: Do ....... Until $string2 = ($string1 + 25) I can't quite get the syntax. I want the loop to stop when $string2 is equal to $string1 plus 25.
  8. I need to close several windows in windows 7 using autoit, so loop statement can work. I tried this $handle =wingethandle("") winclose ($handle) but it will not work consistently. It worked two times out of ten. Now it won't work at all??? I have several windows I need to close between each loop. I also tried winclose ("ACTIVE") and winclose ("(ACTIVE)", "") I can't figure out what I'm doing wrong. Please help.
  9. Thank you BrewManNH. Thank you, thank you, thank you. Now that I see it in writing it is obvious. It worked perfectly.
  10. I read the tutorial before I posted, but it didn't answer my question. I'm sure I'm missing something obvious.
  11. I managed to create a one dimentional array with your help. I know this is basic, but arrays confuse me. I need to save the number in row 0 column 0 from the array as a variable so that I can compare it to another variable as the program runs. I do not know how to pull the number from the array to save it as a variable. I posted this as a comment in my previous post. I did not intend to double post, but I believe puting in in my old post was an error. Again, any help will be greatly appreciated. I haven't done any code writing for over thirty years and I didn't do very much at that time.
  12. Thank you all. I did manage to create a one dimentional array. The number I need is in row 0 column 0. I know this is basic, but arrays confuse me. I need to save the number from the array as a variable so that I can compare it to another variable as the program runs. I do not know how to pull the number from the array to save it as a variable. Again, any help will be greatly appreciated. I haven't done any code writing for over thirty years and I didn't do very much at that time.
  13. I went to the help file and looked for StringBetween and StringRegExp and both came back as file not found. Do I need to download additional files?
  14. I am really new at this and I could use some help. I have a text file that has "Total" as part of one line followed by : and then a one to five digit number and then };. I need to find the number and save it as a variable. Example: "Total":#### };
×
×
  • Create New...