MrMitchell
Active Members-
Posts
738 -
Joined
-
Last visited
-
Days Won
2
MrMitchell last won the day on August 26 2012
MrMitchell had the most liked content!
Profile Information
-
Location
California
Recent Profile Visitors
MrMitchell's Achievements
Universalist (7/7)
16
Reputation
-
pete_wilde reacted to a post in a topic: Tomorrow date
-
gritts reacted to a post in a topic: Import CSV File to Existing Workbook
-
KEHT reacted to a post in a topic: _WordDocFindReplace issue
-
Here's a method to do it which will: Grab the source of the pageUse a stringregex on it to grab VIN/MSRP pairs and drop them into a temporary array Use the first iteration to create the "final" array by copying the temporary array into itOtherwise, move on to the next page(s) and repeat step 2 then concatenate the temporary array with the final arrayThe final array is then dropped into a spreadsheet.This is fully working (at least for me) so you should be able to run it as is. Like the last poster said there's a billion ways to go about it. Mine probably not the most efficient, but hey, still works. #include <Array.au3> #include <Excel.au3> #include <Inet.au3> Dim $aFinalVINPrice Dim $oExcel, $row $url = "http://www.beamantoyota.com/new-inventory/index.htm?SBmake=Toyota&SByear=clear&SBmodel=Corolla&SBtrim=clear&SBbodystyle=clear&SBhighwayMPG=clear" $string = _INetGetSource($url) ;~ ConsoleWrite($string) $aPages = StringRegExp($string, '<li><a href="?start=(d*)" rel', 3) $aPages = _ArrayUnique($aPages) ;~ _ArrayDisplay($aPages) For $i = 1 To $aPages[0] $string = _INetGetSource($url & "&start=" & $aPages[$i]) ConsoleWrite("URL:" & $url & "&start=" & $aPages[$i] & @CRLF) $regex = '<dt>VIN:</dt><dd>(w*)</dd>[sS.]*?<span>MSRP</span>[sS]*?<em>[sS]*?<abbr title="dollar">$</abbr>([d,]*)' $aVINPrice = StringRegExp($string, $regex, 3) If IsArray($aFinalVINPrice) Then _ArrayConcatenate($aFinalVINPrice, $aVINPrice) Else $aFinalVINPrice = $aVINPrice EndIf Next ;~ _ArrayDisplay($aFinalVINPrice) $oExcel = _ExcelBookNew() _ExcelWriteCell($oExcel, "VIN", 1, 1) _ExcelWriteCell($oExcel, "MSRP", 1, 2) $row = 2 For $j = 0 To UBound($aFinalVINPrice) - 1 Step 2 _ExcelWriteCell($oExcel, $aFinalVINPrice[$j], $row, 1) _ExcelWriteCell($oExcel, $aFinalVINPrice[$j + 1], $row, 2) $row += 1 Next
-
maiks86 reacted to a post in a topic: Script error when chrome is active
-
maiks86 reacted to a post in a topic: Script error when chrome is active
-
_IECreate gives error - vbs file opens in IE
MrMitchell replied to bhumis's topic in AutoIt General Help and Support
Is your VBS opening in IE because you have associated IE with the VBS file type? If not then the VBS might be opening the IE window. If that's the case then whatever is in the VBS may be able to be converted to AutoIt. What happens when you run on the command line: "wscript <vbs>" where <vbs> is your VBS filename? -
_IECreate gives error - vbs file opens in IE
MrMitchell replied to bhumis's topic in AutoIt General Help and Support
I'm curious why you are opening a VBS file using IE? It seems IE is doing exactly what I would think it'd do in this situation, try to download the file. Can you describe your entire situation in greater detail? -
Check the Help File for what everything means. The INI goes like this... [section] Key=Value Key2=Value2 ... Default is what will be returned if the key can't be found. You can find INI files everywhere on your PC, check C:windows, for example. If you have the full installation of AutoIt, while your cursor is on INIRead() function press F1 and the Help File should open up to that function.
-
Finding a Pixel in a background window
MrMitchell replied to Gemba's topic in AutoIt General Help and Support
These might work... _PixelGetColor_CaptureRegion() _PixelGetColor_GetPixelRaw() Basically you can use them to search the window you want to search by briefly bringing it to the foreground to capture it to memory then search it in memory. I'll add links in a second when I can find them. Edit: Add link... -
For this: $Output = $Output & $Properties ": " & $objItem.$Properties & @CRLF ;This line gets "Error in Expression" If i remark out this line... You need an & after $Properties and before ": " And for the $objItem.$Properties, try like this: Execute("$objItem." & $Properties) Final line would look something like: $Output = $Output & $Properties & ": " & Execute("$objItem." & $Properties) & @CRLF
-
read a certain point in a video file?
MrMitchell replied to a topic in AutoIt General Help and Support
No it's not that it was too well written, because it wasn't, but it was just a little confusing. It's a fundamental problem with the Translate service - sometimes it doesn't understand the context so the meaning the person is trying to convey is literally lost in translation. But anyway back to your issue. That's a complex algorithm; sounds a lot like motion detection only you're using a video instead of a live feed. I am by no means an expert on this but I don't think AutoIt can do this on its own. You would need some external app with an API that AutoIt can interface with. -
MrMitchell reacted to a post in a topic: How to get own default e-mail address ?
-
read a certain point in a video file?
MrMitchell replied to a topic in AutoIt General Help and Support
Ok well have fun with that. Good luck, and I really mean it. If you could explain why you need this we could offer more suggestions, like software that's already out there than can create thumbnails from video files. Did you use Google Translate for this? -
read a certain point in a video file?
MrMitchell replied to a topic in AutoIt General Help and Support
Yes, the project does matter. It's like context for a word, some words are useless without context. Your request is nearly useless without project details. But anyway, as already suggested by JohnOne in your use _ScreenCapture() to get the image. It's up to you to determine the coordinates of the capture region and how to figure out when you're at the correct point in the video to take a screenshot. -
read a certain point in a video file?
MrMitchell replied to a topic in AutoIt General Help and Support
You might be better off explaining your project - what is its purpose and how is it supposed to work? -
Script error when chrome is active
MrMitchell replied to maiks86's topic in AutoIt General Help and Support
This is not so much error checking as it is validation, but for instance... Local $ClipTown = $TownsList[_ArraySearch($TownsList, GUICtrlRead($Combo2))][0] ;Create a new variable to hold the result of the _ArraySearch Local $ArraySearchTownList = _ArraySearch($TownsList, GUICtrlRead($Combo2)) ;Check if it's negative and if it is make it 0 (The function returns -1 on error and variable @error tells you why there's an error) If $ArraySearchTownList < 0 then $ArraySearchTownList = 0 Local $ClipTown = $TownsList[$ArraySearchTownList][0] You could go further and set it up so that if $ArraySearchTownList is -1 and @error is 6 (6 means value wasn't found in the array) then you can set $ClipTown to " " as opposed to using whatever is in $TownsList[0][0] Disclaimer: This isn't how I would do it but it's just an example to show that some variables need to be checked before using them in other functions. -
Script error when chrome is active
MrMitchell replied to maiks86's topic in AutoIt General Help and Support
This line: Local $ClipTown = $TownsList[_ArraySearch($TownsList, GUICtrlRead($Combo2))][0] For me the _ArraySearch is returning -1 so and you can't do that with an array. You need error checking at least there, and probably other places as well. -
Script error when chrome is active
MrMitchell replied to maiks86's topic in AutoIt General Help and Support
Is the error "Array variable subscript badly formatted"? -
Whether or not this is what you're looking for, it's still something you can learn from since you're just getting started: $a = "are you feeling ok today?" $b = "sorry to hear that!" $c = "im glad!" $response = MsgBox (4,"test",$a ) ;Yes = 6, No = 7 If $response = 7 Then MsgBox (0,"test",$b ) ElseIf $response = 6 Then MsgBox (0,"test",$c ) EndIf