Jump to content

IF Then & Shift


Archman
 Share

Recommended Posts

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

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

  • Developers

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 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

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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...