Jump to content

moorsey

Members
  • Posts

    7
  • Joined

  • Last visited

moorsey's Achievements

Seeker

Seeker (1/7)

0

Reputation

  1. Hi all, Have looked around and tried a few different things from various suggestions, but can't get pixelsearch to loop until it finds a colour. The script either stalls completely, or just continues running the script. At the moment, it just continues with the below: Local $pixel Do $pixel = PixelSearch(46, 427, 71, 451, 0xFFFF00) _FileWriteLog($LogFile, "Checking pixels") ; Write to the logfile passing the filehandle returned by FileOpen. Sleep(500) Until Not @error _FileWriteLog($LogFile, "Toolbar found, continuing") ; Write to the logfile passing the filehandle returned by FileOpen. Have also tried using "Until $pixel[0] > 0". I have used the following code to check that the PixelSearch does actually work: Local $pixel Sleep(5000) $pixel = PixelSearch(46, 427, 71, 451, 0xFFFF00) MsgBox(0, "", $pixel[0] & $pixel[1]) Which it does. Any tips appreciated!
  2. ahh, of course, that solves the issue very much appreciated for pointing out my error! thanks
  3. I have copied and changed slightly the _FileListToArray example from the AutoIt help file. The example has 2 error popups, if the folder path is wrong and if there are no files found at the target directory. I also added some log writing to these. But, instead of any of this happening when I simulated these errors, the script continues and errors out when the array is referenced and found to be empty Here is my code Local $FileList = _FileListToArray($spath,$sfilter) _FileWriteLog($LogFile, "File list read into array") ; Write to the logfile passing the filehandle returned by FileOpen. FileClose($LogFile) ; Close the filehandle to release the file. MsgBox(0,"",@error) If @error = 1 Then MsgBox(0, "", "No Folders Found.") _FileWriteLog($LogFile, "Specified folder & $sPath & not found") ; Write to the logfile passing the filehandle returned by FileOpen. FileClose($LogFile) ; Close the filehandle to release the file. Exit EndIf If @error = 4 Then MsgBox(0, "", "No Files Found.") _FileWriteLog($LogFile, "No & $sFilter & files found in & $sPath") ; Write to the logfile passing the filehandle returned by FileOpen. FileClose($LogFile) ; Close the filehandle to release the file. Exit EndIf I checked the error code by just putting a message box in to display the @error after the files had been read in. Any ideas on this? Many thanks
  4. cheers for the reply! I run all scripts with #requireadmin at the top. BUT, when I have been testing a failure on specific dialogues, I have just copied that portion of code out into a new temp script and ran that. These temp scripts have not had #requireadmin in them, so may have been part of my troubleshooting problems, will remember this for next time I am giving it a go, thanks for your help
  5. just wanted to follow this one up, can't find anything related! Same problem, in Vista, a warning comes up when unsigned drivers are installed. I can only assume Vista prevents interaction with these diolog boxes. I have tried the following: WinWait("Windows Security") send("!i") WinWait("Windows Security") ControlClick("Windows Security", , "[CLASS:can't remember what this was; ; INSTANCE:1]") Sorry, can't remember what the class was, changed it since, was copied from the Window Info util though. The buttons don't have an ID I can use like most other things. Martin
  6. ahhh, that makes sense, great! Really appreciate the information, lots to learn to get efficient at AutoIt! Will hopefully save me a lot of time on manual software installs though! Thanks again
  7. I have written a script that installs some software. But depending on the computer name, enters a different serial code (each code can be applied to a varying number of PCs depending on when it was bought etc). Only problem is, the script only ever enters the first serial code and never chooses any others. Could anyone suggest why this is? if @ComputerName = "PCVN121" or "PCVN122" or "PCVN123" or "PCVN124" or "PCVN125" Then send("serial code 1 {enter}") ElseIf @ComputerName = "PCVN126" or "PCVN127" or "PCVN128" or "PCVN129" or "PCVN1210" Then send("serial code 2 {enter}") ElseIf @ComputerName = "PCVN1211" or "PCVN1212" or "PCVN1213" or "PCVN1214" or "PCVN1215" Then send("serial code 3 {enter}") ElseIf @ComputerName = "PCVN21" or "PCVN22" or "PCVN23" or "PCVN24" or "PCVN25" Then send("serial code 4 {enter}") ElseIf @ComputerName = "PCVN26" Then send("serial code 5 {enter}") ElseIf @ComputerName = "PCVN27" Then send("serial code 6 {enter}") ElseIf @ComputerName = "PCVN28" Then send("serial code 7 {enter}") ElseIf @ComputerName = "PCVN29" Then send("serial code 8 {enter}") ElseIf @ComputerName = "PCVN210" Then send("serial code 9 {enter}") EndIf
×
×
  • Create New...