Archman Posted January 18, 2007 Share Posted January 18, 2007 Hi all as you can see this is my first post, I only discovered this prog yesterday and have very little coding experience. Any how i have gotten hold of a script that was posted on a different forum so that people could modify and edit for themselves. ( How i found out about AutoIt) My problem is i do not now how to properly use the if, then, and functions or how to make it Send(GUICtrlRead($input)) with Shift so if $input was 9 i want it to press Shift and 9. Origional Code ----- $input = 9 ---- ( if Tick box is ticked then Send $input so it presses the number 9 key) ; ATTACK 1 If GUICtrlRead($checkboxattack1) = 1 Then Send(GUICtrlRead($input)) Sleep(2000+Random(1,25)) EndIfoÝ÷ ØÌ¶×¦¦× ^Ó~¢ So please can somebody Tell me how my attempted script should be layed out, and how i make it use Shift + 9 Link to comment Share on other sites More sharing options...
AzKay Posted January 18, 2007 Share Posted January 18, 2007 If GUICtrlRead($Input) = 9 Then Send("{LSHIFT}") # MY LOVE FOR YOU... IS LIKE A TRUCK- # Link to comment Share on other sites More sharing options...
Archman Posted January 18, 2007 Author Share Posted January 18, 2007 Naw sorry u missunderstand i dont want it so if $attack = 9 it sends shift I want it so that if The Shift box is ticked it will send Shift & 9 together If the shift box is not ticked it will just send 9 Link to comment Share on other sites More sharing options...
Archman Posted January 18, 2007 Author Share Posted January 18, 2007 Ok iv sussed i can use Shit with {SHIFTDOWN} & {SHIFTUP} but what is the proper format for testing the 2 variables are ticked. If GUICtrlRead($checkboxattack1) = 1 And If GUICtrlRead($checkboxattack1a) = 1 Then Send{SHIFTDOWN} Send(GUICtrlRead($input)) Send{SHIFTUP} ElseIf GUICtrlRead($checkboxattack1) = 1 And if GUICtrlRead($checkboxattack1a) = 0 Then Send(GUICtrlRead($input)) Sleep(2000+Random(1,25)) EndIf When i try using And i get an error message Link to comment Share on other sites More sharing options...
Developers Jos Posted January 18, 2007 Developers Share Posted January 18, 2007 (edited) If GUICtrlRead($checkboxattack1) = 1 And GUICtrlRead($checkboxattack1a) = 1 Then Send{SHIFTDOWN} Send(GUICtrlRead($input)) Send{SHIFTUP} ElseIf GUICtrlRead($checkboxattack1) = 1 And GUICtrlRead($checkboxattack1a) = 0 Then Send(GUICtrlRead($input)) Sleep(2000 + Random(1, 25)) EndIfoÝ÷ ÚÚºÚ"µÍYÕRPÝXY ÌÍØÚXÚØÞ]XÚÌJHHH[RYÕRPÝXY ÌÍØÚXÚØÞ]XÚÌXJHHH[BTÙ[ÔÒQÕÓBBTÙ[ ÕRPÝXY ÌÍÚ[] JBBTÙ[ÔÒQTBQ[ÙRYÕRPÝXY ÌÍØÚXÚØÞ]XÚÌXJHH[BTÙ[ ÕRPÝXY ÌÍÚ[] JBBTÛY È[ÛJKJJBQ[Y[Y Edited January 18, 2007 by JdeB SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Archman Posted January 18, 2007 Author Share Posted January 18, 2007 Nice one Thank you Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now