An really annoying problem

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
Marcdk
Junior Coder
Posts: 36
Joined: Sat Sep 22, 2007 10:16 pm

An really annoying problem

Post by Marcdk » Wed May 14, 2008 5:55 pm

Okay, so i started making a new program with a lot of checkboxes in it, i have 25 to be exactly ;) Okay, so what i want to do is when one of them is checked the program regonices and moves the mouse, let me explain it better

I have a lot of these

So ..

1 (The first checkbox, i need the mouse to go to a spot like: 200,150)
2 (Second checkbox if that is checked it goes to 300,150
3 (Third bla bla bla)
4 (Fourth bla bla bla)
5 (Fifth bla bla bla)


So, basicly it checks which of them you checked, and then you press a start button and then it goes to all the locations which is coded togehter with the number..


Hope someone understands me and have a solution to this!

EDIT: i tried to play around with Getcheckbox, but didn't understand how it worked

My code example (which is wrong)

Label>Main
Wait>3
GetCheckBox>Human1,res
If>res=1,Human1
goto>Human1
endif
label>end

Label>Human1
mousemove>200,150
label>end


In this case Human1 is the caption of my checkbox

User avatar
JRL
Automation Wizard
Posts: 3526
Joined: Mon Jan 10, 2005 6:22 pm
Location: Iowa

Post by JRL » Wed May 14, 2008 6:26 pm

Try something like this:

Code: Select all

Dialog>Dialog1
   Caption=Dialog1
   Width=147
   Height=169
   Top=CENTER
   Left=CENTER
   CheckBox=Human1Box,Human1,16,8,97,False
   CheckBox=Human2Box,Human1,16,24,97,False
   CheckBox=Human3Box,Human1,16,40,97,False
   Button=Ok,32,88,75,25,3
EndDialog>Dialog1

show>dialog1,res1

If>dialog1.Human1Box=True
  MouseMove>200,150
  Wait>2
EndIf

If>dialog1.Human2Box=True
  MouseMove>10,15
  Wait>2
EndIf

If>dialog1.Human3Box=True
  MouseMove>600,15
  Wait>2
EndIf

Marcdk
Junior Coder
Posts: 36
Joined: Sat Sep 22, 2007 10:16 pm

Post by Marcdk » Wed May 14, 2008 8:42 pm

Great :D Thank you very much :)

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts