Jump to content
Sign in to follow this  
ForsakenGod

Custom GUI

Recommended Posts

ForsakenGod

Well Hello ,

I ve done programming my prog now and i would like to make an flexible UI to it so i would like to ask if this is possible .

Posted Image

I am kinda new in programming with AutoIt (4th day x) and if theese questions are "Nooblike" please dont blame everyone has to start somehow :)

Log

The log should be processing everythink that happens so far i ve used notepad as my "log" so basically i would like to ask if its possible to add somethink like this in koda + send there what happening.

I ve used this thus far but i dont know what s that window in the form so i can t actually affect it also i dont know if Send() will work on that

WinActivate("Notepad")
    Send("{Enter}")
    Send("[" & @hour & ":" & @MIN & ":" & @SEC & "]" & " Check Yellow ! ")

PixelSearch

The pixelseatch i would like to do is an hard challenge (well for me B) idk how about you ) It should ALWAYS seach the area it should move with programm so it ONLY searches the blank space in the programm (red lined)Is there some way to add variables that move with upper left edge and down right edge of the pixelsearch so i can add them to pixelsearch configuration ? ;)

Bassically i ve mine pixelsearch set to be fully edible from the upper most values of variables but i dont know how to make them change theyr values depending on the position of from

PixelSearch($hornyrohx ,$hornyrohy ,$dolnyrohx ,$dolnyrohy ,$2farba)

Any Ideas + Suggestions & Help is Welcome B)

Thanks in advance,

Unreal

Edited by ForsakenGod

Share this post


Link to post
Share on other sites
GEOSoft

This will get you started but it's a long way from complete.

#include<GUIConstantsEx.au3>
#Include<staticConstants.au3>
$iPixColor = Dec("FFFF00")
$Frm_Main = GUICreate("Test Form")
GUICtrlCreateLabel("Log",10, 10, 40, 200)
GUICtrlSetFont(-1, 16, 600)
$Edit_1 = GUICtrlCreateEdit("", 10, 50, 200, 200)
GUISetState()

While 1
    $Msg = GUIGetMsg()
    Switch $Msg
        Case $GUI_EVENT_CLOSE
            Exit
    EndSwitch
    $iMousePos = MouseGetPos()

    If PixelGetColor($iMousePos[0], $iMousePos[1]) = $iPixColor Then
        $sData = GUICtrlRead($Edit_1) & "[" & @hour & ":" & @MIN & ":" & _
        @SEC & "]" & " Check Yellow ! " & @CRLF
        GUICtrlSetData($Edit_1, $sData)
        Sleep(500)
    EndIf
WEnd

Just move your mouse over something that is yellow.


George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Share this post


Link to post
Share on other sites
ForsakenGod

This will get you started but it's a long way from complete.

#include<GUIConstantsEx.au3>
#Include<staticConstants.au3>
$iPixColor = Dec("FFFF00")
$Frm_Main = GUICreate("Test Form")
GUICtrlCreateLabel("Log",10, 10, 40, 200)
GUICtrlSetFont(-1, 16, 600)
$Edit_1 = GUICtrlCreateEdit("", 10, 50, 200, 200)
GUISetState()

While 1
    $Msg = GUIGetMsg()
    Switch $Msg
        Case $GUI_EVENT_CLOSE
            Exit
    EndSwitch
    $iMousePos = MouseGetPos()

    If PixelGetColor($iMousePos[0], $iMousePos[1]) = $iPixColor Then
        $sData = GUICtrlRead($Edit_1) & "[" & @hour & ":" & @MIN & ":" & _
        @SEC & "]" & " Check Yellow ! " & @CRLF
        GUICtrlSetData($Edit_1, $sData)
        Sleep(500)
    EndIf
WEnd

Just move your mouse over something that is yellow.

Thank you but when i start this script and i move it on a yellow color hex FFFF00 nothink happen but you showed me how to get data to my log (if it works ) so thank you and please anyone has a solution to dont let User write into that log ?

Share this post


Link to post
Share on other sites
GEOSoft

The help file shows you how to set the control to the Read Only style. Go to GUICtrlCreateEdit() and click on the link to the styles table.


George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Share this post


Link to post
Share on other sites
ForsakenGod

The help file shows you how to set the control to the Read Only style. Go to GUICtrlCreateEdit() and click on the link to the styles table.

Thanks again hehe ;) Btw dont you know somethink about the pixelsearch i ve asked about ? :)

Share this post


Link to post
Share on other sites
GEOSoft

I seldom do pixel search functions. Experience has taught me that pixelsearch() is most commonly used for games and I don't do games. That's also why I limited what i gave you to begin with. Most of us won't do Bot code.


George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Share this post


Link to post
Share on other sites
ForsakenGod

I seldom do pixel search functions. Experience has taught me that pixelsearch() is most commonly used for games and I don't do games. That's also why I limited what i gave you to begin with. Most of us won't do Bot code.

I am definelly not going to use it for a game just to develope my skills :) I can even share the source i write with you to show you its not for game its just letting me know how to set up functions declarations etc ;)

Share this post


Link to post
Share on other sites
GEOSoft

There is a good example in the help file under PixelSearch()


George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Share this post


Link to post
Share on other sites
ForsakenGod

There is a good example in the help file under PixelSearch()

Very well then :) Thank you i ve readet the help file but found nothink about how to define variable to move with a whole form .

Also the edibox after it comes full it does not scroll looking in help file now but didnt find anythink just to move 10 characters away lols ;)

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  

×