Sign in to follow this  
Followers 0
Hyflex

Is there any way i can...

8 posts in this topic

Is there any way i can put code into my script to read the text/numbers if i have the text font as a file or anything?

Share this post


Link to post
Share on other sites



Yes...

IniRead()

or

FileReadLine()

see help

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

Ok... ermm How can i get it to detect a font size like in a game to be able to read some text?

But i dont get how to get it to read from the INI File for intance i get it to press number 7 at a certain time, i have it working but i wana be able to have a ini file so i can change the nunmber from 7 to say 2

i have: http://www.autoitscript.com/autoit3/docs/f...ons/IniRead.htm

But i dun fully understnad it...

Also instead of a location like: "C:\Temp\myfile.ini" into something like same directory as the actual script without having to put the full location just like "\myfile.ini"

Edited by XxXGoD

Share this post


Link to post
Share on other sites

Hi,

show your script and the we can help you a bit faster I guess.

For the location use @ScriptDir & '\yourIni.ini'

So long,

Mega


Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Share this post


Link to post
Share on other sites

; Key Delay Options
Opt("SendKeyDownDelay", 1)
Opt("SendKeyDelay", 1)
; Key Delay Options End


; Hotkey Settings 
HotKeySet("{END}","Escape")
; Hotkey Settings End


; Main Settings / Constants
$Petrot = 0x0B10000
; Main Settings / Constants End

; Pet/Mount Life Checker
While 1
    
      $coord = PixelSearch( 176, 100, 178, 105, $Petrot, 1 )
        If @error Then
    Send("{8 down}")
       Sleep("100")
      Send("{8 up}")
      Sleep("100")
  EndIf
; Pet/Mount Life Checker End


; Characters Attack/Pickup
  $coord = PixelSearch( 426, 59, 429, 63, 0X000000, 1 )
        If @error Then
    Send("{v down}")
        Sleep("100")
    Send("{v up}")
                    Send("{s down}")
                    Send("{s up}")
                    Send("{s down}")
                    Send("{s up}")
        Sleep("100")
    Send("{a down}")
        Sleep("100")
    Send("{a up}")
                    Send("{s down}")
                    Send("{s up}")
                    Send("{s down}")
                    Send("{s up}")
        Sleep("100")
    Send("{a down}")
        Sleep("100")
    Send("{a up}")
                    Send("{s down}")
                    Send("{s up}")
                    Send("{s down}")
                    Send("{s up}")
        Sleep("100")
    Send("{a down}")
        Sleep("100")
    Send("{a up}") 
                    Send("{s down}")
                    Send("{s up}")
                    Send("{s down}")
                    Send("{s up}")
        EndIf

Sleep("1000")
WEnd
; Characters Attack/Pickup End

; Exit Program
Func Escape()
Exit
EndFunc
; Exit Program End

I wana be able to have the number 8 in the ini what i can change.

Also for me able in the ini file to turn on/off that part like make it all commented out with the comment marks

Share this post


Link to post
Share on other sites

Cant seem to work it? If someone gives me some hits on how to that would eb real handy

Share this post


Link to post
Share on other sites

HI,

maybe this helps out:

Global $nr = IniRead("Config.ini", "DownUp", "Nr", "Not Found")
Global $nr1= IniRead("Config.ini", "DownUp", "Nr1", "Not Found")
ConsoleWrite($nr)
Send('{' & $nr & 'down}')
Send($nr1)

Config.ini file in same folder as script:

[DownUp]
Nr=8
Nr1=1

So long,

Mega


Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Share this post


Link to post
Share on other sites

#8 ·  Posted (edited)

That helped alot ty, now how do i get this gui so when i click start it to start the macro above and close closes.

#include <GUIConstants.au3>

#Region ### START Koda GUI section ### Form=C:\X\AForm4.kxf

$Form4 = GUICreate("Woza Woza BOO", 566, 328, 303, 219)

GUISetIcon("")

$GroupBox1 = GUICtrlCreateGroup("", 8, 8, 545, 281)

$TaultUnleashed = GUICtrlCreatePic("C:\Documents and Settings\The Dyes\Desktop\trainer1.JPG", 16, 16, 529, 121, BitOR($SS_NOTIFY,$WS_GROUP))

$Label1 = GUICtrlCreateLabel("wtf u on", 18, 136, 520, 25, $WS_GROUP)

GUICtrlSetFont(-1, 16, 800, 0, "MS Mincho")

GUICtrlSetColor(-1, 0xFF0000)

$Label2 = GUICtrlCreateLabel("Version: 1.1", 488, 264, 60, 17, $WS_GROUP)

$Label4 = GUICtrlCreateLabel("", 8, 144, 4, 4, $WS_GROUP)

$Label1 = GUICtrlCreateLabel("MAHHHHHHHHH.", 16, 176, 370, 17, $WS_GROUP)

GUICtrlSetColor(-1, 0x000080)

$Label3 = GUICtrlCreateLabel("ComeHere", 16, 232, 353, 17, $WS_GROUP)

GUICtrlSetColor(-1, 0xFF0000)

$Label2 = GUICtrlCreateLabel("Boo", 16, 216, 408, 17, $WS_GROUP)

GUICtrlSetColor(-1, 0x000080)

$Label4 = GUICtrlCreateLabel("Copyright to XxXGoD.", 14, 266, 107, 17, $WS_GROUP)

GUICtrlSetColor(-1, 0x000080)

GUICtrlCreateGroup("", -99, -99, 1, 1)

$Button1 = GUICtrlCreateButton("&Start", 176, 296, 75, 25)

$Button2 = GUICtrlCreateButton("&Close", 304, 296, 75, 25)

GUISetState(@SW_SHOW)

#EndRegion ### END Koda GUI section ###

While 1

$nMsg = GUIGetMsg()

Switch $nMsg

Case $GUI_EVENT_CLOSE

Exit

EndSwitch

WEnd

And what about reading the games text as like when get lvl 30 it does something differnt...?

Edited by XxXGoD

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0