Jump to content
Sign in to follow this  
Ryukk0

need help in coding

Recommended Posts

Ryukk0

i'm trying to get this to work but i cant, so if any 1 can help... TY

so i made a GUI with 3 checkbox's each checkbox do a simple task, open a folder, winrar or a doc folder.

all ok till now. but it opens the folder and then stops. i wanna know how to make it open and open and open...... i think its a loop (sorry im new at this) if any 1 can help plz... and sorry for bad english XS

#include <ButtonConstants.au3>

#include <GUIConstantsEx.au3>

#include <WindowsConstants.au3>

#Region ### START Koda GUI section ### Form=

$Form1 = GUICreate("Open", 170, 65, 522, 298)

$Checkbox1 = GUICtrlCreateCheckbox("Folder", 8, 8, 49, 17)

$Checkbox2 = GUICtrlCreateCheckbox("WinRAR", 56, 8, 57, 17)

$Checkbox3 = GUICtrlCreateCheckbox("Docs", 120, 8, 49, 17)

$Button1 = GUICtrlCreateButton("Exit", 8, 32, 155, 25)

GUISetState(@SW_SHOW)

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

While 1

$f = PixelSearch(0,0,1365,767,0xE0CC7D)

$r = PixelSearch(0,0,1365,767,0xDA6CCA)

$d = PixelSearch(0,0,1365,767,0xE0853C)

$nMsg = GUIGetMsg()

Switch $nMsg

Case $GUI_EVENT_CLOSE

Exit

Case $button1

Exit

Case $Checkbox1

MouseClick("left",$f[0],$f[1],2,6)

Case $Checkbox2

MouseClick("left",$r[0],$r[1],2,6)

Case $Checkbox3

MouseClick("left",$d[0],$d[1],2,6)

EndSwitch

WEnd

Edited by Ryukk0

Share this post


Link to post
Share on other sites
Clark

Hi Ryukk

You have an exit statement on your button1, which is your Folder checkbox. Is this intentional?

Also, your script doesn't "open" anything and I cannot figure out what it is trying to do.

Share this post


Link to post
Share on other sites
Ryukk0

run the script you will see. the button is there intentionaly. if i check 1 checkbox it will find a pixel and make 2clicks on it and then stop the script until i check again and do the same thing. i whant to check a checkbox and i whant the cript to do the 2 click thing over and over again until i uncheck....

sorrry cant be more clear XS

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  

×