Estimize

Help with colours?

10 posts in this topic

if I wanted to use this colour in a function would I just copy and paste what it says in the help window shown in the photo below?

aexample.png

Share this post


Link to post
Share on other sites



what is x and isn't the x and y just the co-ordinates?
 

 

 

Share this post


Link to post
Share on other sites

Correct. Color is 0x000000. Which function do you want to use to change the color? Color of what? A GUI control, text in an editor ...?


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (2016-08-18 - Version 1.4.6.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2016-12-04 - Version 1.2.2.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

I don't need to change the colour I just need to make an if statement that checks what the colour is then makes a decision based on that information. and above I meant what is hex?
 

 

Edited by Estimize

Share this post


Link to post
Share on other sites

Can you please describe exactly what you want to do? Automating a browser is something completely different than to automate a windows program.


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (2016-08-18 - Version 1.4.6.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2016-12-04 - Version 1.2.2.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

I just need to check the colour of the anywhere on the screen I will try format a bit of code.

something like

Func_1()
 while 1
 if mouseclick("left" , x , y) = Red
 Then mouseclick("left" x ,y)
 wend
endfunc

 

Share this post


Link to post
Share on other sites

The answer is : PixelGetColor  (censored)  

:)

Share this post


Link to post
Share on other sites

So would it be 

func_1()
 While 1
 if PixelGetColour(x, y) = Red
 then mouseclick("left, x, y)
 wend
endfunc

 

Share this post


Link to post
Share on other sites

#10 ·  Posted (edited)

Dog eat your helpfile?
It would be nice when you open it every now and then to check syntax validity before asking the questions here. ;)

Also think about what you posting and try understanding it...eg: how will this script Func end?

Jos 

Edited by Jos

Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

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

  • Similar Content

    • ExiLeD4EveR
      By ExiLeD4EveR
      'm trying to make an autologin script for facebook which prompts u to enter an email and a password and then opens the browser and logs you with the info u entered but im having a problem with the text entered in the input box. What i basically want it to do is take what's written on the inputbox and replace it on the email form in the facebook site and the password. Don't mind the other buttons in the gui , i just wanted to focus on the facebook button first. Any help will be appreciated
      #include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <EditConstants.au3> #include <StaticConstants.au3> #include <IE.au3> #Region ### START Koda GUI section ### Form=c:\users\ExiLeD\desktop\coding\autoit\gui samples\simplegui.kxf $SimpleGUI = GUICreate("MultiProgram", 392, 122, -1, -1) GUISetIcon("C:\Users\ExiLeD\Desktop\Work\Smile\Icon Pack\EcranLcd.ico", -1) $Notepad = GUICtrlCreateButton("Notepad", 16, 24, 73, 25) GUICtrlSetCursor (-1, 0) $Calculator = GUICtrlCreateButton("Calculator", 112, 24, 73, 25) GUICtrlSetCursor (-1, 0) $ExitButoon = GUICtrlCreateButton("Exit", 160, 72, 73, 25) GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif") GUICtrlSetCursor (-1, 0) $Lol = GUICtrlCreateButton("Lol Login", 208, 24, 73, 25) GUICtrlSetCursor (-1, 0) $Facebook = GUICtrlCreateButton("Facebook ", 304, 24, 73, 25) GUICtrlSetCursor (-1, 0) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Facebook ;= if Facebook is pressed it creates the email form $Face_Login = GUICreate("Facebook Login", 295, 88, -1, -1) GUISetIcon("C:\Users\ExiLeD\Downloads\Iconshock-Social-Media-Beakers-Facebook.ico", -1) $Label1 = GUICtrlCreateLabel("Email", 40, 24, 29, 17) $InputBox1 = GUICtrlCreateInput("", 72, 21, 148, 21, BitOR($GUI_SS_DEFAULT_INPUT,$ES_CENTER)) $data1 = GUICtrlRead(-1) $Email_button = GUICtrlCreateButton("Done", 96, 56, 97, 25) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Email_button ;= if Done from email form is pressed then delete the email form and open the password form GUIDelete($Face_Login) Sleep(200) $Face_Login2 = GUICreate("Facebook Login", 295, 88, -1, -1) GUISetIcon("C:\Users\ExiLeD\Downloads\Iconshock-Social-Media-Beakers-Facebook.ico", -1) $Label2 = GUICtrlCreateLabel("Password", 16, 24, 50, 17) $InputBox2 = GUICtrlCreateInput("", 72, 21, 148, 21, BitOR($GUI_SS_DEFAULT_INPUT,$ES_CENTER)) $data2 = GUICtrlRead(-1) $Pass_button = GUICtrlCreateButton("Done", 96, 56, 97, 25) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Pass_button ;= if Done from password form is pressed then it deletes the password form and , to add(open internet explorer on the facebook login page GUIDelete($Face_Login2) FB_SignIn() EndSwitch WEnd EndSwitch WEnd EndSwitch WEnd Func FB_SignIn() Global $oIE = _IECreate("https://www.facebook.com/") Local $username = _IEGetObjByName($oIE, "email") Local $password = _IEGetObjByName($oIE, "pass") Local $button = _IEGetObjById($oIE, "loginbutton") _IEFormElementSetValue($username, $data1) _IEFormElementSetValue($password, $data2) _IEAction($button, "click") EndFunc  
    • messilm10
      By messilm10
      how do i get the crash report of any application and any running script?????
    • ronaldo97
      By ronaldo97
      Hello How can I make the GUI is compatible with all screen sizes ??  
      #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Form1", 623, 445, 192, 124, BitOR($GUI_SS_DEFAULT_GUI,$WS_MAXIMIZE)) GUISetBkColor(0x1E1E1E) $Label1 = GUICtrlCreateLabel("Welcome Back !!", 424, 64, 161, 29) GUICtrlSetFont(-1, 16, 400, 0, "Tahoma") GUICtrlSetColor(-1, 0x800000) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd How do I make Gui interface compatible with all screen sizes ?? 800*600
      1024*768
      1280*1024
    • messilm10
      By messilm10
      respected sir,
      how could I calculate the time difference using auto IT function ?
    • Xandy
      By Xandy
      Waxworks Code Wheel.
      Written in AutoIt with SDL.
      Source