Hello! I have a "syntax error" but I can't understand where is it. Can you help me with this?
There is two text files. I want to write three lines of the first file in each line of the second file. Then, if the first file has 600 lines, the second file should have 200 lines.
I hope I have explained well what I want.
#include <File.au3> Local $sFile1 $sFile1 = "File1.txt" Local $sFile2 $sFile2 = "File2.txt" Local $sThreeLinesIntoOne FileOpen($sFile1,0) FileOpen($sFile2,2) For $i In ( _FileCountLines($sFile1) / 3 ) For $a = ( ( $i - 1 ) * 3 ) + 1 ) To ( $i * 3 ) $sThreeLinesIntoOne = $sThreeLinesIntoOne & FileReadLine($sFile1, $a) Next FileWriteLine($sFile2, $sThreeLinesIntoOne) Next FileClose($sFile2) FileClose($sFile1) AutoIt returns:
I´m getting mixed up!
What´s the difference between:
While NOT Func1() AND Func2() and
While NOT Func1() AND NOT Func2() ??
I´m using lots of these and it works find,
but now that I´m rewriting my script I´m mixing things up and getting unsure.
Hi ppl, got a problem with this, It's for a small project i have, it was sugested that i should include an error check, but now im stuck here,
if i only use one string to compare, it works, so im wondering am im missing some operator for this?
I could do multiple checks with each of them, but this way it would be simpler, what am i missing here?
$LastKey1 = ClipGet() $string = StringRegExp($LastKey1, "HKEY_CLASSES_ROOT" Or "HKEY_CURRENT_USER" Or "HKEY_LOCAL_MACHINE" Or "HKEY_USERS" Or "HKEY_CURRENT_CONFIG", 0) If $string = 0 Then MsgBox(4096, "Error", "Clipboard content is not a registry key!") Exit ElseIf $string = 1 Then MsgBox(4096, "ClipGet", "Clipboard content is a registry key!") ;function EndIf error check.au3
so after searching the Forums, Google, YouTube and Other Forums, I found ImageSearch!
AnyBody Not Shure what ImageSearch is, it is a pixelsearch that looks for a image file in the ImageSearch.au3 directory and then Looks for it on the Screen
Great Stuff !
Here is a Little Example where i Search for a .png
#include <ImageSearch.au3> $x = 0 $y = 0 $res = _imagesearcharea("GreenYellow.png",1,340,150,940,512,$x,$y,100) If $res = 1 Then MouseMove($x,$y,100) Else MsgBox(0,"404","Not Found") EndIf Just a quick explain on what happens in the function _imagesearcharea:
_imagesearcharea("image_name" , a*,b*,b*,b*,b*,c*,c*,d*)
a* = Chooses the Return Value for C*. 0 = top x,y Pixel 1 = Center of the Found image.
b* = Coordinates for the Search Window(Top,Left,Right,Bottom)
c* = The Return Variables (See a*)
d* = Variaton between Image and Search.
I'm not sure if the explanation was needed, i just like pretty Topics
My actual problem :
I want to make a do_until loop that keeps doing _Imagesearcharea until i drag the desktop icon in the circa Area.
I could do this by just specifying the Search window. But that would be way to Easy
Instead i want the Loop to Run until the icon is dragged "near" a predefined spot on one axis using one of the Variables from _Imagesearcharea.
So lets say i want to ImageSearch until i drag it near the middle of the Screen Seen from the X axis.
Until $x = 640 But that is not "Near" ! That is exact ! I want it to Do_Until it is "close" to 640, so it should also stop searching when it is +20 or -20 from 640.
I think i will do this with some advanced Operators ? Math has never been my Strength...