
NS5
Active Members-
Posts
26 -
Joined
-
Last visited
Everything posted by NS5
-
Ok cool problem has been fixed. Thanks guys!
-
If Not _FileReadToArray("REMOVED.ini", $CARDREMOVE) Then MsgBox(4096,"Error", " Error reading log to Array error:" & @error) Exit EndIf For $i = 1 To $CARDREMOVE[0] $N = PixelChecksum(907, 135, 957, 161) & "-" & PixelChecksum(934, 198, 1001, 209) While $N <> PixelChecksum(907, 135, 957, 161) & "-" & PixelChecksum(934, 198, 1001, 209) $N = PixelChecksum(907, 135, 957, 161) & "-" & PixelChecksum(934, 198, 1001, 209) WEnd $CADDY = IniRead("REMOVED.INI", "REMOVED", $N, "NOT FOUND") If $CADDY = $N Then ToolTip("TEST", 0, 0) Send("{DOWN}") Sleep(500) Else EndIf Next AutoIT v3.3.0.0 WIN XP sp2 When I try and run the code over Vista 32 "Error reading log Array error:0"
-
Hi all was wondering if anyone encountered _FileReadToArray bugs on Vista too?
-
Hi all and to all MVP group. Anyone has the code for searching the installation directory of a specified file in registry and "Run" the specified file? Thanks
-
Delete this topic sorry found the fix to my problem
-
DELETED cards.txt prices.txt
-
woah! Great! Many Thanks!
-
Oh I don't have the idea where to find _FTP_PutFile()
-
Hi sorry about that, already manage to set it to a default file I wanted to send. Now I only need to remove the GUI interface. Meaning once I call this exe it will just run by itself and send the file to my ftp server no questions ask or GUI.
-
Good work Yashied!, though I was looking to convert this uploader without the GUI could you direct where can I change it? Thanks in advance Yashied
-
You are missing the _FTPConnect()
-
Hi, I'm interested with this FTP thing I was wondering if someone wants to ensure or try to work on it? Thanks
-
Ok I'll try a bit more explanation by giving a vivid example "sorry just got the idea from a friend". I have an application like Magic the gathering online and I want to automate it using autoIT, 1st with the applications client we can Automate it right? But with back or front end app'. I was wondering automate the application without loading the interface and automate it?
-
haha nice one, a simple idea with it is where you don't have to run the client of a program instead it will look like an MS-DOS interface or something.
-
Hi there my friendly forum mates, I was wondering if any of you have an idea of the Back-End Application? If yes is it possible in AutoIT to be developed today or in the near future? hehe
-
I have edited my original post to make it more clearer.
-
Greetings my fellow coders! I have a problem thinking on converting this text file to INI file and just get the necessary "key" and "value". Here is an example. TEXT FILE: BUY SELL ITEMNUM 1 [bEVERAGE] 0.05 0.09 Name1[1]Name2[3] ITEMNUM 2 [bEVERAGE] 0.05 0.09 Name1[1]Name2[3] ITEMNUM 3 [bEVERAGE] 0.06 0.09 Name1[1]Name2[3] ITEMNUM 4 [bEVERAGE] 0.06 0.1 Name1[1]Name2[3] ITEMNUM 5 [bEVERAGE] 0.06 0.1 Name1[1]Name2[3] END of TEXT FILE: ~========================================================================================================== Based on the text file, I want to get the rest of the text except for the Name1[1]Name2[3]. Now my INI file should look like this shown below. Its like updating the prices from the text file to my INI. ~================================================================================================= INI FILE: [GROCERIES] ITEMNUM 1 [bEVERAGE]= 0.090 0.018 0.045 0.060 ITEMNUM 2 [bEVERAGE]= 0.090 0.018 0.045 0.060 ITEMNUM 3 [bEVERAGE]= 0.100 0.200 0.050 0.075 ITEMNUM 4 [bEVERAGE]= 0.100 0.200 0.050 0.075 END OF INI FILE: Make sure to rename Prices.txt to Prices.ini because forums does not allow INI to be uploaded. A little help on this to start with is gladly appreciated. #include-once $file = "prices.ini" $bpk = 0.8 $spk = 1 $altlimit = 0.5 if FileExists( $file ) = 0 then Exit InetGet("http://supernovabots.com/prices_0.txt", "prices_0.txt" ) $F = FileOpen( $file, 0 ) $buying = "buyingprices.ini" $selling = "sellingprices.ini" While 1 $line = FileReadLine($F) If @error = -1 Then ExitLoop $cardname = StringLeft( $line, 47 ) $price = round( StringMid( $line, 48, 9 ), 1 ) if $price = 0 then ContinueLoop if $price > 0.2 then $price = Round( $price * $bpk, 1 ) if $price < 0.01 then $price = 0.01 $priceSELL = round( StringMid( $line, 58, 9 ) * $spk, 1 ) If $priceSELL < $altlimit then $priceSELL = $altlimit $ptxt = IniRead( "prices.ini", "CARDS", $cardname, "999 999 0 0" ) $p = StringSplit( $ptxt, " " ) IniWrite( "prices.ini", "CARDS", $cardname, $price & " " & $p[2] & " " & $priceSELL & " " & $p[0] ) Wend FileClose( $F )PRICES.txt
-
Hi all. I'm having problems with pixels... for example I have my host and a virtual machine, on my Host PixelChecksum(951, 177, 997, 212) shows this value 1888284294 but when I do it on my virtual machine it shows different value? Anyone encountered this problem?
-
My System: MS Office 2007 WINDOWS XP SP2 AUTOIT V3 Latest version updated last Dec. 24 2008. Hi everyone, I'm having problems with my code when it sits and wait for 5 minutes or less once the code is activated. Auto IT crashes randomly on the specified time period. Can anyone help me out on this... CODE ;Code Starts here #Include <Screencapture.au3> Global $error = ObjEvent("AutoIt.Error","Error") HotKeySet("z", "_Do") ;Press to activate code HotKeySet("x", "_Exit");Press to exit code. Func _Do() Do Capture4() $i = 0 Sleep(1000) Until $i= 1 EndFunc ; Func Capture4() Local $Image = @TempDir&"\ScreenCapture.tif", $v = 0 _ScreenCapture_Capture($Image, 13, 419, 257, 454, True) _ImageResize($Image, $Image, 150, 100) $OCR = OCR($Image) If @error then Return ClipPut($OCR) EndFunc ; Func OCR($Image) Local $y = 0, $string $miDoc = ObjCreate("MODI.Document") $miDoc.Create($Image) If @error Then Return SetError(1) $miDoc.Ocr(9, True, True) If @error Then Return SetError(1) EndIf For $Word In $miDoc.Images(0).Layout.Words $delim = ' ' If $miDoc.Images(0).Layout.Words($y).Rects(0).Bottom < $miDoc.Images(0).Layout.Words($y+1).Rects(0).Top Then $delim = @CRLF $string &= $Word.text & $delim $y += 1 Next Return StringTrimRight($string,1) EndFunc Func _ImageResize($sInImage, $sOutImage, $iW, $iH) Local $sOP, $sOF, $sInExt, $Ext, $hBitmap, $hImage1, $hImage2, $hGraphic, $CLSID, $i = 0 Local $sType = "BMP|GIF|ICO|JPG|JPEG|PNG|TIF|TIFF" If Not FileExists($sInImage) Then Return SetError(1, 0, 0) $sInExt = StringUpper(StringTrimLeft($sInImage, StringInStr($sInImage, ".", 0, -1))) If Not StringRegExp($sInExt, "\A(" & $sType & ")\z", 0) Then Return SetError(2, 0, 0) $sOP = StringLeft($sOutImage, StringInStr($sOutImage, "\", 0, -1)) If Not FileExists($sOP) Then Return SetError(3, 0, 0) $sOF = StringTrimLeft($sOutImage, StringInStr($sOutImage, "\", 0, -1)) $Ext = StringUpper(StringTrimLeft($sOutImage, StringInStr($sOutImage, ".", 0, -1))) If Not StringRegExp($Ext, "\A(" & $sType & ")\z", 0) Or $Ext = "ICO" Then Return SetError(4, 0, 0) If Not IsInt($iW) And Not IsInt($iH) Then Return SetError(5, 0, 0) _GDIPlus_Startup() $hImage2 = _GDIPlus_ImageLoadFromFile($sInImage) $ImageHeight = (_GDIPlus_ImageGetHeight($hImage2)) * 1.25 $ImageWidth = (_GDIPlus_ImageGetWidth($hImage2)) * 1.25 $hBitmap = _WinAPI_CreateBitmap($ImageWidth, $ImageHeight, 1, 32) $hImage1 = _GDIPlus_BitmapCreateFromHBITMAP($hBitmap) $hGraphic = _GDIPlus_ImageGetGraphicsContext($hImage1) $ImageHeight = _GDIPlus_ImageGetHeight($hImage2) $ImageWidth = _GDIPlus_ImageGetWidth($hImage2) _GDIPlus_GraphicsDrawImageRect($hGraphic, $hImage2, 0, 0, $ImageWidth * 1.25, $ImageHeight * 1.25) $CLSID = _GDIPlus_EncodersGetCLSID($Ext) $sOutImage = @TempDir & '\OCR_ImageResize.jpg' FileDelete($sOutImage) _GDIPlus_ImageSaveToFileEx($hImage1, $sOutImage, $CLSID) _GDIPlus_ImageDispose($hImage1) _GDIPlus_ImageDispose($hImage2) _GDIPlus_GraphicsDispose($hGraphic) _WinAPI_DeleteObject($hBitmap) _GDIPlus_Shutdown() Return SetError(0, 0, 1) EndFunc ;==>_ImageResize ; Func Error() Endfunc While 1 Sleep(1500) WEnd Func _Exit() Exit EndFunc ;End of Code
-
Delete this post there is a problem with my AutoIT its working 100% in my VM.
-
When I'm trying to run this script it always show the "Error" rather than the Username. Can anyone help me out here? Thanks ;CODE $var = IniRead(@ScriptDir & "Login.ini", "Information", "AccountName", "Error") MsgBox(4096, "Result", $var) ;End of Code ;Login.ini file [information] ; AccountName=Username ;End of Login.ini file
-
Hi there guys, I would like to ask for some help on working with "Array" here is the sample code. This can read clipboard and search for the string on a file. Now my problem is...what if clipboard has this and needs to be search all at once from a INI file and replies it back to the visitor. Clipboard has: Item1 = $10 Item2 = $11 Item3 = $11 Item4 = $14 Item5 = $16 Item6 = $123 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Code goes here Dim $A, $INI Local $NAME1, $I $bak = ClipGet() ClipPut($bak & "") $item= ClipGet() $I = 1 While (Asc(StringMid($NAME1, $I, 1)) <> 10) If $item= "item1" Then $INIFILE = "Database.ini" ; INI file $Open = FileOpen($INIFILE, 0) $INI = FileRead($Open) ClipPut($INI) Sleep(100) MouseClick("left", 766, 480, 1, 1) ;were pm window reply is Sleep(100) Send("^v{Enter}") ExitLoop Else SendMessage(766, 480, "Order's are not on my database") ExitLoop EndIf WEnd ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; End of Code Thanks looking forward on everyones help!
-
I'm using OCR so I needed the ScreenCapture.au3 include, but it has problem after I added this #include file. Func _SendMessage($X, $Y, $MSG) If $MSG <> $LASTMESSAGE Then $MSG = StringReplace($MSG, "@clickNCall", $V) ClipPut($MSG) MouseClick("left", $X, $Y, 1, 1) Send("^v{enter}") $LASTMESSAGE = $MSG EndIf EndFunc