# Having issues with a script.

## Recommended Posts

So here i have provided a link of how the red arrows look,it changesarrow direction each time you press an arrow.Here is a picture,The issue i have is something with line 23,and it just starts and ends the macro instantly,=( Here is also the script im trying to make work,any help is highly appreciated

Note* see how the red arrow is the right arrow key it changes after you press that key to another random key,Now i need to make this loop so i can leave this overnight.

```constants
k1 = 0
uparrow = 1
leftarrow = 2
rightarrow = 3
downarrow = 4
End
compute downarrow = Int( {RGBred} * (1 - (150/255)) + 230 * (150/255) + .49 )

compute uparrow = Int( {RGBred} * (1 - (150/255)) + 230 * (150/255) + .49 )

compute rightarrow = Int( {RGBred} * (1 - (150/255)) + 230 * (150/255) + .49 )

compute leftarrow = Int( {RGBred} * (1 - (150/255)) + 230 * (150/255) + .49 )
Loop 500000
Call Meditate
Call check red
End
Procedure Meditate
delay 500
Keys m
Delay 3000
Loop 70000
end
End
GetRed 271, 221 = \$uparrow
if \$k1 = 1
Else
keys {up}
set k1 = 1
Delay 200
end
End

GetRed 265, 226 = \$leftarrow
if \$k1 = 2
Else
keys {left}
set k1 = 2
Delay 200
end
End

GetRed 271, 231 = \$downarrow
if \$k1 = 3
Else
keys {down}
set k1 = 3
Delay 200
end
End

GetRed 277, 277 = \$rightarrow
if \$k1 = 4
Else
keys {right}
set k1 = 4
Delay 200
end
End
ePos 257, 89```

##### Share on other sites

Please review the forum rules and the part of how Game automation is not allowed to be discussed here

http://www.autoitscript.com/forum/index.php?app=forums&module=extras&section=boardrules

##### Share on other sites

Looks like game automation to me which isn't allowed according to our forum rules (please check the rules on the lower right hand corner of this page).

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.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
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:

##### Share on other sites

onepieceme,

Welcome to the AutoIt forum.

Firstly that syntax does not look like AutoIt and this is the AutoIt forum.

Secondly, as it is the Autoit forum you are expected to follow the Forum rules (there is also a link at bottom right of each page) where you will notice that there is a prohibition on game automation.

So you should not be at all surprised at what happens next......

M23

Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

##### Share on other sites
This topic is now closed to further replies.

×

• Wiki

• Back

• Git